-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine reports in multi-module maven setup #86
Comments
Hi. I've done something like this at work... But doing so requires an external tool, like a Maven/Gradle plugin because, as an extension of Spock, spock-reports is limited to one module (in my case, I wrote a Groovy script that gets called by GMaven from Maven). spock-reports exposes lots of information about all Specifications it ran in a json file (easy to parse). Look at the spock-reports directory, there should be a file called It looks like this: {
"com.acme.MySpec": {
"executedFeatures": [
"Regex can replace value in String"
],
"ignoredFeatures": [],
"stats": {
"failures": 0,
"errors": 1,
"skipped": 0,
"totalRuns": 1,
"successRate": 0.0,
"time": 106
}
},
"com.acme.OtherSpecification": {
"executedFeatures": [
"Some other feature"
],
"ignoredFeatures": [],
"stats": {
"failures": 0,
"errors": 1,
"skipped": 0,
"totalRuns": 1,
"successRate": 0.0,
"time": 135
}
},
...
} Linking to the individual reports is very easy: just copy the name of the spec (eg. The general report for the module is called |
Hi @renatoathaydes do you think providing an option to prefix index.html with the module name is a good option? |
@sskjames something like that could work... I guess we just need to try and see what is needed. |
That's great. Thank you very much for creating this extension. |
@sskjames my pleasure :) it's good to know people appreciate it. |
Just a hint: for one multi-module project I just specified the output-dir to point to the parent project. Using the following in a profile of the project parent-pom, this stuff is only included when there are spock tests at all:
|
I would know the status of this work. I am facing the same issue that the application has a lot of plugins which are submodules. Spock report could not be generated into the target folder of those modules. How come? |
@ntung what do you mean? Multi-module Maven module reports should work... This issue is about combining multiple reports from sub-modules into one... Is that what you say is not working? |
Hi,
As an enhancement, could we configure spock-reports to generate a main report for a multi-module project?
It could either itself contain all the results or link to the results of sub-modules.
In my case the need arises because I am slowly migrating tests over to spock and they are strewn all over the show at the moment.
The text was updated successfully, but these errors were encountered: