Start Test Execution
Start the test execution for the provided test executionID.
|
|
Endpoint |
/testmgmt/testexecutions/{testExecutionId} |
Method |
POST |
testExecutionId |
ID of testExecution to start |
return schema |
String testRunId |
return example |
80ca353c-28df-4799-a520-0354de49bdd8 |
You can use this endpoint the following way:
1
2
3
4
|
curl "https://api.webmate.io/v1/testmgmt/testexecutions/{testExecutionId}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "webmate.api-token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx="
|
You need an authenticated webmateSession
to call this function, see this article on how to set up and authenticate with the SDK.
Parameter |
|
specBuilder |
webmate specBuilder for the testexecution to start |
Currently we have two different types of specBuilders, which you can both see below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// ExpeditionComparisonCheckBuilder, first need URLs and browsers
List<URI> urls = ImmutableList.of(
URI.create("http://www.examplepage.org/version/future"),
URI.create("http://www.examplepage.org")
);
Browser referenceBrowser = new Browser(BrowserType.FIREFOX, "106", new Platform(PlatformType.WINDOWS, "11", "64"));
List<Browser> crossBrowsers = ImmutableList.of(
new Browser(BrowserType.CHROME, "106", new Platform(PlatformType.WINDOWS, "11", "64")),
new Browser(BrowserType.INTERNET_EXPLORER, "11", new Platform(PlatformType.WINDOWS, "11", "64"))
);
TestExecutionSpecBuilder specBuilder = ExpeditionComparisonSpec.ExpeditionComparisonCheckBuilder.builder(
"CrossBrowser Test via SDK",
ExpeditionSpecFactory.makeUrlListExpeditionSpec(urls, referenceBrowser),
crossBrowsers.stream()
.map(browser -> ExpeditionSpecFactory.makeUrlListExpeditionSpec(urls, browser))
.collect(Collectors.toList())
);
// StoryCheckBuilder
TestExecutionSpecBuilder specBuilder = StoryCheckSpec.StoryCheckBuilder.builder("Story name")
// start test execution
TestRun testRun = webmateSession.testMgmt.startExecutionWithBuilder(specBuilder);
|
You need an authenticated webmateSession
to call this function, see this article on how to set up and authenticate with the SDK.
Parameter |
|
specBuilder |
webmate specBuilder for the testexecution to start |
Currently we have two different types of specBuilders, which you can both see below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// ExpeditionComparisonCheckBuilder, first need URLs and browsers
let urls = [
"http://www.examplepage.org/version/future",
"http://www.examplepage.org"
];
let referenceBrowser = new Browser(BrowserType.FIREFOX, "106", new Platform(PlatformType.WINDOWS, "11", "64"));
let crossBrowsers = [
new Browser(BrowserType.CHROME, "106", new Platform(PlatformType.WINDOWS, "11", "64")),
new Browser(BrowserType.INTERNET_EXPLORER, "11", new Platform(PlatformType.WINDOWS, "11", "64"))
];
let specBuilder = ExpeditionComparisonCheckBuilder.builder(
"CrossBrowser Test via SDK",
ExpeditionSpecFactory.makeUrlListExpeditionSpec(urls, referenceBrowser),
[...(crossBrowsers.map(browser => ExpeditionSpecFactory.makeUrlListExpeditionSpec(urls, browser)))]
);
// StoryCheckBuilder
let specBuilder = StoryCheckSpec.StoryCheckBuilder.builder("Story name");
// start test execution
let testRun = await webmateSession.testMgmt.startExecutionWithBuilder(specBuilder).toPromise();
|