Class FallbackConfig

java.lang.Object
com.google.inject.AbstractModule
org.jenkinsci.test.acceptance.FallbackConfig
All Implemented Interfaces:
com.google.inject.Module

public class FallbackConfig extends com.google.inject.AbstractModule
The default configuration for running tests.

See Config for how to override it.

Author:
Kohsuke Kawaguchi
  • Field Details

  • Constructor Details

    • FallbackConfig

      public FallbackConfig()
  • Method Details

    • configure

      protected void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule
    • getBrowserDisplay

      @CheckForNull public static String getBrowserDisplay()
      Get display number to run browser on.

      Custom property BROWSER_DISPLAY has the preference. If not provided DISPLAY is used.

    • createWebDriver

      @Provides @TestScope public org.openqa.selenium.WebDriver createWebDriver(TestCleaner cleaner, TestName testName, ElasticTime time) throws IOException
      Creates a WebDriver for each test, then make sure to clean it up at the end.
      Throws:
      IOException
    • getElasticTime

      @Provides public ElasticTime getElasticTime()
    • createController

      @Provides @TestScope public JenkinsController createController(com.google.inject.Injector injector, com.cloudbees.sdk.extensibility.ExtensionList<JenkinsControllerFactory> factories) throws IOException
      Instantiates a controller through the "TYPE" attribute and JenkinsControllerFactory.
      Throws:
      IOException
    • createJenkins

      @Provides @TestScope public Jenkins createJenkins(com.google.inject.Injector injector, JenkinsController controller)
    • getQuite

      @Provides @Named("quite") public boolean getQuite()
      Returns whether Jenkins should be quite and should not report any logging information.
      Returns:
      true if Jenkins should be quite during the tests
    • getWorkspace

      @Provides @Named("WORKSPACE") public String getWorkspace()
      directory on the computer where this code is running that points to a directory where test code can place log files, cache files, etc. Note that this directory might not exist on the Jenkins master, since it can be running on a separate computer.
    • getSocket

      @Provides @Named("socket") public File getSocket()
      Name of the socket file used to communicate between jut-server and JUnit. See docs/PRELAUNCH.md
      Returns:
      the name of the socket
      See Also:
    • getJenkinsWar

      @Provides @Named("jenkins.war") public File getJenkinsWar(org.eclipse.aether.RepositorySystem repositorySystem, org.eclipse.aether.RepositorySystemSession repositorySystemSession)
      Get the file with Jenkins to run.

      The file will exist on machine where tests run.

    • createExercisedPluginReporter

      @Provides @Named("ExercisedPluginReporter") public ExercisedPluginsReporter createExercisedPluginReporter()
      Provides a mechanism to create a report on which plugins were used during the test execution
      Returns:
      An ExercisedPluginReporter based on env var EXERCISEDPLUGINREPORTER