Warm tip: This article is reproduced from serverfault.com, please click

其他-在Xray中将 Cucumber 特征导出到.feature文件时缺少特征标题?

(其他 - Missing feature title while exporting cucumber feature to .feature file in Xray?)

发布于 2020-12-04 08:02:11

从Xray测试执行导出 Cucumber 文件(功能)时,我最近注意到功能名称丢失(应该从测试/任务名称中导入吗?)

> @XYZ-1234 Feature:
> 
>   #description    @XYZ-1234 @XYZ-1234 @XYZ-1234 @Tag_name
>   Scenario: Lorem ipsum dolor sit amet
>       Given Consectetur adipiscing elit
>       Then  Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

是否可以在Xray中添加功能名称?

当你通过wdio-cucumberjs-json-reporter生成JSON报告时,JSON没有名称,只有“ .json”,当我添加如下所示的功能名称时,它可以正常工作,但功能将通过CI导出/ CD,因此我需要使用正确的名称指出正确的JSON。

> @XYZ-1234 Feature: Added title manually
> 
>   #description    @XYZ-1234 @XYZ-1234 @XYZ-1234 @Tag_name
>   Scenario: Lorem ipsum dolor sit amet
>       Given Consectetur adipiscing elit
>       Then  Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

有解决此情况的解决方案吗?提前致谢。

Questioner
beauvoir
Viewed
0
Sérgio 2020-12-08 21:07:51

为了填充“功能:”字段,你需要将Xray中的“测试”链接到“需求”(即“测试可以涵盖的问题”)。这些“需求”问题需要配置为作为“需求”处理的一种问题类型,如文档中所述

生成.feature文件的规则在此处详细介绍

顺便说一句,在最新的Xray v4.2.3中,如果你的测试方案未链接到“需求”,则Xray将使用默认名称自动填充Feature:部分。更多信息在这里