1

This post is in addition query to Is it possible to migrate from cucumber-jvm to QAF? Could you please help me know the approach to execute as testNG? For now I've configured the example from below link

https://github.com/qmetry/qaf/releases/download/2.1.9-RC2/QAFGherkin.zip

however when I try to execute the CucumberRunner.java It doesn't find any feature

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

I've ensured that application.properties values are also set as step.provider.pkg=com.qmetry.qaf.examples.steps.cucumber then later, I moved a feature file to com.qmetry.qaf.examples.cucumber.runners package & executed it. No luck. Any help would be much appreciated.

Thanks in advance

user861594
  • 5,733
  • 3
  • 29
  • 45
nandesh kalyankar
  • 302
  • 1
  • 5
  • 23

1 Answers1

1

Please refer migration steps. Will you please share your project structure after migration and config file you are using? Use QAF latest version and don't run with cucumber runner, instead run using QAF. Below is sample configuration file:

<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>

You can run as TestNG test.

Default directory for .bdd or .feature file is <project_home>/scenarios directory. If it is not under /scenarios you need to set using scenario.file.loc.

user861594
  • 5,733
  • 3
  • 29
  • 45
  • I've downloaded the example project & I see there is a QAFPerfectoCucumberFormatter.java-ex file. I believe this acts as a plugin for CucumberRunner.java however when I try to execute the CucumberRunner.java ,it fails with cucumber.runtime.CucumberException: Couldn't load plugin class: com.qmetry.qaf.examples.cucumber.runners.QAFPerfectoCucumber‌​Formatter could you please tell me if i need to rename QAFPerfectoCucumberFormatter.java-ex to QAFPerfectoCucumberFormatter.java ? how do I execute custom cucumberrunner ? Thanks for any help – nandesh kalyankar Dec 14 '17 at 16:08
  • Why you want to use cucumber runner? you don't need it with latest qaf. Refer [qaf-blank-project](https://github.com/qmetry/qaf-blank-project) or [qaf-blank-project-maven](https://github.com/qmetry/qaf-blank-project-maven) – user861594 Dec 15 '17 at 06:09
  • You can delete runner folder, it is unused code , not required at all, missed to clean up. – user861594 Dec 15 '17 at 06:15