微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java – 执行多个黄瓜特征文件

当我提交单个功能文件时,它可以完美运行.我想将具有多个功能文件功能文件夹路径传递给runner脚本.任何人都可以帮助执行多个功能文件

所有功能文件都具有相同的步骤,但数据不同,文件名不同.

@RunWith(Cucumber.class)

@CucumberOptions(format = {"pretty"}, features =
"C:\\TESTER\\Execution\\uidata\\featurefiles\\",
        glue={"com.test.auto.stepdefs"},dryRun=false) 

public class CucumberTest { 

}

我感谢你的帮助.

解决方法:

这适用于Java-Cucumber用户::
多个功能
1.Smoketest 2.登录测试
然后你的Junit runner java文件应该是这样的

@RunWith(Cucumber.class)    
    @CucumberOptions 
    (features = "src/test/java/testStep/",#Path for the Feature files Folder.Given you have smoke.feature and login.feature files present in the Path#
    plugin ={"pretty","html:reports/test-report"},#Path for the Reports Html Folder#
    tags= {"@smoke,@login"})#Declaring multiple Feature names of files#

– 干杯

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐