Package org.jenkinsci.test.acceptance
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
createController
(com.google.inject.Injector injector, com.cloudbees.sdk.extensibility.ExtensionList<JenkinsControllerFactory> factories) Instantiates a controller through the "TYPE" attribute andJenkinsControllerFactory
.Provides a mechanism to create a report on which plugins were used during the test executioncreateJenkins
(com.google.inject.Injector injector, JenkinsController controller) org.openqa.selenium.WebDriver
createWebDriver
(TestCleaner cleaner, TestName testName, ElasticTime time) Creates aWebDriver
for each test, then make sure to clean it up at the end.static String
Get display number to run browser on.getJenkinsWar
(org.eclipse.aether.RepositorySystem repositorySystem, org.eclipse.aether.RepositorySystemSession repositorySystemSession) Get the file with Jenkins to run.boolean
getQuite()
Returns whether Jenkins should be quite and should not report any logging information.Name of the socket file used to communicate between jut-server and JUnit.directory on the computer where this code is running that points to a directory where test code can place log files, cache files, etc.Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Field Details
-
DOM_MAX_SCRIPT_RUN_TIME
- See Also:
-
DOM_MAX_CHROME_SCRIPT_RUN_TIME
- See Also:
-
DOM_DISABLE_BEFOREUNLOAD
- See Also:
-
PAGE_LOAD_TIMEOUT
public static final int PAGE_LOAD_TIMEOUT- See Also:
-
IMPLICIT_WAIT_TIMEOUT
public static final int IMPLICIT_WAIT_TIMEOUT- See Also:
-
-
Constructor Details
-
FallbackConfig
public FallbackConfig()
-
-
Method Details
-
configure
protected void configure()- Overrides:
configure
in classcom.google.inject.AbstractModule
-
getBrowserDisplay
Get display number to run browser on.Custom property
BROWSER_DISPLAY
has the preference. If not providedDISPLAY
is used. -
createWebDriver
@Provides @TestScope public org.openqa.selenium.WebDriver createWebDriver(TestCleaner cleaner, TestName testName, ElasticTime time) throws IOException Creates aWebDriver
for each test, then make sure to clean it up at the end.- Throws:
IOException
-
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 andJenkinsControllerFactory
.- 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
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
Name of the socket file used to communicate between jut-server and JUnit. Seedocs/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
-