I've got a multi-module android project, with unit tests distributed out amongst the various library modules. I've added the io.qameta.allure-adapter plugin to my app module, and all my library modules, and my top-level module has the io.qameta.allure-aggregate-report plugin applied. When I run :allureAggregateReport however I get a bunch of errors about missing configurations:
> Could not resolve all task dependencies for configuration ':allureGenerateCategories'.
> Could not resolve project :core.
Required by:
project :
> No matching configuration of project :core was found. The consumer was configured to find attribute 'io.qameta.allure' with value 'COPY_CATEGORIES' but:
- None of the consumable configurations have attributes.
> Could not resolve project :feature.
Required by:
project :
> No matching configuration of project :feature was found. The consumer was configured to find attribute 'io.qameta.allure' with value 'COPY_CATEGORIES' but:
- None of the consumable configurations have attributes.
> Could not resolve project :onscene.
Required by:
project :
> The consumer was configured to find attribute 'io.qameta.allure' with value 'COPY_CATEGORIES'. However we cannot choose between the following variants of project :onscene:
- devDebugRuntimeElements
- devReleaseRuntimeElements
- flankDebugRuntimeElements
- prodDebugRuntimeElements
- prodReleaseRuntimeElements
- qaDebugRuntimeElements
- qaReleaseRuntimeElements
All of them match the consumer attributes:
....
Is there any way to get this working?
So, aggregation appears to not be the way to go here.
With allure already working in my test module, I added allure to my library projects. When I run the tests, it generates
build/allure-resultsfor each of my modules.I then finalize the
testDebugUnitTesttask in my library projects with a task that renames thebuild/allure-resultsto add the module as a prefix.Then in my test project, in my
dependencies {}, I do:This adds the results for each module as a separate suite when I run
:test:allureReport. The only downside is thattestDebugUnitTesthas to be run as a separate./gradlewcommand, so that the -allure-results folders exist during the configuration when:test:allureReportis run.