public class RestartableJenkinsRule extends Object implements org.junit.rules.MethodRule
To use this, add this rule instead of JenkinsRule to the test,
then from your test method, call step(Closure) or addStep(Statement) repeatedly.
The rule will evaluate your test method to collect all steps, then execute them in turn and restart Jenkins in between.
JenkinsRule| Modifier and Type | Class and Description |
|---|---|
static interface |
RestartableJenkinsRule.Step
One step to run, intended to be a SAM for lambdas with
then(org.jvnet.hudson.test.RestartableJenkinsRule.Step). |
| Modifier and Type | Field and Description |
|---|---|
File |
home
JENKINS_HOME
|
JenkinsRule |
j |
| Constructor and Description |
|---|
RestartableJenkinsRule() |
| Modifier and Type | Method and Description |
|---|---|
void |
addStep(org.junit.runners.model.Statement step) |
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runners.model.FrameworkMethod method,
Object target) |
protected JenkinsRule |
createJenkinsRule(org.junit.runner.Description description) |
void |
step(groovy.lang.Closure c) |
void |
then(RestartableJenkinsRule.Step s)
Run one Jenkins session and shut down.
|
public JenkinsRule j
public File home
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runners.model.FrameworkMethod method,
Object target)
apply in interface org.junit.rules.MethodRulepublic void step(groovy.lang.Closure c)
public void then(RestartableJenkinsRule.Step s)
public void addStep(org.junit.runners.model.Statement step)
protected JenkinsRule createJenkinsRule(org.junit.runner.Description description)
Copyright © 2004-2017. All Rights Reserved.