Question

I'm currently running a a build job on Jenkins that generates a bunch of CUnit testing exes. What I'd like to do is take those binaries and run them automatically on a bunch of other machines upon successful completion of the build.

For example: Run the build -> success -> trigger copy of EXEs to other machines -> run said EXEs -> gather output.

My question is whether or not this is possible to automate with jenkins? I'm not entirely sure the direction I should be going in. My best guess is to configure a bunch of other jobs that will trigger on successful completion of the Build job. These jobs will retrieve the files in question from somewhere, run them, and report back.

Any input would be greatly appreciated.

Was it helpful?

Solution

In the post-build actions of your build job, mark the generated executables as artifacts, then you can use the Copy Artifact plugin to distribute the test executables to another test job (or more than one) that runs a Jenkins build slave on the test machine(s). As you've mentioned, you can configure a successful build to trigger the test jobs. Based on other answers, it looks like CUnit generates an XML report of the test output that Jenkins can parse, so in the test job's post-build actions, configure the location of the test results.

From a management perspective, it is easier if there is one test job because you don't have to figure out how to partition the executables and you can read the results in one report. But depending on your use case, it might make more sense to have separate test jobs if the tests require different environments or if it makes sense to partition the test results.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top