Session - List
Get a list of test sessions
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/test/session?api-version=7.1-preview.1
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/test/session?period={period}&allSessions={allSessions}&includeAllProperties={includeAllProperties}&source={source}&includeOnlyCompletedSessions={includeOnlyCompletedSessions}&api-version=7.1-preview.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
organization
|
path | True |
string |
The name of the Azure DevOps organization. |
project
|
path | True |
string |
Project ID or project name |
team
|
path |
string |
Team ID or team name |
|
api-version
|
query | True |
string |
Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api. |
all
|
query |
boolean |
If false, returns test sessions for current user. Otherwise, it returns test sessions for all users |
|
include
|
query |
boolean |
If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version. |
|
include
|
query |
boolean |
If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states |
|
period
|
query |
integer int32 |
Period in days from now, for which test sessions are fetched. |
|
source
|
query |
Source of the test session. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
successful operation |
Security
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
Name | Description |
---|---|
vso.test | Grants the ability to read test plans, cases, results and other test management related artifacts. |
Examples
Sample Request
GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/Fabrikam-Fiber-TFVC Team/_apis/test/session?api-version=7.1-preview.1
Sample Response
{
"count": 2,
"value": [
{
"id": 10,
"title": "Session - 6/30/2016, 3:41:41 PM",
"startDate": "2016-06-30T10:11:41.357Z",
"endDate": "2016-06-30T10:13:15.253Z",
"revision": 2,
"source": "xtWeb",
"state": "completed",
"owner": {
"id": "6225fa20-adf2-42dc-851e-168c0d05a628",
"displayName": "prabin"
},
"propertyBag": {
"bag": {
"AssociatedWorkItem": "[{\"id\":10,\"type\":\"Task\"},{\"id\":7,\"type\":\"Bug\"},{\"id\":8,\"type\":\"Task\"},{\"id\":9,\"type\":\"Test Case\"}]",
"ExploredWorkItem": "[{\"startTime\":\"2016-06-30T10:13:04.393Z\",\"endTime\":\"2016-06-30T10:13:15.19Z\",\"id\":2,\"type\":\"Test Case\"}]"
}
}
},
{
"id": 11,
"title": "Session - 6/30/2016, 3:43:16 PM",
"startDate": "2016-06-30T10:13:16.317Z",
"endDate": "2016-06-30T10:13:33.297Z",
"revision": 2,
"source": "xtWeb",
"state": "completed",
"owner": {
"id": "6225fa20-adf2-42dc-851e-168c0d05a628",
"displayName": "prabin"
},
"propertyBag": {
"bag": {
"AssociatedWorkItem": "[{\"id\":11,\"type\":\"Test Case\"}]",
"ExploredWorkItem": "[{\"startTime\":\"2016-06-30T10:13:29.957Z\",\"endTime\":\"2016-06-30T10:13:33.283Z\",\"id\":3,\"type\":\"Test Case\"}]"
}
}
}
]
}
Definitions
Name | Description |
---|---|
Identity |
|
Property |
The class to represent a Generic store for test session data. |
Reference |
The class to represent a collection of REST reference links. |
Shallow |
An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. |
Test |
Test Session |
Test |
Source of the test session |
Test |
State of the test session |
IdentityRef
Name | Type | Description |
---|---|---|
_links |
This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. |
|
descriptor |
string |
The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. |
directoryAlias |
string |
Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary |
displayName |
string |
This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. |
id |
string |
|
imageUrl |
string |
Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary |
inactive |
boolean |
Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary |
isAadIdentity |
boolean |
Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType) |
isContainer |
boolean |
Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType) |
isDeletedInOrigin |
boolean |
|
profileUrl |
string |
Deprecated - not in use in most preexisting implementations of ToIdentityRef |
uniqueName |
string |
Deprecated - use Domain+PrincipalName instead |
url |
string |
This url is the full route to the source resource of this graph subject. |
PropertyBag
The class to represent a Generic store for test session data.
Name | Type | Description |
---|---|---|
bag |
object |
Generic store for test session data |
ReferenceLinks
The class to represent a collection of REST reference links.
Name | Type | Description |
---|---|---|
links |
object |
The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. |
ShallowReference
An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links.
Name | Type | Description |
---|---|---|
id |
string |
ID of the resource |
name |
string |
Name of the linked resource (definition name, controller name, etc.) |
url |
string |
Full http link to the resource |
TestSession
Test Session
Name | Type | Description |
---|---|---|
area |
Area path of the test session |
|
comment |
string |
Comments in the test session |
endDate |
string |
Duration of the session |
id |
integer |
Id of the test session |
lastUpdatedBy |
Last Updated By Reference |
|
lastUpdatedDate |
string |
Last updated date |
owner |
Owner of the test session |
|
project |
Project to which the test session belongs |
|
propertyBag |
Generic store for test session data |
|
revision |
integer |
Revision of the test session |
source |
Source of the test session |
|
startDate |
string |
Start date |
state |
State of the test session |
|
title |
string |
Title of the test session |
url |
string |
Url of Test Session Resource |
TestSessionSource
Source of the test session
Name | Type | Description |
---|---|---|
feedbackDesktop |
string |
The session was created from feedback client. |
feedbackWeb |
string |
The session was created from browser extension. |
sessionInsightsForAll |
string |
To show sessions from all supported sources. |
unknown |
string |
Source of test session uncertain as it is stale |
xtDesktop |
string |
The session was created from Microsoft Test Manager exploratory desktop tool. |
xtDesktop2 |
string |
The session was created from web access using Microsoft Test Manager exploratory desktop tool. |
xtWeb |
string |
The session was created from browser extension. |
TestSessionState
State of the test session
Name | Type | Description |
---|---|---|
completed |
string |
The session has completed. |
declined |
string |
This is required for Feedback session which are declined |
inProgress |
string |
The session is running. |
notStarted |
string |
The session is still being created. |
paused |
string |
The session has paused. |
unspecified |
string |
Only used during an update to preserve the existing value. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for