Closed nomadcanuck closed 6 years ago
What version of IntelliJ are you using?
Sorry about that, the IntelliJ version in use is:
IntelliJ IDEA 2017.3.5 EAP (Ultimate Edition) Build #IU-173.4674.1, built on February 26, 2018
also confirmed the same behaviour using updated version: IntelliJ IDEA 2018.1 EAP (Ultimate Edition) Build #UI-181.3986.9, built on February 27, 2018
java version "1.8.0_144"
SerenityReporter constructor needs CucumberWithSerenity.currentRuntimeOptions() but CucumberWithSerenity.setRuntimeOptions(RuntimeOptions runtimeOptions) is called after ==> NPE :(
<serenity.version>1.9.1</serenity.version>
<serenity.cucumber.version>1.9.3</serenity.cucumber.version>
Thanks for finding this - the IntelliJ API may have changed. Please feel free to provide a PR as I won’t have time to look into this any time soon
using cucumber.api.cli.Main as Main class seems to do the trick. Try to edit run configuration (in intelliJ, Run/Edit Configurations...) and use cucumber.api.cli.Main
instead of net.serenitybdd.cucumber.cli.Main
@asvdw If you use cucumber.api.cli.Main you won't be running the feature file as a Serenity test.
Yes I know, but it was ok for debugging purpose. Here is the simple fix ;)
Can some please create a version with this fix as it affected anyone using the cli
Can anyone fix the above-mentioned issue?
Should be fixed in serenity-cucumber 1.9.4
Thank you. Updating a new serenity cucumber version.
Attempting to run cucumber feature file with serenity directly from IntelliJ produces NullPointerException when using serenity-cucumber v1.6.13.
Workaround is to use serenity-cucumber v1.6.10 with serenity v1.8.21.
Steps to reproduce:
Exception in thread "main" java.lang.NullPointerException at cucumber.runtime.formatter.SerenityReporter.initLineFilters(SerenityReporter.java:365) at cucumber.runtime.formatter.SerenityReporter.<init>(SerenityReporter.java:100) at net.serenitybdd.cucumber.CucumberWithSerenityRuntime.createSerenityEnabledRuntime(CucumberWithSerenityRuntime.java:37) at net.serenitybdd.cucumber.CucumberWithSerenityRuntime.using(CucumberWithSerenityRuntime.java:23) at net.serenitybdd.cucumber.cli.Main.run(Main.java:27) at net.serenitybdd.cucumber.cli.Main.main(Main.java:18)