此帖子另外询问Is it possible to migrate from cucumber-jvm to QAF?您能否帮我了解执行testNG的方法?目前我已经从下面的链接
配置了示例https://github.com/qmetry/qaf/releases/download/2.1.9-RC2/QAFGherkin.zip
然而,当我尝试执行CucumberRunner.java时,它没有找到任何功能
log4j:WARN No such property [follow] in org.apache.log4j.FileAppender.
[ConfigurationManager] - ISFW build info: {qaf-Type=core, qaf-Revision=9-RC1, qaf-Version=2.1, qaf-Build-Time=23-Sep-2016 12:16:17}
[ConfigurationManager] - Resource dir: C:\Users\Kalyankar\Downloads\qaf-blank-project-maven-masterDec\qaf-blank-project-maven-master\resources. Found property files to load: 6
[ConfigurationManager] - Resource dir: C:\Users\Kalyankar\Downloads\qaf-blank-project-maven-masterDec\qaf-blank-project-maven-master\resources. Found property files to load: 0
[TestNG] Running:
C:\Users\Kalyankar\AppData\Local\Temp\testng-eclipse-1055468291\testng-customsuite.xml
No features found at [classpath:com/qmetry/qaf/examples/cucumber/runners]
0 Scenarios
0 Steps
0m0.000s
PASSED: run_cukes
Runs Cucumber Features
===============================================
Default test
Tests run: 1, Failures: 0, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 1, Failures: 0, Skips: 0
===============================================
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@6e1567f1: 18 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@72d818d1: 18 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 30 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@31a5c39e: 35 ms
[TestNG] Time taken by org.testng.reporters.jq.Main@59ec2012: 224 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@42dafa95: 131 ms
我确保application.properties值也设置为step.provider.pkg=com.qmetry.qaf.examples.steps.cucumber
,然后我将一个功能文件移到了com.qmetry.qaf.examples.cucumber.runners
包&执行它。没运气。任何帮助将非常感激。
提前致谢
答案 0 :(得分:1)
请参阅migration steps。请您在迁移和您正在使用的配置文件后分享您的项目结构吗? 使用QAF最新版本并且不使用黄瓜转轮运行,而是使用QAF运行。以下是示例配置文件:
<test name="Gherkin-QAF-Test">
<parameter name="step.provider.pkg" value="your.steps.pkg" />
<parameter name="scenario.file.loc" value="your features file relative path" />
<classes>
<class name="com.qmetry.qaf.automation.step.client.gherkin.GherkinScenarioFactory" />
</classes>
</test>
您可以作为TestNG测试运行。
.bdd
或.feature
文件的默认目录是&lt; project_home&gt; / scenarios目录。如果它不在/ scenario下,则需要使用scenario.file.loc
进行设置。