Class JenkinsSessionRule

java.lang.Object
org.jvnet.hudson.test.JenkinsSessionRule
All Implemented Interfaces:
org.junit.rules.TestRule

public class JenkinsSessionRule extends Object implements org.junit.rules.TestRule
This is the JUnit 4 implementation of JenkinsSessionFixture. Usage:

 @Rule
 public final JenkinsSessionRule jenkinsSession = new JenkinsSessionRule();
 
See Also:
  • Constructor Details

    • JenkinsSessionRule

      public JenkinsSessionRule()
  • Method Details

    • getHome

      public File getHome()
      Get the Jenkins home directory, which is consistent across restarts.
    • apply

      public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
      Specified by:
      apply in interface org.junit.rules.TestRule
    • then

      public void then(JenkinsSessionRule.Step s) throws Throwable
      Run one Jenkins session and shut down.
      Throws:
      Throwable