Closed albloptor closed 2 years ago
You're right, it should be possible to have more than one root.
I will look into it.
Hi @albloptor , I fixed this issue... but I noticed that the current version of spock-reports already allows you to provide multiple roots by separating the paths with the File.pathSeparator
which is ;
on Windows and :
on other OSs.
Hey, thanks for taking care of it so fast. That current solution wasn't obvious to me. I'll try it! What would be the alternative approach given your new solution?
I've just released spock-reports 2.2.0-groovy-3.0
on Maven Central which contains this fix.
As I explained in the news, you can now use String
, File
, Closure
producing one of the other types, or Iterable
whose items are of the other types.
Example:
testSourceRoots = ['src/test/groovy', 'src/testInt/groovy']
testSourceRoots = file('src/test/groovy')
// compute the roots lazily
testSourceRoots = {
file(someLazyProperty)
}
Some projects use two separate test sourceSets. In my case, I use
test
for unit tests andintegrationTest
. In both cases, I use Spock.Currently, the property
com.athaydes.spockframework.report.testSourceRoots
only seems to support a single value, which means that it's not possible to display the sources in the reports for both unit and integration tests.I've tried setting the property to
src
, which didn't work. And I believe that would have defeated the purpose of having the property.In my opinion it would be great to support a list of test sources rather than a single one. This could be useful for people that use Spock for different kind of tests.