Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins: Running remote test scripts and reporting results

I'm trying to take Jenkins from a CI machine, and I would like to have it begin to automatically start testing of the applications it builds.

My setup is this:

  • 1 central build server
  • 8 dedicated test machines.

Currently when build is finished (and label applied), we manually walk around, install the new build, and begin the tests. The tests each take 8-24 hours, so running them in parallel is pretty necessary. Later on, we walk around and see the results.

I'd like to automate:

  • Distribution of the build
  • Installation of the program
  • Beginning of the test scripts
  • Collection of the data.

I'm assuming I can use Jenkins for all of this, but I haven't been able to find a good / easy tutorial that tells me how to do this. I'm sure it involves installing the 'slave' service on all the test machines, but the instructions for even that don't seem to be working very well.

Any ideas for a good tutorial? Any pointers from all of you? Thanks!

like image 825
DanTheMan Avatar asked Feb 24 '11 21:02

DanTheMan


People also ask

What is Jenkins reporting and how to publish Jenkins reports?

Jenkins reporting capabilities depend on the third-party plugins, and we can integrate multiple reporting plugins on a need basis. Reports are basically the structured as well as a graphical way to produce our execution results of tests. To publish JUnit Test result reports, JUnit Plugin needs to be installed on Jenkins.

How do I run selenium on a remote Jenkins server?

Jenkins - Remote Testing. Web tests such as selenium tests can be run on remote slave machines via the master slave and selenium suite plugin installation. The following steps show how to run remote tests using this configuration. Step 1 − Ensure your master slave configuration is in place. Go to your master Jenkins server.

What is Jenkins for automated testing?

If you have a product to implement it. Then you need a method to test it. This method is called Jenkins. Additionally, It was software that has a free automation server. also, the software is working officially. Jenkins for automated testing of your product.

How do I link ScriptWorks results with a Jenkins build?

Two useful options for linking Scriptworks results with a Jenkins Build and displaying results in Jenkins are shown below: The Run Name feature in Scriptworks can be useful as a way of linking results in the Scriptworks Dashboard with a Jenkins Build for analysis purposes:


2 Answers

Since your builds are done on the master, I'm assuming you are going to require this:

http://wiki.jenkins-ci.org/display/JENKINS/Copy+To+Slave+Plugin

I would try something like this:

  • Create Job # 1 that builds your application/program/library/whatever else.

  • Create Job #2

    • Use this job and the above plugin to copy over the resultant files over to the test slave
    • Use this job to install the artifacts that were copied over by job #1 using the "Windows Batch Command" build step.
    • Use this job to run your tests
  • Use the "Build other projects" option under "Post build actions" in Job #1 to trigger Job #2. This can be a multi-configuration project, so you can pick multiple slaves for it.

This way, anytime you start Job #1, and it is successful, #2 will be triggered, and it will copy over files, install them, and start the test.

Two things I've assumed here: your software can be installed via command line, and that it can be installed without human intervention, or at least using some sort of script.

like image 94
Sagar Avatar answered Oct 11 '22 00:10

Sagar


You might also find Jenkins/Hudson creator Kohsuke Kawaguchi's new white paper helpful... 7 Ways to Optimize Jenkins

like image 3
lwells Avatar answered Oct 11 '22 01:10

lwells