GET All Test Runs for a Job

Use this query to get all of the test run results for a specific job.

Request

Note that you are searching for test runs, based on the given sref for the job. Job objects include the sref parameter, which is how you search for all test runs for that job.

Method GET
Path /testRuns?job=job_sref
Header

Raalm: account_realm

Authorization: Bearer access_token

The sref for the job must be URL encoded. Your requests will look something like this:

Path /testRuns?job=jobs%2F123

Response

The response for this request is an array of test run objects:

Body

"results": [

{

"sref": "testRuns/1001",

"pageTitle": "My Homepage",

"url": "http://my.url.com",

"browser": "browsers/ff",

"dataStartDuration": 1.234,

"renderStart": 2.345,

"domLoad": 3.456,

"onLoad": 4.567,

"visuallyComplete": null,

"downloadDuration": 6.789,

"pageSize": 42345,

"speedIndex": null,

"resultCode": 1,

"objectCount": 26,

"severity": "ok",

"ranAt": "2016-04-07T08:06:47+00:00",

"objectsUri": "objects?testRun=testRuns%2F1001",

"jobUri": "jobs/123"

},

{

"sref": "testRuns/1002",

"pageTitle": "Your Homepage",

"url": "http://your.url.com",

"browser": "browsers/ff",

"dataStartDuration": 3.254,

"renderStart": 1.463,

"domLoad": 2.693,

"onLoad": 3.683,

"visuallyComplete": 4.293,

"downloadDuration": 6.046,

"pageSize": 83968,

"speedIndex": 3678,

"resultCode": 1,

"objectCount": 32,

"severity": "ok",

"ranAt": "2016-04-07T08:08:12+00:00",

"objectsUri": "objects?testRun=testRuns%2F1002",

"jobUri": "jobs/123"

},

...

]

Test Run Parameters

Each test run you request from the API includes the following parameters:

Parameter Details
sref A self-reference path that describes how you can request the test run object
pageTitle The title of the page tested, or the URL if no page title was set
url The URL tested
browser The browser used for the test run
dataStartDuration How long (in seconds) until the very first request starts return data
renderStart How long (in seconds) until the browser starts rendering the page
domLoad How long (in seconds) until the DOM load event fires in the browser
onLoad How long (in seconds) until the page load event fires in the browser
visuallyComplete How long (in seconds) until the visible page finishes rendering
downloadDuration How long (in seconds) all network activities take to load the page
pageSize The size of the page in bytes (using the compressed size of objects if compressed)
speedIndex The Speed Index for the test run
resultCode The result code of the test run
objectCount How many objects (network requests) were made for this page
severity A categorization of how the page ran (i.e., ok, warning)
ranAt The date/time the page was tested
objectsUri The URI of how to query details about all objects for this test run
jobUri The URI of the job that this test run is a member of

Limit Test Runs by Date and Time

You can restrict the search for jobs by the date and time they happened. You can specify the fromDate, the toDate, or both together. All dates and times are inclusive and are specified using the standard date/time format the API returns data in, but must be URL encoded and sent as a query string.

Request

Method GET
Path /testRuns?fromDate=from_date&toDate=to_date
Header

Realm: account_realm

Authorization: Bearer access_token

All date/times must be URL encoded, so, for example, if you wanted to search for all jobs that ran before January 1, 2017, (represented as 2017-01-01T00:00:00+00:00 in ISO date format), you would make the following request:

Path /testRuns?fromDate=2017-01-01T00%3A00%3A00%2B00%3A00

Response

The returned pagination will honor the date and time range you have specified, meaning you can retrieve all of the data from that date or time range, even if it spans multiple paginated pages. The response will include the date ranges specified, as well as the total number of results in the meta section:

Body

"meta": {

"fromDate": "2017-03-01T00:00:00+00:00",

"toDate": "2017-03-01T23:59:59+00:00",

"paginationTotalResults": 66,

"response_in_sec": 0.28

},

 

This topic was last updated on August 19, 2021, at 03:30:47 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2022 Eggplant