Package testingbot
Class TestingBotBuildReportAction
java.lang.Object
testingbot.TestingBotBuildReportAction
- All Implemented Interfaces:
Action,ModelObject,RunAction2
Adds a "TestingBot Build" page to a build that embeds the TestingBot build report (all TestingBot
sessions grouped under this build) in an iframe.
Tests associate themselves with the build by using the TESTINGBOT_BUILD environment
variable (exposed by the testingbot/testingbotTunnel steps and the freestyle build
wrapper) as their build desired capability. The embedded report lives at
/mini/builds/<clientKey>/<buildId> and is authenticated with a plain
MD5(clientKey:clientSecret:buildId) token — computed once here so the raw secret is never
stored on the build.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringattach(Run<?, ?> run, TestingBotCredentials credentials) Adds the report action to the run (once) and returns the build identifier to expose asTESTINGBOT_BUILD.static StringbuildIdFor(Run<?, ?> run) The value tests should use as theirbuildcapability to appear in this build's report.static TestingBotBuildReportActioncreate(Run<?, ?> run, TestingBotCredentials credentials) Builds the action for a run, computing the embed auth token from the credentials.Run<?, ?> getRun()voidonAttached(Run<?, ?> run) void
-
Field Details
-
TESTINGBOT_BUILD
Env var holding the build identifier. Tests should pass its value as theirbuilddesired capability so their sessions are grouped under this Jenkins build's report — the TestingBot analog of Sauce Labs'SAUCE_BUILD_NAME.- See Also:
-
-
Method Details
-
create
Builds the action for a run, computing the embed auth token from the credentials. -
buildIdFor
The value tests should use as theirbuildcapability to appear in this build's report. Safe both as a capability value and as a URL path segment, and injective: distinct job names never collapse to the same identifier. -
attach
Adds the report action to the run (once) and returns the build identifier to expose asTESTINGBOT_BUILD. Callers that only need the identifier — e.g. a run without resolvable credentials — can usebuildIdFor(Run)directly.Synchronized on the run so that concurrent steps in one build cannot attach duplicate actions. If an action already exists for a different TestingBot account (different client key), it is replaced so the embedded report and its auth token match the credentials now in effect.
-
getReportUrl
-
getBuildId
-
getRun
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
onAttached
- Specified by:
onAttachedin interfaceRunAction2
-
onLoad
- Specified by:
onLoadin interfaceRunAction2
-