Skip to content

Jenkins Setup

Mark Watson edited this page Oct 7, 2016 · 6 revisions

With Jenkins you can setup PizzaScript to run CI performance tests.

The procedure is as follows:

Jenkins Setup

  • Install the following Jenkins plugins:

  • The Xvfb plugin requires Xvfb to be installed, and it's location specified under the plugin configuration in Jenkins. See the Xvfb plugin page for details.

PizzaScript Setup

  • Download and install PizzaScript to the Jenkins machine that will run the project.
cd ~
unzip pizzascript-0.2.6.zip
sudo cp -TRf pizzascript-0.2.6 /opt/pizzascript-0.2.6
sudo ln -s /opt/pizzascript-0.2.6/bin/pizzascript /usr/local/bin/pizzascript

Add a new Jenkins Project

  • Create a new project in Jenkins to run your tests from
  • Setup source control to checkout your PizzaScript automation scripts

Jenkins Build Settings

  • Under build environment select 'Start Xvfb before the build, and shut it down after.'

Jenkins Build Settings

  • Click 'Advanced...' under Xvfb

    • Make sure 'Let Xvfb choose display name' is selected
    • Set 'Timeout in seconds' to '5'
    • Set 'Xvfb display name offset' to '1'
  • Add a build step to run your scripts. The --junit flag tells PizzaScript to export a JUnit test summary. --output specifies the output directory. -t 90 specifies a 90 seconds timeout for each test.

Jenkins Build Settings

pizzascript scripts --junit --output results -t 90
  • Add the post build step "Publish JUnit test result report".
  • Set the "Test report XMLs" to "results/junit.xml"
  • Under "Additional test report features", click 'Add' and add a "Publish test attachments" step.

Running

After your projects executes, you should get results like so:

Jenkins Build Settings Jenkins Build Settings

Clone this wiki locally