question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not generate test report because of outline examples

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
mrduguocommented, Apr 17, 2016
1reaction
mrduguocommented, Apr 17, 2016

Created sample project gradle-cucumber-jvm-issue-972 to reproduce:

git clone https://github.com/mrduguo/gradle-cucumber-jvm-issue-972.git

./gradlew
Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle with Cucumber..Report Generation failed - Help/Discuss
Hi,. Gradle Reports are getting failed as Dot (“.”) is present in cucumber feature file? Scenario Outline: Jobs Page
Read more >
Cucumber cannot generate tests for scenario outline
I'm currently writing some tests usig cucumber, and I would like to use scenario outlines. However, I did not manage to make them...
Read more >
Gherkin Reference - SpecFlow's documentation
Background. Scenario Outline (or Scenario Template ). Examples ... If your unit test framework does not support categories, you can still use tags...
Read more >
Execute Tests - Confluence Mobile - Xray Documentation
A scenario outline test is TODO if at least one of the examples did not run and all the other examples passed or...
Read more >
Parameterize BDD Tests | TestComplete Documentation
If you don't know whether a parameter will be a string or a number, use quotes. Now let's create script code for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found