A project to flesh out some of the manual test cases for Jenkins LTS in an automated fashion.
Following areas are still worked on:
- Vagrant-based
JenkinsController
implementations
master | stable |
---|---|
Let's start by running tests locally with JENKINS_WAR=path/to/your/jenkins.war mvn test
.
This runs the entire test suite with the specified Jenkins war and Firefox, so it will take a while.
Set BROWSER=chrome
and install http://code.google.com/p/chromedriver/downloads/list in $PATH
if desired. (But tests may fail.)
There is a bit of a delay since we bring up Jenkins for every single test, with it's own sandboxed workspace.
All executed tests are screen recorded by default, but only videos of failing tests are persited to target
directory.
By default, video file is named with the fully qualified test class name, minus sign (-) and the test method name.
You can configure what is persisted by using an environment variable or a Java system property called RECORDER
.
Possible values are:
- off
- failuresOnly
- always
Java system property takes precedence over environment variable.
- Selecting browser
- Selecting how to launch Jenkins under test (JUT)
- Running one test
- Using a http proxy
- Prelaunch JUT
- Obtaining a report of plugins that were exercised
- Testing unreleased plugin
- Investigation
- Selecting tests based on plugins they cover (TODO)
-
Writing tests
- Video tutorial by Kohsuke on how to write tests
- Writing JUnit test
- Writing tests with Geb and Spock
- Writing Cucumber test (TODO)
-
explain how cucumber hooks into Guice (TODO)