Skip to content
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

Supplying a dynamic list of tests #105

Open
PikaChokeMe opened this issue Mar 6, 2020 · 0 comments
Open

Supplying a dynamic list of tests #105

PikaChokeMe opened this issue Mar 6, 2020 · 0 comments

Comments

@PikaChokeMe
Copy link

Is there a way to supply an initial list of tests or to provide tests from anything other than a pom.xml?
We gather a list of tests to run dynamically from a separate system in our pipeline. We use a custom test executor and save the results of these tests and push them to Jenkins as JUnit compatible XML.

I would like to be able to feed the separate dynamic list of required tests to the plugin, then have it look at previous build results and run times, if such a thing exists, and then build my list/batches of tests.

I'm trying to follow the blog post here: https://jenkins.io/blog/2016/06/16/parallel-test-executor-plugin/

and so far I have this basic template function which just had some pretty standard collate logic, which I've now ripped apart to try to use this plugin

def createTestDistribution(tests, batchSize) {
  def splits = splitTests parallelism: [$class: 'CountDrivenParallelism', size: batchSize], generateInclusions: true
  println "${splits}"

  return splits.findAll{ it.includes }.collect{ it.splits }
}

Which I feel like should be more than suitable for my purposes, but I have no idea what to do with my initial array of tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant