Load test runs

Last Update: 12/5/2016

api-version = 1.0

If you haven't already, look at the information on getting started with these APIs.

Get a list of test runs

GET https://{account}.vsclt.visualstudio.com/_apis/clt/TestRuns
Parameter Type Default Notes
URL
account string Visual Studio Team Services account.
Query
name string Name for the test run. Names are not unique. Test runs with same name are assigned sequential rolling numbers.
requestedBy string "@Me" Filter by the user who requested the test run. Here requestedBy should be the display name of the user.
status string Filter by the test run status.
fromDate DateTime DateTime.UtcNow Filter by the test runs that have been modified after the fromDate timestamp.
toDate DateTime DateTime.UtcNow.AddDays(-7.0) Filter by the test runs that have been modified before the toDate timestamp.
detailed boolean False Include the detailed test run attributes.
top int 1000 The maximum number of test runs to return.

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns

Sample response

Status code: 200
{
  "count": 9,
  "value": [
    {
      "id": "271d47eb-81a8-43d3-8a71-a480de1b5ccc",
      "name": "LoadTest8.loadtest",
      "runNumber": 100,
      "createdDate": "2014-05-14T12:17:41.8009459Z",
      "finishedDate": "2014-05-14T13:07:45.3374762Z",
      "runSpecificDetails": {
        "duration": 300,
        "virtualUserCount": 25,
        "coreCount": 1,
        "samplingInterval": 15
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "aborted",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/271d47eb-81a8-43d3-8a71-a480de1b5ccc"
    },
    {
      "id": "28fec23a-91f9-4983-8bc6-1d58cc1b79f1",
      "name": "MultipleAutTestWithAPI.loadtest",
      "runNumber": 101,
      "createdDate": "2014-05-15T04:34:58.0690808Z",
      "finishedDate": "2014-05-15T04:58:47.4253024Z",
      "runSpecificDetails": {
        "duration": 600,
        "warmUpDuration": 30,
        "virtualUserCount": 50,
        "coreCount": 2,
        "samplingInterval": 15
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "completed",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/28fec23a-91f9-4983-8bc6-1d58cc1b79f1"
    },
    {
      "id": "3efaa761-4100-4a0e-b540-76e2bf28ca96",
      "name": "LoadTest7.loadtest",
      "runNumber": 102,
      "createdDate": "2014-04-07T08:30:23.9960355Z",
      "finishedDate": "2014-04-08T07:41:24.2359878Z",
      "runSpecificDetails": {
        "duration": 600,
        "virtualUserCount": 25,
        "coreCount": 1,
        "samplingInterval": 15
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "error",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/3efaa761-4100-4a0e-b540-76e2bf28ca96"
    },
    {
      "id": "42262245-4bec-4f1a-9c3d-9a2f29b85978",
      "name": "MultipleAutTest.loadtest",
      "runNumber": 103,
      "createdDate": "2014-05-13T11:01:58.8594086Z",
      "finishedDate": "2014-05-13T11:50:27.4071761Z",
      "runSpecificDetails": {
        "duration": 600,
        "warmUpDuration": 30,
        "virtualUserCount": 50,
        "coreCount": 2,
        "samplingInterval": 15
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "aborted",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/42262245-4bec-4f1a-9c3d-9a2f29b85978"
    },
    {
      "id": "53c850e2-6e35-426e-996e-209d0c54ef15",
      "name": "LoadTest7.loadtest",
      "runNumber": 104,
      "createdDate": "2014-04-08T08:02:15.0415045Z",
      "finishedDate": "2014-04-08T08:16:40.9993146Z",
      "runSpecificDetails": {
        "duration": 600,
        "virtualUserCount": 25,
        "coreCount": 1,
        "samplingInterval": 15
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "completed",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/53c850e2-6e35-426e-996e-209d0c54ef15"
    },
    {
      "id": "5ad068f6-730f-49fd-a01c-3daf9699cb88",
      "name": "MultipleAutTestWithAPI.loadtest",
      "runNumber": 105,
      "createdDate": "2014-05-14T05:08:14.2438993Z",
      "finishedDate": "2014-05-14T09:10:03.6308026Z",
      "runSpecificDetails": {
        "duration": 600,
        "warmUpDuration": 30,
        "virtualUserCount": 50,
        "coreCount": 2,
        "samplingInterval": 15
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "completed",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/5ad068f6-730f-49fd-a01c-3daf9699cb88"
    },
    {
      "id": "5cb6a0e7-85a0-4f0e-8fba-079c4634d838",
      "name": "LoadTest1.loadtest",
      "runNumber": 106,
      "createdDate": "2014-03-26T07:45:24.3989786Z",
      "finishedDate": "2014-03-26T07:53:41.9821876Z",
      "runSpecificDetails": {
        "duration": 300,
        "virtualUserCount": 25,
        "coreCount": 1,
        "samplingInterval": 5
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "completed",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/5cb6a0e7-85a0-4f0e-8fba-079c4634d838"
    },
    {
      "id": "6b3f71f9-e251-49c2-8948-c1ef7e6f75cd",
      "name": "MultipleAutTestWithAPI.loadtest",
      "runNumber": 107,
      "createdDate": "2014-05-14T10:32:26.5406252Z",
      "finishedDate": "2014-05-14T10:55:21.4858862Z",
      "runSpecificDetails": {
        "duration": 600,
        "warmUpDuration": 30,
        "virtualUserCount": 50,
        "coreCount": 2,
        "samplingInterval": 15
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "completed",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/6b3f71f9-e251-49c2-8948-c1ef7e6f75cd"
    },
    {
      "id": "6e784516-6296-4b44-ab30-c9dc13ed23ea",
      "name": "LoadTest7.loadtest",
      "runNumber": 108,
      "createdDate": "2014-04-07T07:59:48.6333108Z",
      "finishedDate": "2014-04-07T08:00:46.2694534Z",
      "runSpecificDetails": {
        "duration": 600,
        "virtualUserCount": 25,
        "coreCount": 1,
        "samplingInterval": 15
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "aborted",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/6e784516-6296-4b44-ab30-c9dc13ed23ea"
    }
  ]
}

By name

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns?name=fabrikamLoadTest1.loadtest

Sample response

Status code: 200
{
  "count": 1,
  "value": [
    {
      "id": "271d47eb-81a8-43d3-8a71-a480de1b5ccc",
      "name": "fabrikamloadtest1.loadtest",
      "runNumber": 100,
      "createdDate": "2014-05-14T12:17:41.8009459Z",
      "finishedDate": "2014-05-14T13:07:45.3374762Z",
      "runSpecificDetails": {
        "duration": 300,
        "virtualUserCount": 25,
        "coreCount": 1,
        "samplingInterval": 15
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "aborted",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/271d47eb-81a8-43d3-8a71-a480de1b5ccc"
    }
  ]
}

By user

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns?requestedBy=fabrikam%20manager

Sample response

Status code: 200
[
  {
    "id": "271d47eb-81a8-43d3-8a71-a480de1b5ccc",
    "name": "LoadTest8.loadtest",
    "runNumber": 100,
    "createdDate": "2014-05-14T12:17:41.8009459Z",
    "finishedDate": "2014-05-14T13:07:45.3374762Z",
    "runSpecificDetails": {
      "duration": 300,
      "virtualUserCount": 25,
      "coreCount": 1,
      "samplingInterval": 15
    },
    "createdBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "fabrikammanager@live.com"
    },
    "state": "aborted",
    "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/271d47eb-81a8-43d3-8a71-a480de1b5ccc"
  },
  {
    "id": "28fec23a-91f9-4983-8bc6-1d58cc1b79f1",
    "name": "MultipleAutTestWithAPI.loadtest",
    "createdDate": "2014-05-15T04:34:58.0690808Z",
    "finishedDate": "2014-05-15T04:58:47.4253024Z",
    "runSpecificDetails": {
      "duration": 600,
      "warmUpDuration": 30,
      "virtualUserCount": 50,
      "coreCount": 2,
      "samplingInterval": 15
    },
    "createdBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "fabrikammanager@live.com"
    },
    "state": "completed",
    "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/28fec23a-91f9-4983-8bc6-1d58cc1b79f1"
  }
]

By status

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns?status=aborted

Sample response

Status code: 200
[
  {
    "id": "271d47eb-81a8-43d3-8a71-a480de1b5ccc",
    "name": "LoadTest8.loadtest",
    "runNumber": 100,
    "createdDate": "2014-05-14T12:17:41.8009459Z",
    "finishedDate": "2014-05-14T13:07:45.3374762Z",
    "runSpecificDetails": {
      "duration": 300,
      "virtualUserCount": 25,
      "coreCount": 1,
      "samplingInterval": 15
    },
    "createdBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
    },
    "state": "aborted",
    "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/271d47eb-81a8-43d3-8a71-a480de1b5ccc"
  },
  {
    "id": "42262245-4bec-4f1a-9c3d-9a2f29b85978",
    "name": "MultipleAutTest.loadtest",
    "createdDate": "2014-05-13T11:01:58.8594086Z",
    "finishedDate": "2014-05-13T11:50:27.4071761Z",
    "runSpecificDetails": {
      "duration": 600,
      "warmUpDuration": 30,
      "virtualUserCount": 50,
      "coreCount": 2,
      "samplingInterval": 15
    },
    "createdBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
    },
    "state": "aborted",
    "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/42262245-4bec-4f1a-9c3d-9a2f29b85978"
  }
]

By date

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns?fromDate=20140623T061334Z&toDate=20140623T061422Z

Sample response

Status code: 200
{
  "count": 1,
  "value": [
    {
      "id": "271d47eb-81a8-43d3-8a71-a480de1b5ccc",
      "name": "LoadTest8.loadtest",
      "runNumber": 100,
      "createdDate": "2014-05-14T12:17:41.8009459Z",
      "finishedDate": "2014-05-14T13:07:45.3374762Z",
      "runSpecificDetails": {
        "duration": 300,
        "virtualUserCount": 25,
        "coreCount": 1,
        "samplingInterval": 15
      },
      "createdBy": {
        "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
        "displayName": "dialogcompliantbd153a95-710a-4d43-a146-b5dc033039b4"
      },
      "state": "aborted",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/271d47eb-81a8-43d3-8a71-a480de1b5ccc"
    }
  ]
}

With detailed attributes

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns?detailed=true

Sample response

Status code: 200
[
  {
    "queuedDate": "2015-05-26T12:05:44.7847485Z",
    "startedDate": "2015-05-26T12:05:56.7724892Z",
    "executionStartedDate": "2015-05-26T12:06:14.9580299Z",
    "executionFinishedDate": "2015-05-26T12:16:17.038528Z",
    "chargeable": true,
    "subState": "success",
    "testSettings": {
      "cleanupCommand": "",
      "hostProcessPlatform": "x86",
      "setupCommand": ""
    },
    "testDrop": {
      "id": "56f01786-2633-4937-84cb-84e6ee67a6c4",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestDrops/56f01786-2633-4937-84cb-84e6ee67a6c4"
    },
    "startedBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "Cloud Load Tester"
    },
    "stoppedBy": {
      "id": "",
      "displayName": ""
    },
    "loadGenerationGeoLocations": [
      {
        "location": "West US",
        "percentage": 100
      }
    ],
    "id": "2e1ba7a3-7692-4e4c-9879-b7ef1653ab42",
    "name": "LoadTest2.loadtest",
    "runNumber": 10547,
    "createdDate": "2015-05-26T12:05:43.5592233Z",
    "finishedDate": "2015-05-26T12:16:37.1444275Z",
    "runSpecificDetails": {
      "duration": 600,
      "virtualUserCount": 248,
      "coreCount": 2,
      "samplingInterval": 15
    },
    "createdBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "Cloud Load Tester"
    },
    "state": "completed",
    "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/2e1ba7a3-7692-4e4c-9879-b7ef1653ab42"
  },
  {
    "queuedDate": "2015-06-04T12:35:43.1351357Z",
    "startedDate": "2015-06-04T12:37:45.0349867Z",
    "executionStartedDate": "2015-06-04T12:38:03.3658382Z",
    "executionFinishedDate": "2015-06-04T12:41:28.1680248Z",
    "chargeable": true,
    "subState": "none",
    "testSettings": {
      "cleanupCommand": "",
      "hostProcessPlatform": "x86",
      "setupCommand": ""
    },
    "testDrop": {
      "id": "f92a11d4-c53f-4ccf-89d6-d77f1618022d",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestDrops/f92a11d4-c53f-4ccf-89d6-d77f1618022d"
    },
    "startedBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "Cloud Load Tester"
    },
    "stoppedBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "Cloud Load Tester"
    },
    "loadGenerationGeoLocations": [
      {
        "location": "West US",
        "percentage": 100
      }
    ],
    "id": "3316dcd4-748e-44d1-a3c4-6cdc2b81a465",
    "name": "LoadTest2.loadtest",
    "runNumber": 10926,
    "createdDate": "2015-06-04T12:35:41.768989Z",
    "finishedDate": "2015-06-04T12:41:32.0014118Z",
    "runSpecificDetails": {
      "duration": 300,
      "virtualUserCount": 25,
      "coreCount": 1,
      "samplingInterval": 15
    },
    "createdBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "Cloud Load Tester"
    },
    "state": "aborted",
    "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/3316dcd4-748e-44d1-a3c4-6cdc2b81a465"
  },
  {
    "queuedDate": "2015-05-18T08:21:02.6772173Z",
    "subState": "none",
    "testSettings": {
      "cleanupCommand": "",
      "hostProcessPlatform": "x86",
      "setupCommand": "AddCustomPerformanceCounterSetupScript.exe"
    },
    "testDrop": {
      "id": "6150d2ce-f261-4089-8af6-cc14d98fbe32",
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestDrops/6150d2ce-f261-4089-8af6-cc14d98fbe32"
    },
    "startedBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "Cloud Load Tester"
    },
    "stoppedBy": {
      "id": "",
      "displayName": ""
    },
    "abortMessage": {
      "cause": "The test run has been aborted and marked as 'Aborted' due to validation failures. Click Status messages under the Details tab to view validation failures.",
      "action": "Fix the validation errors and try running the test again. If the problem persists, contact Visual Studio Online support and provide your test run id.",
      "source": "Validation",
      "loggedDate": "2015-05-18T08:21:06.1379817Z",
      "details": [
        " Error , 5/18/2015 8:21:04 AM , Load tests run using Visual Studio Online do not currently support Goal Based Pattern. This has been specified in scenario 'Scenario1'. Update the Load Pattern to some other value and try again. "
      ]
    },
    "loadGenerationGeoLocations": [
      {
        "location": "Default",
        "percentage": 100
      }
    ],
    "id": "ceed92c9-5c36-45e3-b543-7341433ea25f",
    "name": "LoadTest2.loadtest",
    "runNumber": 10339,
    "createdDate": "2015-05-18T08:21:01.2519797Z",
    "finishedDate": "2015-05-18T08:21:01.2519797Z",
    "runSpecificDetails": {
      "duration": 600,
      "coreCount": 20,
      "samplingInterval": 15
    },
    "createdBy": {
      "id": "311f6b5f-8d9c-43d3-91db-bd6f6e978eaa",
      "displayName": "Cloud Load Tester"
    },
    "state": "aborted",
    "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/ceed92c9-5c36-45e3-b543-7341433ea25f"
  }
]

Get a test run

GET https://{account}.vsclt.visualstudio.com/_apis/clt/TestRuns/{testrunid}
Parameter Type Default Notes
URL
account string Visual Studio Team Services account.
testRunId string Unique ID of the test run

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/854a7b79-efd3-4e48-b6b2-6b99b1adc731

Sample response

Status code: 200
{
  "queuedDate": "2014-06-23T06:13:38.4787941Z",
  "subState": "none",
  "testSettings": {
    "cleanupCommand": "",
    "setupCommand": ""
  },
  "testDrop": {
    "id": "ed45ed32-dafb-4178-ba7e-ad25755348f8",
    "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestDrops/ed45ed32-dafb-4178-ba7e-ad25755348f8"
  },
  "startedBy": {
    "id": "76cabfe4-0e20-4f5b-862e-9693a68232f1",
    "displayName": "Ranjana"
  },
  "loadGenerationGeoLocations": {
    "location": "East US 2",
    "percentage": "100"
  },
  "id": "a5e0d4b9-d387-4b3e-9566-163da9c39b67",
  "name": "IBuySpy.loadtest",
  "runNumber": 12367,
  "createdDate": "2014-06-23T06:13:38.0965365Z",
  "runSpecificDetails": {
    "duration": 180,
    "virtualUserCount": 250,
    "samplingInterval": 15
  },
  "createdBy": {
    "id": "76cabfe4-0e20-4f5b-862e-9693a68232f1",
    "displayName": "Ranjana"
  },
  "state": "queued",
  "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/a5e0d4b9-d387-4b3e-9566-163da9c39b67"
}

Get test run results

Gets the test results for the test run. Refer to Test Results for the detailed description of the test result resource. The results object contains the url to the archived test results file if available and top-level counter groups configured for this run. In addition diagnostics object contains the url to the Storage in Azure where any of your custom log or trace files have been placed. And the LastModifiedTime will indicate how recent the file is and will not be present if there are no files in Storage. Each counter group contains a set of counter instances (See Counter Instances.)

GET https://{account}.vsclt.visualstudio.com/_apis/clt/testruns/{testRunId}/results
Parameter Type Notes
URL
account string Visual Studio Team Services account.
testrunid string ID of the test run.

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/2150fbd4-e71c-42fd-8b90-95222a556d87/results

Sample response

Status code: 200
{
  "resultsUrl": "http://127.0.0.1:10000/account1/containerfor-aeee0697-d734-43d7-956e-e662252c265c/2150fbd4-e71c-42fd-8b90-95222a556d87/TestResult/LoadTest.ltrar.zip?sv=2012-02-12&se=2014-06-03T05%3A05%3A39Z&sr=b&si=sas_tenant_policyaeee0697-d734-43d7-956e-e662252c265c&sig=n1Tj%2BsCtiOqQu9UtcXsl%2Bn3ixP%2FVebHCKDJvfD5Tr%2FE%3D",
  "diagnostics": {
    "diagnosticStoreConnectionString": "https://clt.blob.core.windows.net/ets-containerfor-0c6abeb9-6f7e-4b53-b812-24f21362c031?sv=2014-02-14&sr=c&sig=mh1dqkgPGmDdHW%2BRjWZSQ8YWr%2F0wUiTaU%2BIvmXK9bfM%3D&se=2015-04-15T06%3A57%3A17Z&sp=rl",
    "relativePathToDiagnosticFiles": "8c2f1bc5-50d2-4218-a367-fbbf6d91d802/TestResult/Diagnostics",
    "lastModifiedTime": "2015-04-28T09:50:28Z"
  },
  "counterGroups": {
    "count": 3,
    "value": [
      {
        "groupName": "Performance",
        "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/5c9dc626-44aa-410b-8f75-2929dd330397/CounterInstances?groupNames=Performance"
      },
      {
        "groupName": "Throughput",
        "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/5c9dc626-44aa-410b-8f75-2929dd330397/CounterInstances?groupNames=Throughput"
      },
      {
        "groupName": "Application",
        "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/5c9dc626-44aa-410b-8f75-2929dd330397/CounterInstances?groupNames=Application"
      }
    ]
  }
}

Errors

Get a list of errors encountered during a test run execution to help diagnose the test authoring and coding issues. This returns a tree structured view of all test errors encountered during execution based on their types and subtypes.

GET https://{account}.vsclt.visualstudio.com/_apis/clt/TestRuns/{testRunId}/errors
Parameter Type Default Notes
URL
account string Your Visual Studio Team Services account.
testRunId string ID of the test run.
Query
detailed boolean false To include the details of test errors such as messagetext, request, stacktrace, testcasename, scenarioname, and lasterrordate.
type string Filter for the particular type of errors.
subtype string Filter for a particular subtype of errors. You should not provide error subtype without error type.

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors

Sample response

Status code: 200
{
  "types": [
    {
      "subTypes": [
        {
          "errorDetailList": null,
          "subTypeName": "WebException",
          "count": 1,
          "occurrences": 795,
          "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception&subtype=WebException&detailed=true"
        }
      ],
      "typeName": "Exception",
      "count": 1,
      "occurrences": 795,
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception&detailed=true"
    },
    {
      "subTypes": [
        {
          "errorDetailList": null,
          "subTypeName": "Critical",
          "count": 2,
          "occurrences": 80,
          "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=ThresholdMessage&subtype=Critical&detailed=true"
        }
      ],
      "typeName": "ThresholdMessage",
      "count": 1,
      "occurrences": 80,
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=ThresholdMessage&detailed=true"
    }
  ],
  "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?detailed=true",
  "count": 2,
  "occurrences": 875
}

With Detailed=true

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?detailed=True

Sample response

Status code: 200
{
  "types": [
    {
      "subTypes": [
        {
          "errorDetailList": [
            {
              "occurrences": 795,
              "testCaseName": "WebTest1",
              "scenarioName": "Scenario1",
              "request": "http://www.testerror.com/----{GET}",
              "stackTrace": "   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n   at Microsoft.VisualStudio.TestTools.WebStress.WebTestTransaction.ResponseReceived(IAsyncResult result)",
              "messageText": "The remote name could not be resolved: 'www.testerror.com'",
              "lastErrorDate": "2015-07-15T08:53:18.1521041Z"
            }
          ],
          "subTypeName": "WebException",
          "count": 1,
          "occurrences": 795,
          "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception&subtype=WebException"
        }
      ],
      "typeName": "Exception",
      "count": 1,
      "occurrences": 795,
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception"
    },
    {
      "subTypes": [
        {
          "errorDetailList": [
            {
              "occurrences": 40,
              "testCaseName": "",
              "scenarioName": "",
              "request": "",
              "stackTrace": "",
              "messageText": "[\"Agent0\",\"Processor\",\"% Processor Time\",\"0\"] : The value 100 exceeds the critical threshold value of 90.",
              "lastErrorDate": "2015-07-15T09:03:02.3410401Z"
            },
            {
              "occurrences": 40,
              "testCaseName": "",
              "scenarioName": "",
              "request": "",
              "stackTrace": "",
              "messageText": "[\"Agent0\",\"Processor\",\"% Processor Time\",\"_Total\"] : The value 100 exceeds the critical threshold value of 90.",
              "lastErrorDate": "2015-07-15T09:03:02.3410401Z"
            }
          ],
          "subTypeName": "Critical",
          "count": 2,
          "occurrences": 80,
          "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=ThresholdMessage&subtype=Critical"
        }
      ],
      "typeName": "ThresholdMessage",
      "count": 1,
      "occurrences": 80,
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=ThresholdMessage"
    }
  ],
  "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?detailed=true",
  "count": 2,
  "occurrences": 875
}

With Error Type specified

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception

Sample response

Status code: 200
{
  "types": [
    {
      "subTypes": [
        {
          "errorDetailList": null,
          "subTypeName": "WebException",
          "count": 1,
          "occurrences": 795,
          "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception&subtype=WebException&detailed=true"
        }
      ],
      "typeName": "Exception",
      "count": 1,
      "occurrences": 795,
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception&detailed=true"
    }
  ],
  "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?detailed=true",
  "count": 1,
  "occurrences": 795
}

With Error Type and Subtype specified

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception&subtype=WebException

Sample response

Status code: 200
{
  "types": [
    {
      "subTypes": [
        {
          "errorDetailList": null,
          "subTypeName": "WebException",
          "count": 1,
          "occurrences": 795,
          "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception&subtype=WebException&detailed=true"
        }
      ],
      "typeName": "Exception",
      "count": 1,
      "occurrences": 795,
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception&detailed=true"
    }
  ],
  "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?detailed=true",
  "count": 1,
  "occurrences": 795
}

With Error Type and Subtype specified and detailed=true

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception&subtype=WebException&detailed=true

Sample response

Status code: 200
{
  "types": [
    {
      "subTypes": [
        {
          "errorDetailList": [
            {
              "occurrences": 795,
              "testCaseName": "WebTest1",
              "scenarioName": "Scenario1",
              "request": "http://www.testerror.com/----{GET}",
              "stackTrace": "   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n   at Microsoft.VisualStudio.TestTools.WebStress.WebTestTransaction.ResponseReceived(IAsyncResult result)",
              "messageText": "The remote name could not be resolved: 'www.smfnjcksdr.com'",
              "lastErrorDate": "2015-07-15T08:53:18.1521041Z"
            }
          ],
          "subTypeName": "WebException",
          "count": 1,
          "occurrences": 795,
          "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception&subtype=WebException"
        }
      ],
      "typeName": "Exception",
      "count": 1,
      "occurrences": 795,
      "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?type=Exception"
    }
  ],
  "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/b41747ab-2ffe-4446-bf65-617e99e7a4f7/Errors?detailed=true",
  "count": 1,
  "occurrences": 795
}

Messages

Get a list of messages accrued during the execution of the test run. This includes various informational, instructional, warning and critical messages associated with the run. Refer to Test Run Message for the detailed description of the test run message resource.

GET https://{account}.vsclt.visualstudio.com/_apis/clt/TestRuns/{testRunId}/messages
Parameter Type Notes
URL
account string Visual Studio Team Services account.
testRunId string ID of the test run.

Sample request

GET https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/47be20f0-ac4a-40cd-acb7-d9f8c44d0404/Messages

Sample response

Status code: 200
{
  "count": 3,
  "value": [
    {
      "messageId": "fa48b1f1-773b-4488-85e0-4389d6c7294f",
      "testRunId": "47be20f0-ac4a-40cd-acb7-d9f8c44d0404",
      "agentId": "",
      "messageType": "info",
      "messageSource": "validation",
      "loggedDate": "2014-06-23T06:17:53.5753206Z",
      "message": "This run will use 250 virtual-user minutes. To learn more about usage limits, refer  http://go.microsoft.com/fwlink/?LinkId=303976."
    },
    {
      "messageId": "41498086-0ef1-44ec-bdda-e3e6edc2eca4",
      "testRunId": "47be20f0-ac4a-40cd-acb7-d9f8c44d0404",
      "agentId": "",
      "messageType": "info",
      "messageSource": "validation",
      "loggedDate": "2014-06-23T06:17:50.5292724Z",
      "message": "This load test will run using 2 agent cores. Learn more about agent core allocation here: http://go.microsoft.com/fwlink/?LinkId=331637"
    },
    {
      "messageId": "0ee52b92-f30f-4111-b732-bbb8026ac81a",
      "testRunId": "47be20f0-ac4a-40cd-acb7-d9f8c44d0404",
      "agentId": "",
      "messageType": "info",
      "messageSource": "other",
      "loggedDate": "2014-06-23T06:17:19.0511062Z",
      "message": "This run was requested by 'Ranjana' using the Visual Studio Online Account 'ranjanarssl997'."
    }
  ]
}

Create a test run

POST https://{account}.vsclt.visualstudio.com/_apis/clt/TestRuns
Parameter1 Name Type Required Notes
name string Yes Name for the test run. Names are not unique. Test runs with same name are assigned next rolling number.
description string No Description for the test run.
testDropRef.Id string Yes Unique ID of the test drop.
testSettings.cleanupcommand string No Location of the cleanup script file
testSettings.hostprocessplatform enum No Allowed values {x86, x64, MSIL}. Default is x86.
testSettings.setupcommand string No Location of the setup script file

Sample request

POST https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns
{
  "name": "IBuySpy.loadtest",
  "description": "nightly loadtest",
  "testSettings": {
    "cleanupCommand": "",
    "hostProcessPlatform": "x86",
    "setupCommand": ""
  },
  "testDrop": {
    "id": "ed45ed32-dafb-4178-ba7e-ad25755348f8"
  }
}

Sample response

Status code: 200
{
  "id": "a5e0d4b9-d387-4b3e-9566-163da9c39b67",
  "name": "IBuySpy.loadtest",
  "runNumber": 100,
  "createdDate": "2014-06-23T06:13:38.0965365Z",
  "state": "pending",
  "subState": "none",
  "loadGenerationGeoLocations": [
    {
      "location": "Default",
      "percentage": 100
    }
  ],
  "testSettings": {
    "cleanupCommand": "",
    "hostProcessPlatform": "x86",
    "setupCommand": ""
  },
  "testDrop": {
    "id": "ed45ed32-dafb-4178-ba7e-ad25755348f8",
    "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestDrops/ed45ed32-dafb-4178-ba7e-ad25755348f8"
  },
  "runSpecificDetails": {
    "duration": 180,
    "virtualUserCount": 250,
    "samplingInterval": 15
  },
  "createdBy": {
    "id": "76cabfe4-0e20-4f5b-862e-9693a68232f1",
    "displayName": "clttester@live.com"
  },
  "url": "https://fabrikam.vsclt.visualstudio.com/_apis/clt/TestRuns/a5e0d4b9-d387-4b3e-9566-163da9c39b67"
}

Start a test run

PATCH https://{account}.vsclt.visualstudio.com/_apis/clt/TestRuns/{testrunid}
Parameter Type Required Notes
URL
account string Yes Visual Studio Team Services account.
testRunId string Yes ID of the test run.
Payload
state enum Yes queued

Sample request

PATCH https://fabrikam.vsclt.visualstudio.com/_apis/clt/testruns/854a7b79-efd3-4e48-b6b2-6b99b1adc731
{
  "state": "queued"
}

Sample response

Status code: 202

Stop a test run

PATCH https://{account}.vsclt.visualstudio.com/_apis/clt/TestRuns/{testrunid}
Parameter Type Required Notes
URL
account string Yes Visual Studio Team Services account.
testRunId string Yes ID of the test run.
Payload
state enum Yes aborted

Sample request

PATCH https://fabrikam.vsclt.visualstudio.com/_apis/clt/testruns/854a7b79-efd3-4e48-b6b2-6b99b1adc731
{
  "state": "aborted"
}

Sample response

Status code: 202