Package org.jvnet.hudson.test
Class GroovyJenkinsRule
java.lang.Object
org.jvnet.hudson.test.JenkinsRule
org.jvnet.hudson.test.GroovyJenkinsRule
- All Implemented Interfaces:
hudson.ExtensionPoint
,hudson.model.Action
,hudson.model.ModelObject
,hudson.model.RootAction
,org.junit.rules.MethodRule
,org.junit.rules.TestRule
JenkinsRule
variant with special options for tests written in Groovy.- Since:
- 1.535
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jvnet.hudson.test.JenkinsRule
JenkinsRule.BreakException, JenkinsRule.DummySecurityRealm, JenkinsRule.JSONWebResponse, JenkinsRule.TestBuildWrapper, JenkinsRule.WebClient
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class org.jvnet.hudson.test.JenkinsRule
computerConnectorTester, contextPath, env, homeLoader, hudson, jenkins, jsDebugger, localPort, NO_PROPERTIES, recipes, server, SLAVE_DEBUG_PORT, tearDowns, testDescription, timeout, useLocalPluginManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionhudson.tasks.Builder
builder
(groovy.lang.Closure<?> c) Wraps a closure as aBuilder
.executeOnServer
(groovy.lang.Closure<?> c) Executes the given closure on the server, in the context of an HTTP request.Methods inherited from class org.jvnet.hudson.test.JenkinsRule
_configureJenkinsForTest, _configureUpdateCenter, _configureUserRealm, _createWebAppContext2, _createWebAppContext2, _stopJenkins, after, apply, apply, assertAllImageLoadSuccessfully, assertBuildStatus, assertBuildStatus, assertBuildStatusSuccess, assertBuildStatusSuccess, assertEqualBeans, assertEqualDataBoundBeans, assertEqualDataBoundBeans, assertGoodStatus, assertHelpExists, assertLogContains, assertLogNotContains, assertStringContains, assertStringContains, assertXPath, assertXPath, assertXPathResultsContainText, assertXPathValue, assertXPathValueContains, before, buildAndAssertStatus, buildAndAssertSuccess, buildAndAssertSuccess, configRoundtrip, configRoundtrip, configRoundtrip, configRoundtrip, configRoundtrip, configRoundtrip, configRoundtrip, configureUpdateCenter, configureUserRealm, createApiToken, createComputerLauncher, createDummySecurityRealm, createFolder, createFreeStyleProject, createFreeStyleProject, createLocalLauncher, createOnlineSlave, createOnlineSlave, createOnlineSlave, createPretendSlave, createProject, createProject, createSlave, createSlave, createSlave, createSlave, createSlave, createSlave, createSlave, createTaskListener, createTmpDir, createUniqueProjectName, createWebClient, createWebServer2, createWebServer2, disconnectSlave, executeOnServer, findDataBoundConstructor, findPreviousInputElement, get, getButtonByCaption, getDisplayName, getIconFileName, getInstance, getJSON, getLog, getPluginManager, getTestDescription, getURL, getUrlName, getWebAppRoot, interactiveBreak, isGoodHttpStatus, isSomethingHappening, last, newHudson, pause, postJSON, recipe, recipeLoadCurrentPlugin, search, setPluginManager, setQuietPeriod, showAgentLogs, showAgentLogs, submit, submit, waitForCompletion, waitForMessage, waitOnline, waitUntilNoActivity, waitUntilNoActivityUpTo, with, with, withExistingHome, withNewHome, withPresetData, writeReplace
-
Constructor Details
-
GroovyJenkinsRule
public GroovyJenkinsRule()
-
-
Method Details
-
executeOnServer
Executes the given closure on the server, in the context of an HTTP request. This is useful for testing some methods that requireStaplerRequest2
andStaplerResponse2
.The closure will get the request and response as parameters.
- Throws:
Exception
-
builder
public hudson.tasks.Builder builder(groovy.lang.Closure<?> c) Wraps a closure as aBuilder
.
-