allure-gradle
allure-gradle copied to clipboard
Aggregated report generation fails in case of module without tests
I'm submitting a ...
- [x] bug report
- [ ] feature request
- [ ] support request => Please do not submit support request here, see note at the top of this template.
What is the current behavior?
I am trying to generate aggregated report for multi-module project using the following task:
task allureAggregatedReport(type: AllureReport) {
resultsDirs = subprojects.allure.resultsDir
}
but one of the modules currently has no tests and report generation fails:
> Task :allureAggregatedReport
Could not parse arguments: invalid Default parameter: directory /Users/charlie/projects/allure2/plugins/custom-logo-plugin/build/allure-results should exists
Generate the report
Usage: generate [options] The directories with allure results
Options:
-c, --clean
Clean Allure report directory before generating a new one.
Default: false
--profile
Allure commandline configuration profile.
-o, --report-dir, --output
The directory to generate Allure report into.
Default: allure-report
What is the expected behavior?
Report generated successfully.
Please tell us about your environment:
| Allure version | 2.1.1 |
|---|---|
| Generate report using | [email protected] |
Possible workaround:
task allureAggregatedReport(type: AllureReport)
//before task execution choose only existed folders
allureAggregatedReport.doFirst {
resultsDirs = []
subprojects.allure.resultsDir.each {
if (file(it).exists){
resultsDirs += it
}
}
}
task allureAggregatedReport(type: AllureReport) { resultsDirs = subprojects.allure.resultsDir }
Where exactly are you passing this code.....under hooks in config file or somewhere else?... malso trying to get aggregated results
I believe this is fixed with https://github.com/allure-framework/allure-gradle/pull/61
Please feel free to try it and provide feedback.
Resolved in #61