Rest API - Tests
info
Some of the endpoints use URL parameters. Make sure you are familiar with how to use it with Postman. For more information see Use REST APIs Using Postman.
The Reporter provides you with a Rest API that gives you direct access to the test data and statistics.
Concepts
- Key - Key and value construct a tag. Each test has a subset of available tags with various values that describe the test specifics. Example: date.
- Project - Concept derived from the cloud. Each project has its own resources (users, devices) and can be used to create a separation of testing efforts.
- Test - Single test execution instance.
Get Test By ID
Test with a specified id of the currently selected project.
This API is available for all user roles.
GET /reporter/api/tests/<id>
Response
Response Status: 200 OK
[
{
"id": 2795,
"name": "quickStartFirefoxTest",
"startTime": 1578562056457,
"duration": 145440,
"status": "Failed",
"success": false,
"keyValuePairs": {
"date": "2020-01-09",
"test.type": "Web",
"maxScreenshotInterval": "0.0",
"cause": "no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//button[@name='login']\"}",
"newSessionWaitTimeout": "60.0",
"acceptSslCerts": "true",
"goog:loggingPrefs": "{performance=ALL}",
"goog:chromeOptions": "{args=[disable-extensions, start-fullscreen, disable-web-security, disable-features=NetworkService, --window-size=1920,1080], prefs={download.directory_upgrade=true, safebrowsing_for_trusted_sources_enabled=false, profile.default_content_settings.popups=0",
"newCommandTimeout": "1200.0",
"browserVersion": "78.0.3904.108",
"browserName": "chrome",
"os.name": "Windows 10",
"javascriptEnabled": "true",
"platformName": "WIN10",
"test.framework": "Selenium",
"user": "assafm",
"testName": "quickStartFirefoxTest"
},
"testAttachments": [
{
"id": 12765,
"filePath": "/attachments/1/2020-01-09/2795/testreportfadfdf1b69bf185a825a5aeb556d1d7876785376898260938183611384077293385164/index.html",
"captionName": "",
"type": "zip",
"size": 4311336
}
],
"hasReport": true
}
]
Get Test By ProjectName - ID
Test with a specified id of the specified selected project.
This API is available for all user roles with permission to access the desired project.
GET /reporter/api/tests/<id>/project/<projectName>
Response
Response Status: 200 OK
[
{
"id": 2795,
"name": "quickStartFirefoxTest",
"startTime": 1578562056457,
"duration":