I have following scenario outline with examples:
Scenario Outline: Example sale with adjustment
Given fiscal device in normal state
When open fiscal receipt with operator 1 and password "0000"
And user try to sell <text> for $0.99 single price in Tax group "A" with quantity of 2 with adjustment <type> of <value>
Examples:
| text | type | value |
| "discount by perc" | "DISCOUNT_BY_PERCENTAGE" | 10.0 |
| "discount by value" | "DISCOUNT_BY_SUM" | 0.10 |
| "surcharge by perc" | "SURCHARGE_BY_PERCENTAGE" | 10.0 |
| "surcharge by value" | "SURCHARGE_BY_SUM" | 0.10 |
and defined test class as follow:
@RunWith(Cucumber.class)
@CucumberOptions(
plugin = {"pretty", "html:target/cucumber-html-report"},
features = "src/test/resources/"
)
public class SalesTest {
}
Then my build failed because of:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':devices:test'.
> Could not generate test report to 'D:\Intellij\DatecsFiscalFramework\devices\build\reports\tests'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 17.053 secs
D:\Intellij\DatecsFiscalFramework\devices\build\reports\tests\packages\| "discount by perc" | "DISCOUNT_BY_PERCENTAGE" | 10.html (The filename, directory name, or volume label syntax is incorrect)
16:08:25: External task execution finished 'build'.
I saw there was and --expand option but my project is configured with 1.2.4. How can make my build not failing and optionally to have successfully generated report.
dependencies {
...
testCompile 'info.cukes:cucumber-java:1.2.4'
testCompile 'info.cukes:cucumber-junit:1.2.4'
testCompile 'junit:junit:4.12'
}
I'm on windows.
Thanks.
Could you give more information and sample how you have defined the ':devices:test' task?
It happens to me as well on Windows due to the generated step name contain illegal windows characters with root cause:
Caused by: java.io.FileNotFoundException: ...\github\mrduguo\gradle-sample-cucumber\build\reports\tests\packages\| 127.0.0.html (The filename, directory name, o
r volume label syntax is incorrect)
at org.gradle.internal.IoActions$TextFileWriterIoAction.execute(IoActions.java:108)
... 77 more
You may reproduce by clone the repo then run ./gradlew from there
Found related discussion: only fail if the outline value contain DOT
http://stackoverflow.com/questions/25174141/could-not-generate-test-report-in-gradle-due-to-cucumber-step-syntax
Created sample project gradle-cucumber-jvm-issue-972 to reproduce:
git clone https://github.com/mrduguo/gradle-cucumber-jvm-issue-972.git
./gradlew
I am not able to generate cucumber reports , I have added plugin ={"html:target/cucumber-html-report"} to my test runner file but when I run this using TestRunner file , It gives me only Reports.js file under target folder , Index.HTML file was missing from the folder , Only reprts.js file was there
Please help !!

@RohitVerma0123 This is an issue tracker, please ask for help in a support forum.
Hello, Let me help with the following error, How to Resolve?
cucumber.runtime.CucumberException: Failed to create scenario runner
at cucumber.runtime.junit.FeatureRunner.buildFeatureElementRunners(FeatureRunner.java:85)
at cucumber.runtime.junit.FeatureRunner.
at cucumber.api.junit.Cucumber.addChildren(Cucumber.java:95)
at cucumber.api.junit.Cucumber.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:84)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:70)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.junit.runners.model.InitializationError
at org.junit.runners.ParentRunner.validate(ParentRunner.java:418)
at org.junit.runners.ParentRunner.
at org.junit.runners.Suite.
at cucumber.runtime.junit.ExamplesRunner.
at cucumber.runtime.junit.ScenarioOutlineRunner.
at cucumber.runtime.junit.FeatureRunner.buildFeatureElementRunners(FeatureRunner.java:81)
... 20 more
@AnilKumar345 This is an issue tracker. Please ask for help in a support forum. Also, please provide additional information (i.e. which version of Cucumber do you use, what is the code of your runner?)
Thanks for your reply
I am using the following dependencies, Can you please suggest me which version is supports all the cucumber functionalities?
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.1.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm</artifactId>
<version>1.2.5</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.1.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
@AnilKumar345 Please find installation info in the docs
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Found related discussion: only fail if the outline value contain DOT
http://stackoverflow.com/questions/25174141/could-not-generate-test-report-in-gradle-due-to-cucumber-step-syntax