Class AbstractJUnitTest

java.lang.Object
org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
org.jenkinsci.test.acceptance.junit.AbstractJUnitTest
All Implemented Interfaces:
CapybaraPortingLayer
Direct Known Subclasses:
AbstractCredentialsTest, AbstractPipelineTest

public class AbstractJUnitTest extends CapybaraPortingLayerImpl
Convenience base class to derive your plain-old JUnit tests from.

It provides a number of convenience methods, and sets up the correct test runner.

Author:
Kohsuke Kawaguchi
  • Field Details

    • rules

    • jenkins

      @Inject public Jenkins jenkins
      Jenkins under test.
    • supportBundle

      public SupportBundle supportBundle
    • driver

      @Inject public org.openqa.selenium.WebDriver driver
      This field receives a valid web driver object you can use to talk to Jenkins.
  • Constructor Details

    • AbstractJUnitTest

      public AbstractJUnitTest()
  • Method Details

    • findAvailablePort

      public int findAvailablePort()
      Returns:
      finds an unused, available port on the test machine
    • interrupt

      protected void interrupt()
    • injectSpec

      public void injectSpec()