allure-gradle icon indicating copy to clipboard operation
allure-gradle copied to clipboard

Aggregated report generation fails in case of module without tests

Open baev opened this issue 8 years ago • 3 comments

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]

baev avatar Jun 19 '17 15:06 baev

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
        }
    }
}

Ostryak avatar May 22 '19 12:05 Ostryak

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

grpratap69 avatar Dec 24 '19 06:12 grpratap69

I believe this is fixed with https://github.com/allure-framework/allure-gradle/pull/61

Please feel free to try it and provide feedback.

vlsi avatar Apr 27 '21 17:04 vlsi

Resolved in #61

vlsi avatar Sep 14 '22 20:09 vlsi