I opened this in a github issue, but that probably wasn't the correct place for it. I am trying to use the parallel test executor based on the example given here: https://jenkins.io/blog/2016/06/16/parallel-test-executor-plugin/ but I can't actually figure out how to provide the list of tests to the plugin itself. I looked at another issue where it looked like someone was using a pom.xml to include tests, but my project is not strictly a java project and has no such file. Is there a way to supply an initial list of tests or to provide tests from anything other than a pom.xml?
More specifically, currently we gather an array of test names to run dynamically from from a rest endpoint in our pipeline based on the changes made to the code set. We then collate these tests into test batches with no real logic or run time analysis, and then use parallel stages and a custom test executor to run these tests, save the results, and push the results to Jenkins as JUnit compatible XML with the JUnit Plugin. This allows us to take advantage of the Jenkins test view to see our test results, run times, and passes/failures for each build, and feels like it should (hopefully) provide us with all the results we would need to then use the Parallel Test Executor to enhance the collating of these test batches. So is there a way from here to actually just hand the Parallel Test Executor our array of tests to run, have it work its magic based on previous runtimes for these tests, and give me back some collated test batches based on previous run times, or is this plugin the wrong tool for this job?
If this plugin is the right tool for this job, so far I have this basic template function which previously had the brainless collate logic:
def createTestDistribution(tests, batchSize) {
def splits = splitTests parallelism: [$class: 'CountDrivenParallelism', size: batchSize], generateInclusions: true
println "${splits}"
return splits.findAll{ it.includes }.collect{ it.splits }
}
How can I modify this to feed a list of tests into and get a list of tests out of the plugin? (Though maybe the out of part is correct already. I'm not really sure.)