Open rjclancy opened 10 months ago
Yes, that should work... if not, can you try the SpockConfig.groovy
file as shown here?
Notice that this property is only used to include the source code in the reports:
# Set the root location of the Spock test source code (only used if showCodeBlocks is 'true')
com.athaydes.spockframework.report.testSourceRoots=src/test/groovy
Is this your problem? Or are you trying to get Spock to find your actual tests? If that's the case, then you need to change your groovy config.
Thanks @renatoathaydes. Yup, I just want to generate reports for tests within my src/test/groovy/integration dir exclude everything else in src/test/groovy..
So, tests are executed but no reports are generated?
So, tests are executed but no reports are generated?
All my tests are executed. I just would like to generate the Spock report for a specific directory.
src/main/groovy/service: don't care
src/main/groovy/integration: do care
spock-reports is called by Spock for each test that runs, there's no way to exclude tests from reports.
I'm trying to target a specific test directory i.e sec/main/groovy/.../integration that I would like to generate my reports but overriding this in my build gradle doesn't work
test System Property: com.athaydes.spockframework.report.testSourceRoots=src/test/groovy
Is this the correct approach?