0

I downloaded the Quantum Perfecto Starter template and imported it into IntelliJ Ultimate.

If I run the maven test target, all of the example test cases execute fine. I can also run the tests successfully from the "testng_all.xml" configuration. But I am not able to run a single feature or feature file. If I right click on a feature file and select Run, I get an error like:

Exception in thread "main" cucumber.runtime.CucumberException: Error parsing feature file 
C:/quantum-starter-project-path/src/main/resources/scenarios/webSearch.feature
   at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:133)
   at cucumber.runtime.model.CucumberFeature.loadFromFeaturePath(CucumberFeature.java:104)
   at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:54)
   at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:34)
   at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:239)
   at cucumber.runtime.Runtime.run(Runtime.java:111)
   at cucumber.api.cli.Main.run(Main.java:36)
   at cucumber.api.cli.Main.main(Main.java:18)
Caused by: gherkin.parser.ParseError: Parse error at C:/quantum-starter-project-path/src/main/resources/scenarios/webSearch.feature:45. 
Found examples when expecting one of: comment, row, tag. (Current getState: examples).
   at gherkin.parser.Parser$Machine.event(Parser.java:207)
   at gherkin.parser.Parser.event(Parser.java:159)
   at gherkin.parser.Parser.access$100(Parser.java:16)
   at gherkin.parser.Parser$Machine.event(Parser.java:215)
   at gherkin.parser.Parser.event(Parser.java:159)
   at gherkin.parser.Parser.examples(Parser.java:124)
   at gherkin.lexer.En.scan(En.java:780)
   at gherkin.lexer.I18nLexer.scan(I18nLexer.java:36)
   at gherkin.parser.Parser.parse(Parser.java:62)
   at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:131)
   ... 7 more

The project is a module nested under another IntelliJ project. When Maven test happens, it is using the JRE baked into IntelliJ. I have tried changing the Feature runtime configuration to point to the same JRE that Maven uses, but still, the same tests that are parsed and execute fine with the Maven test target, fail when I use the Run: Feature configuration...

The docs say this project requires JDK 8. I have tried pointing the run config to both JDK 8 and JDK 11. Still, executing the feature throws this "Found examples when expecting one of: comment, row...." error.

It's clearly not a real syntax issue in the feature file, because Maven Test parses it just fine. It must be something with the dependency versions or runtime configuration...

This is the full command IntelliJ issues when executing Maven Test, which is successful:

"C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\jbr\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\ghe\ui\apps\lockbox-summary-e2e "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\lib\idea_rt.jar=63112:C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar" org.codehaus.classworlds.Launcher -Didea.version2019.3.3 test

Here's the full command IntelliJ issues when I Run: Feature webSearch, which doesn't work. It's much longer. This is when I have pointed it to the same JRE as the Maven command:

"C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\jbr\bin\java.exe" -Dorg.jetbrains.run.directory=C:\quantum-project-starter-path\src\main\resources\scenarios "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\lib\idea_rt.jar=63446:C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\quantum-starter-project-path\target\classes;C:\Users\E971227\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\E971227\.m2\repository\xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar;C:\Users\E971227\.m2\repository\info\cukes\cucumber-java\1.2.5\cucumber-java-1.2.5.jar;C:\Users\E971227\.m2\repository\info\cukes\cucumber-core\1.2.5\cucumber-core-1.2.5.jar;C:\Users\E971227\.m2\repository\info\cukes\cucumber-html\0.2.3\cucumber-html-0.2.3.jar;C:\Users\E971227\.m2\repository\info\cukes\cucumber-jvm-deps\1.0.5\cucumber-jvm-deps-1.0.5.jar;C:\Users\E971227\.m2\repository\info\cukes\gherkin\2.12.2\gherkin-2.12.2.jar;C:\Users\E971227\.m2\repository\com\quantum\quantum-support\1.21.2\quantum-support-1.21.2.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\3.141.59\selenium-remote-driver-3.141.59.jar;C:\Users\E971227\.m2\repository\net\bytebuddy\byte-buddy\1.8.15\byte-buddy-1.8.15.jar;C:\Users\E971227\.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\E971227\.m2\repository\com\squareup\okhttp3\okhttp\3.11.0\okhttp-3.11.0.jar;C:\Users\E971227\.m2\repository\com\squareup\okio\okio\1.14.0\okio-1.14.0.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-api\3.141.59\selenium-api-3.141.59.jar;C:\Users\E971227\.m2\repository\io\appium\java-client\6.1.0\java-client-6.1.0.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-java\3.12.0\selenium-java-3.12.0.jar;C:\Users\E971227\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\E971227\.m2\repository\org\apache\httpcomponents\httpcore\4.4.6\httpcore-4.4.6.jar;C:\Users\E971227\.m2\repository\com\google\code\gson\gson\2.8.4\gson-2.8.4.jar;C:\Users\E971227\.m2\repository\org\apache\httpcomponents\httpclient\4.5.5\httpclient-4.5.5.jar;C:\Users\E971227\.m2\repository\cglib\cglib\3.2.6\cglib-3.2.6.jar;C:\Users\E971227\.m2\repository\org\ow2\asm\asm\6.0\asm-6.0.jar;C:\Users\E971227\.m2\repository\org\apache\ant\ant\1.9.6\ant-1.9.6.jar;C:\Users\E971227\.m2\repository\org\apache\ant\ant-launcher\1.9.6\ant-launcher-1.9.6.jar;C:\Users\E971227\.m2\repository\commons-validator\commons-validator\1.6\commons-validator-1.6.jar;C:\Users\E971227\.m2\repository\commons-beanutils\commons-beanutils\1.9.2\commons-beanutils-1.9.2.jar;C:\Users\E971227\.m2\repository\commons-digester\commons-digester\1.8.1\commons-digester-1.8.1.jar;C:\Users\E971227\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\E971227\.m2\repository\org\apache\commons\commons-lang3\3.7\commons-lang3-3.7.jar;C:\Users\E971227\.m2\repository\commons-io\commons-io\2.6\commons-io-2.6.jar;C:\Users\E971227\.m2\repository\org\springframework\spring-context\5.0.5.RELEASE\spring-context-5.0.5.RELEASE.jar;C:\Users\E971227\.m2\repository\org\springframework\spring-aop\5.0.5.RELEASE\spring-aop-5.0.5.RELEASE.jar;C:\Users\E971227\.m2\repository\org\springframework\spring-beans\5.0.5.RELEASE\spring-beans-5.0.5.RELEASE.jar;C:\Users\E971227\.m2\repository\org\springframework\spring-core\5.0.5.RELEASE\spring-core-5.0.5.RELEASE.jar;C:\Users\E971227\.m2\repository\org\springframework\spring-jcl\5.0.5.RELEASE\spring-jcl-5.0.5.RELEASE.jar;C:\Users\E971227\.m2\repository\org\springframework\spring-expression\5.0.5.RELEASE\spring-expression-5.0.5.RELEASE.jar;C:\Users\E971227\.m2\repository\org\aspectj\aspectjweaver\1.9.1\aspectjweaver-1.9.1.jar;C:\Users\E971227\.m2\repository\org\openpnp\opencv\3.2.0-1\opencv-3.2.0-1.jar;C:\Users\E971227\.m2\repository\org\json\json\20160810\json-20160810.jar;C:\Users\E971227\.m2\repository\com\perfectomobile\http-client\18.3.0.3\http-client-18.3.0.3.jar;C:\Users\E971227\.m2\repository\com\qmetry\qaf\2.1.15\qaf-2.1.15.jar;C:\Users\E971227\.m2\repository\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar;C:\Users\E971227\.m2\repository\com\sun\jersey\jersey-client\1.19\jersey-client-1.19.jar;C:\Users\E971227\.m2\repository\com\sun\jersey\jersey-core\1.19\jersey-core-1.19.jar;C:\Users\E971227\.m2\repository\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;C:\Users\E971227\.m2\repository\com\sun\jersey\contribs\jersey-multipart\1.19\jersey-multipart-1.19.jar;C:\Users\E971227\.m2\repository\org\jvnet\mimepull\mimepull\1.9.3\mimepull-1.9.3.jar;C:\Users\E971227\.m2\repository\com\sun\jersey\contribs\jersey-apache-client\1.17.1\jersey-apache-client-1.17.1.jar;C:\Users\E971227\.m2\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;C:\Users\E971227\.m2\repository\org\aspectj\aspectjrt\1.8.9\aspectjrt-1.8.9.jar;C:\Users\E971227\.m2\repository\org\aspectj\aspectjtools\1.8.9\aspectjtools-1.8.9.jar;C:\Users\E971227\.m2\repository\net\sourceforge\jexcelapi\jxl\2.6.12\jxl-2.6.12.jar;C:\Users\E971227\.m2\repository\commons-codec\commons-codec\1.8\commons-codec-1.8.jar;C:\Users\E971227\.m2\repository\commons-configuration\commons-configuration\1.7\commons-configuration-1.7.jar;C:\Users\E971227\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\E971227\.m2\repository\com\google\inject\guice\3.0\guice-3.0.jar;C:\Users\E971227\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\E971227\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\E971227\.m2\repository\velocity\velocity-dep\1.4\velocity-dep-1.4.jar;C:\Users\E971227\.m2\repository\com\qmetry\qaf-support\2.1.15\qaf-support-2.1.15.jar;C:\Users\E971227\.m2\repository\com\perfectomobile\pm-webdriver\18.3.0.3\pm-webdriver-18.3.0.3.jar;C:\Users\E971227\.m2\repository\com\perfectomobile\intellij-connector\18.4.0.0\intellij-connector-18.4.0.0.jar;C:\Users\E971227\.m2\repository\com\perfecto\reporting-sdk\reportium-java\2.3\reportium-java-2.3.jar;C:\Users\E971227\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\E971227\.m2\repository\org\slf4j\slf4j-api\1.7.7\slf4j-api-1.7.7.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-support\3.141.59\selenium-support-3.141.59.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-server\3.141.59\selenium-server-3.141.59.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\3.141.59\selenium-chrome-driver-3.141.59.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\3.141.59\selenium-edge-driver-3.141.59.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\3.141.59\selenium-firefox-driver-3.141.59.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\3.141.59\selenium-ie-driver-3.141.59.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-opera-driver\3.141.59\selenium-opera-driver-3.141.59.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\3.141.59\selenium-safari-driver-3.141.59.jar;C:\Users\E971227\.m2\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C:\Users\E971227\.m2\repository\org\seleniumhq\selenium\jetty-repacked\9.4.12.v20180830\jetty-repacked-9.4.12.v20180830.jar;C:\Users\E971227\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\Users\E971227\.m2\repository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;C:\Users\E971227\.m2\repository\com\google\guava\guava\24.1-jre\guava-24.1-jre.jar;C:\Users\E971227\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\E971227\.m2\repository\org\checkerframework\checker-compat-qual\2.0.0\checker-compat-qual-2.0.0.jar;C:\Users\E971227\.m2\repository\com\google\errorprone\error_prone_annotations\2.1.3\error_prone_annotations-2.1.3.jar;C:\Users\E971227\.m2\repository\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;C:\Users\E971227\.m2\repository\org\codehaus\mojo\animal-sniffer-annotations\1.14\animal-sniffer-annotations-1.14.jar;C:\Users\E971227\.m2\repository\org\apache\commons\commons-collections4\4.0\commons-collections4-4.0.jar;C:\Users\E971227\.m2\repository\org\testng\testng\6.10\testng-6.10.jar;C:\Users\E971227\.m2\repository\com\beust\jcommander\1.48\jcommander-1.48.jar;C:\Users\E971227\.m2\repository\com\perfecto\reporting-sdk\reportium-testng\2.3\reportium-testng-2.3.jar;C:\Users\E971227\.m2\repository\org\slf4j\slf4j-log4j12\1.7.7\slf4j-log4j12-1.7.7.jar;C:\Users\E971227\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\plugins\junit\lib\junit-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\plugins\cucumber-java\lib\cucumber-jvmFormatter.jar" cucumber.api.cli.Main --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter --monochrome --glue com.quantum.steps C:/quantum-starter-project-path/src/main/resources/scenarios/webSearch.feature

This fails with the exception above. Searching for the error I only find actual syntax errors, can't find anything on this type of IDE configuration problem. Any direction is appreciated!

Jacob Ensor
  • 335
  • 3
  • 12

1 Answers1

1

Oh. I have seen this before. The Perfecto Quantum starter only works on cloud devices. You'll have to have a cloud account with Perfecto. The kit won't run on locally connected devices. It simply isn't gonna do that. It has too many dependencies baked into the code that require use on the Perfecto cloud.

Fox
  • 11
  • 1