By using the Scandium REST API, you can execute your e2e test cases and suites from within any of the several popular CI/CD platforms.
To interact with the Scandium Cloud Runner API, you need an API token. You can get one from your profile on dashboard.
Visit your profile https://app.getscandium.com/settings/profile and copy your API token
In order to successfully execute a test case or test suite, you will need following Parameters, in addition to the API TOKEN copied from your profile. Read on for how to get each necessary parameter.
Project ID
Click on the projects dropdown, then click on the "View all" button
From the list of projects displayed, click on the options (kebab menu) on the project card, then click on "Copy project id"
Test ID
Applicable when you want to run a single test case. To get a test case's ID, from the tests listing page, find the desired test case, click on its options menu, then click on "Copy test Id"
Suite ID
Applicable when you want to run a test suite. To get a test suite's ID, from the suites listing page, find the desired test case, click on its options menu, then click on "Copy suite id"
Execute a test
Calling this endpoint allows you to immediately run a single test case.
Calling this endpoint allows you to immediately run a test suite. A test suite is a collection of multiple test cases grouped for similar purposes.
Note: Executing test suites can take a long time to complete especially if there are so many test cases within the suite, and also depending on the load on our systems at the time of run. Your suite run time will also be affected if you setup multiple execution environments for the suite, as the suite will run all tests for each environment.
We’d suggest programming your request to deal with response times up to 10 minutes. If all the suite’s tests are not completed within 10 minutes, the API will send a timeout error (although your tests will still be running in the background).
The ID of the project containing the test. This can be copied from your dashboard
test_id*
String
The ID of the test to execute. This can be gotten from the test page
browser
String
The browser to run this test on. Allow valued: chrome , firefox and edge.
If this value is not supplied, the default browser on the test
case will be used.
strategy
String
await or callback
Use await to make your runner wait until the test done executing (This can make the request take a long while before returning, depending on the length of the test case). Use callback to return immediately (without the result of the run).
Default value is await
variables
String
A JSON object of key:value pairs that can be used to set or override existing global variables used in your test
screenshot
Boolean
true or false
To determine if screenshots should be taken for each step in the run.
Note: screenshot will always be taken for a failed step in the test.
x-api-token*
String
API TOKEN
Content-Type*
application/json
project_id*
String
The ID of the project containing the test. This can be copied from your dashboard
suite_id*
String
The ID of the suite to execute. This can be gotten from the test page
strategy
String
await or callback
Use await to make your runner wait until the suite done executing (This can make the request take a long while before returning, depending on the length of the test case). Use callback to return immediately (without the result of the run).
Default value is await
retry
String
Specify the number of times you want a failed test within the suite to be retried. Default is 0. Higher values will increase the time it takes your test to run.