Package org.jenkinsci.test.acceptance.po
Class Build
-
- All Implemented Interfaces:
CapybaraPortingLayer
- Direct Known Subclasses:
MatrixBuild
,MatrixRun
,MavenBuild
,MavenModuleBuild
public class Build extends ContainerPageObject
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Build.Result
-
Nested classes/interfaces inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
CapybaraPortingLayerImpl.Finder<R>, CapybaraPortingLayerImpl.Resolver
-
-
Field Summary
Fields Modifier and Type Field Description Job
job
-
Fields inherited from class org.jenkinsci.test.acceptance.po.PageObject
jsonParser, url
-
Fields inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
driver, injector, LABEL_TO_INPUT_XPATH, time
-
Fields inherited from interface org.jenkinsci.test.acceptance.po.CapybaraPortingLayer
by
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T extends Build>
Tas(Class<T> type)
"Casts" this object into a subtype by creating the specified typevoid
delete()
boolean
equals(Object other)
Artifact
getArtifact(String path)
List<Artifact>
getArtifacts()
Changes
getChanges()
String
getConsole()
URL
getConsoleTextUrl()
URL
getConsoleUrl()
String
getDisplayName()
String
getName()
Returns the human-readable name of this build.Node
getNode()
int
getNumber()
String
getResult()
URL
getStatusUrl()
int
hashCode()
boolean
hasStarted()
boolean
isInProgress()
Checks if the build is in progress, that is the build has started and not yet completed.boolean
isSuccess()
boolean
isUnstable()
Returns if the current build is unstable.void
keepForever(boolean keep)
void
openStatusPage()
Build
shouldAbort()
Build
shouldBe(Build.Result result)
Build
shouldBeUnstable()
Build
shouldContainsConsoleOutput(String fragment)
Deprecated.UseMatchers.containsRegexp(java.lang.String)
instead.void
shouldExist()
Does this object exist?Build
shouldFail()
Build
shouldNotContainsConsoleOutput(String fragment)
Deprecated.Use @linkMatchers.not(org.hamcrest.Matcher<T>)
(Matchers.containsRegexp(java.lang.String)
) instead.void
shouldNotExist()
Build
shouldSucceed()
void
stop()
Stops the build if it's in progress.String
toString()
Build
waitUntilFinished()
Build
waitUntilFinished(int timeout)
Build
waitUntilStarted()
Build
waitUntilStarted(int timeout)
-
Methods inherited from class org.jenkinsci.test.acceptance.po.ContainerPageObject
action, action, getConfigUrl, getJson, getJson, getJsonApiUrl, getNavigationLinks
-
Methods inherited from class org.jenkinsci.test.acceptance.po.ConfigurablePageObject
apply, configure, configure, configure, configure, ensureConfigPage, getFormName, getSubmitButtonText, save
-
Methods inherited from class org.jenkinsci.test.acceptance.po.PageObject
control, control, createPageArea, createRandomName, getContext, getJenkins, open, url, url, visit
-
Methods inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
all, blur, check, check, check, choose, clickButton, clickLink, confirmAlert, elasticSleep, executeScript, fillIn, find, findCaption, findCaption, findIfNotVisible, getCurrentUrl, getCurrentUrlWithFragment, getElement, getPageContent, getPageSource, getPageSource, getPath, handleAlert, isStale, last, lastIfNotVisible, newInstance, resource, runThenConfirmAlert, runThenConfirmAlert, runThenHandleAlert, runThenHandleAlert, sleep, visit, waitFor, waitFor, waitFor, waitFor, waitFor, waitForCond, waitForCond
-
-
-
-
Field Detail
-
job
public final Job job
-
-
Method Detail
-
as
public <T extends Build> T as(Class<T> type)
"Casts" this object into a subtype by creating the specified type
-
delete
public void delete()
-
waitUntilStarted
public Build waitUntilStarted()
-
waitUntilStarted
public Build waitUntilStarted(int timeout)
-
hasStarted
public boolean hasStarted()
-
waitUntilFinished
public Build waitUntilFinished()
-
waitUntilFinished
public Build waitUntilFinished(int timeout)
-
isInProgress
public boolean isInProgress()
Checks if the build is in progress, that is the build has started and not yet completed.
-
getNumber
public int getNumber()
-
getConsoleUrl
public URL getConsoleUrl()
-
getConsoleTextUrl
public URL getConsoleTextUrl()
-
getStatusUrl
public URL getStatusUrl()
-
openStatusPage
public void openStatusPage()
-
getConsole
public String getConsole()
-
shouldContainsConsoleOutput
@Deprecated public Build shouldContainsConsoleOutput(String fragment)
Deprecated.UseMatchers.containsRegexp(java.lang.String)
instead.
-
shouldNotContainsConsoleOutput
@Deprecated public Build shouldNotContainsConsoleOutput(String fragment)
Deprecated.Use @linkMatchers.not(org.hamcrest.Matcher<T>)
(Matchers.containsRegexp(java.lang.String)
) instead.
-
isSuccess
public boolean isSuccess()
-
isUnstable
public boolean isUnstable()
Returns if the current build is unstable.
-
getResult
public String getResult()
-
shouldSucceed
public Build shouldSucceed()
-
shouldFail
public Build shouldFail()
-
shouldAbort
public Build shouldAbort()
-
shouldBeUnstable
public Build shouldBeUnstable()
-
shouldBe
public Build shouldBe(Build.Result result)
-
getNode
public Node getNode()
-
shouldExist
public void shouldExist()
Does this object exist?
-
shouldNotExist
public void shouldNotExist()
-
getChanges
public Changes getChanges()
-
keepForever
public void keepForever(boolean keep)
-
toString
public String toString()
- Overrides:
toString
in classPageObject
-
getName
public String getName()
Returns the human-readable name of this build.- Returns:
- the name
-
getDisplayName
public String getDisplayName()
-
stop
public void stop()
Stops the build if it's in progress.
-
equals
public boolean equals(Object other)
- Overrides:
equals
in classContainerPageObject
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classContainerPageObject
-
-