doc update
This commit is contained in:
parent
c92281abcd
commit
edf89c9427
|
@ -24,9 +24,13 @@ on the [Selenium Test
|
|||
Cases](https://wiki.jenkins-ci.org/display/JENKINS/Selenium+Test+Cases) page on
|
||||
the Jenkins wiki
|
||||
|
||||
For historical reasons, there are older tests that are written for `test/unit` (in the `test` directory)
|
||||
and newer tests that are written for cucumber (in the `features` directory.)
|
||||
|
||||
## Running tests
|
||||
|
||||
## What running tests looks like
|
||||
To run the test, `JENKINS_WAR=path/to/your/jenkins.war bundle exec rake`. This will run both
|
||||
the older `test/unit` tests as well as cucumber tests in one go.
|
||||
|
||||
There is a bit of a delay since we bring up Jenkins for every single test, with
|
||||
it's own sandboxed workspace as well:
|
||||
|
@ -34,3 +38,20 @@ it's own sandboxed workspace as well:
|
|||
![](http://strongspace.com/rtyler/public/selenium-jenkins.png)
|
||||
|
||||
|
||||
### Choosing the JenkinsController
|
||||
This test harness has an abstraction called `JenkinsController` that allows you to use different logic
|
||||
for starting/stopping Jenkins. We use this to reuse the same set of tests for testing stand-alone `jenkins.war`
|
||||
to testing packages.
|
||||
|
||||
See [the source code](tree/master/lib/controller/) for the list of available controllers. If you see a line like
|
||||
`register :remote_sysv`, that means the ID of that controller is `remote_sysv`.
|
||||
|
||||
To select a controller, run the test with the 'type' environment variable set to the controller ID, such as:
|
||||
`type=remote_sysv bundle exec rake`. Controllers take their configurations from environment variables. Again,
|
||||
see the controller source code for details until we document them here.
|
||||
|
||||
### Running one test
|
||||
You can run a single cucumber test by pointing to a test scenario in terms of its file name and line number like
|
||||
`bundle exec cucumber features/freestyle_build.feature:6`
|
||||
|
||||
If someone knows how to run a single `test/unit` test case, please update this document.
|
||||
|
|
Loading…
Reference in New Issue