-
Notifications
You must be signed in to change notification settings - Fork 7
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:
-
Install the following Jenkins plugins:
- JUnit Plugin
- JUnit Attachments plugin (to view screenshots and HAR files for each test)
- Xvfb plugin
-
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.
- 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
- Create a new project in Jenkins to run your tests from
- Setup source control to checkout your PizzaScript automation scripts
- Under build environment select 'Start Xvfb before the build, and shut it down after.'
-
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.
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.
After your projects executes, you should get results like so: