Comments (9)
@purnimashanti I'm not exactly sure if I'm understanding you right, but if you're talking about the code snippet commented by me above, your configuration should look like this:
cucumberReports {
outputDir = file('html-report')
buildId = '0'
reports = files('target/cucumber/cucumber.json')
testTasksFinalizedByReport = false
}
from gradle-cucumber-reporting.
@purnimashanti Yes, that would be the correct way, causing the reports to be generated after the tests are run.
from gradle-cucumber-reporting.
@purnimashanti Well, have you checked if there is actually a cucumber report file target/cucumber/cucumber.json
? That's a somewhat uncommon path, because target/
is usually used by Maven, while Gradle uses build/
to store such files.
from gradle-cucumber-reporting.
Hi, I changed the path to target/cucumber/cucumber.json and it's working. Thanks.
from gradle-cucumber-reporting.
You can avoid the error by adding testTasksFinalizedByReport = false
to your cucumber reports configuration, so the reports are not generated automatically after running a test.
Then, you can manually attach them to your cucumber test task via yourCucumberTestTask.finalizedBy(generateCucumberReports)
so they will only run after cucumber tests.
from gradle-cucumber-reporting.
Works like a charm, thanks alot for the tip :)
Nikhil
from gradle-cucumber-reporting.
Hi, I am having the same issue. I am new to gradle. Could someone help me on how to add these lines in build.gradle?.
My task looks like this :
test { testLogging { events "passed", "skipped", "failed" exceptionFormat "full" } doFirst { delete testResultsDir } useTestNG() scanForTestClasses = false }
cucumberReports { outputDir = file('html-report') buildId = '0' reports = files('target/cucumber/cucumber.json') }
from gradle-cucumber-reporting.
I am not sure how to use this yourCucumberTestTask.finalizedBy(generateCucumberReports)
Do I have to specify it like this :
`test {
useTestNG()
scanForTestClasses = false
}
test.finalizedBy(generateCucumberReports)`
from gradle-cucumber-reporting.
Hi, I still have the same issue. I am running gradle clean build.
18:28:42 > Task :compileTestJava
18:28:42 Note: /home/jenkins-slave/workspace/Nrem API tests/src/test/java/com/thales/library/common/ExcelLibrary.java uses unchecked or unsafe operations.
18:28:42 Note: Recompile with -Xlint:unchecked for details.
18:28:42
18:28:42 > Task :processTestResources
18:28:42 > Task :testClasses
18:28:44 > Task :test
18:28:44
18:28:44 > Task :generateCucumberReports FAILED
18:28:44 Reports file /home/jenkins-slave/workspace/Nrem API tests/target/cucumber/jsonreports/cucumber.json not found
18:28:44 No report files found, aborting...
18:28:44
18:28:44 FAILURE: Build failed with an exception.
18:28:44
18:28:44 * What went wrong:
18:28:44 Execution failed for task ':generateCucumberReports'.
18:28:44 > No test files found
18:28:44
18:28:44 * Try:
18:28:44 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
18:28:44
18:28:44 * Get more help at https://help.gradle.org
from gradle-cucumber-reporting.
Related Issues (18)
- All test suites are finalizedBy your reporting task HOT 2
- Cucumber Reporting Trends Statistic HOT 2
- Report generation on build failure. HOT 7
- Skipped scenarios are marked as failed HOT 1
- How to skip some Gradle task to avoid the report generation failed? HOT 1
- Gradle build fail HOT 2
- Why my Screenshot attach on hooks ? HOT 2
- document the jdk versions used per plugin version HOT 2
- Consolidate all reports into one location HOT 3
- Is there a way to have the plugin generate an `index.html`? HOT 7
- How to support ReducingMethod.MERGE_FEATURES_BY_ID? HOT 2
- output json file to use in jenkins reporting
- Getting Error while trying to run plugin with AWS Codebuild job HOT 4
- Publish new version to Gradle plugin portal HOT 1
- damianszczepanik/cucumber-reporting change Configuration class HOT 3
- Failed to apply plugin HOT 2
- Option to specify the report name HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-cucumber-reporting.