Resource: Agile Runs ( /api/agileruns )

Agile Runs collection resource

Root Relation: AgileRuns

This resource supports the following methods: GET, POST

Methods

GET


Retrieves all (or a subset) of agile runs that are visible to the user.

This method supports the TQL query parameters tql, $top, $take and $inlinecount. See TQL Topic for more details.

Required Permissions

  • TestManagement/ManageExecutions/View

Supported Expansions

For more details on expansions, please see the Expand help topic.

Status Codes

These are the expected status codes returned by the service. In addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

StatusDescription
200 - OKReturned if request is completed successfully.

Example - GET (filtered by TQL Query)

Retrieves agile runs matching a TQL query.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
tqlName ~ 'Report'The TQL query to execute.
$top5Maximum number of results to return (defaults to 25).
$skip0Number of results to skip before return the $top number of results matching the query.
$expandsStepsThe aditional fields to expand

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Skip": 0,
  "Top": 5,
  "Total": 1,
  "Items": [
    {
      "Id": "e7a8ade8-2452-4856-9f7d-6296b3b82fc8",
      "Description": null,
      "Name": "Report pagination",
      "Notes": null,
      "Number": 1,
      "Objective": null,
      "PostCondition": null,
      "PreCondition": null,
      "PriorityId": "a79e5778-befc-4ffe-b910-873ff737296c",
      "StatusId": "f304c468-58d4-4245-a9c8-7b61a42f57f3",
      "TypeId": "27537607-6c59-4d7c-b812-d5dff13ff738",
      "PackageId": "a5c52dc7-e849-4af9-ab99-a01401130d25",
      "OrderNumber": 1,
      "ProjectId": "ef7b7b88-b990-4cb9-98b5-2d89786e51f3",
      "ProjectName": "Test Project",
      "PackageName": "Execution Sets",
      "EstimatedDuration": null,
      "ActualDuration": null,
      "ExecutionStatus": "Not Run",
      "AgileRunNumberReadOnly": false,
      "Expands": [
        "Widgets",
        "FieldValues"
      ],
      "Steps": [
        {
          "Description": "View report with more then 25 rows of data",
          "ExpectedResult": "Next page button is displayed",
          "Notes": "Use HTML report mode",
          "OrderNumber": 0,
          "Result": "NotRun",
          "Id": "23d16899-703f-4e4a-84af-6b87e3bd3adb"
        },
        {
          "Description": "Click next page button",
          "ExpectedResult": "Page 2 is displayed",
          "Notes": "Use HTML report mode",
          "OrderNumber": 1,
          "Result": "NotRun",
          "Id": "ca5a155d-7c4b-4876-bebe-c6bf8649465d"
        },
        {
          "Description": "Click last page button",
          "ExpectedResult": "Final page of results is displayed, next page button is disabled.",
          "Notes": "Use HTML report mode",
          "Data": "Use the large sample data set",
          "OrderNumber": 2,
          "Result": "NotRun",
          "Id": "b37d130a-98b9-4b2a-9b79-af9fcfae6177"
        }
      ],
      "Self": "http://localhost/api/agilerun/e7a8ade8-2452-4856-9f7d-6296b3b82fc8",
      "Links": [
        {
          "Href": "http://localhost/api/agilerun/e7a8ade8-2452-4856-9f7d-6296b3b82fc8/relationships",
          "Rel": "Relationships"
        },
        {
          "Href": "http://localhost/api/agilerun/e7a8ade8-2452-4856-9f7d-6296b3b82fc8/allrelationships",
          "Rel": "AllRelationships"
        }
      ]
    }
  ]
}

Status Code

200 - OK

Example - GET (no filter)

Retrieves agile runs matching a TQL query.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
$top5Maximum number of results to return (defaults to 25).
$skip0Number of results to skip before return the $top number of results matching the query.
$expandsStepsThe aditional fields to expand

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Skip": 0,
  "Top": 5,
  "Total": 2,
  "Items": [
    {
      "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
      "Description": null,
      "Name": "Agile Run Started At 2-05-2012 10:00:08 p.m.",
      "Notes": null,
      "Number": 1,
      "Objective": null,
      "PostCondition": null,
      "PreCondition": null,
      "PriorityId": "a79e5778-befc-4ffe-b910-873ff737296c",
      "StatusId": "f304c468-58d4-4245-a9c8-7b61a42f57f3",
      "TypeId": "27537607-6c59-4d7c-b812-d5dff13ff738",
      "PackageId": "a5c52dc7-e849-4af9-ab99-a01401130d25",
      "OrderNumber": 0,
      "ProjectId": "ef7b7b88-b990-4cb9-98b5-2d89786e51f3",
      "ProjectName": "Test Project",
      "PackageName": "Execution Sets",
      "EstimatedDuration": null,
      "ActualDuration": null,
      "ExecutionStatus": "Not Run",
      "AgileRunNumberReadOnly": false,
      "Expands": [
        "Widgets",
        "FieldValues"
      ],
      "Steps": [
        {
          "Description": null,
          "ExpectedResult": null,
          "OrderNumber": 0,
          "Result": "NotRun",
          "Id": "b85cea17-60ce-48ba-923f-f7c332c99cda"
        }
      ],
      "Self": "http://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610",
      "Links": [
        {
          "Href": "http://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610/relationships",
          "Rel": "Relationships"
        },
        {
          "Href": "http://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610/allrelationships",
          "Rel": "AllRelationships"
        }
      ]
    },
    {
      "Id": "e7a8ade8-2452-4856-9f7d-6296b3b82fc8",
      "Description": null,
      "Name": "Report pagination",
      "Notes": null,
      "Number": 1,
      "Objective": null,
      "PostCondition": null,
      "PreCondition": null,
      "PriorityId": "a79e5778-befc-4ffe-b910-873ff737296c",
      "StatusId": "f304c468-58d4-4245-a9c8-7b61a42f57f3",
      "TypeId": "27537607-6c59-4d7c-b812-d5dff13ff738",
      "PackageId": "a5c52dc7-e849-4af9-ab99-a01401130d25",
      "OrderNumber": 1,
      "ProjectId": "ef7b7b88-b990-4cb9-98b5-2d89786e51f3",
      "ProjectName": "Test Project",
      "PackageName": "Execution Sets",
      "EstimatedDuration": null,
      "ActualDuration": null,
      "ExecutionStatus": "Not Run",
      "AgileRunNumberReadOnly": false,
      "Expands": [
        "Widgets",
        "FieldValues"
      ],
      "Steps": [
        {
          "Description": "View report with more then 25 rows of data",
          "ExpectedResult": "Next page button is displayed",
          "Notes": "Use HTML report mode",
          "OrderNumber": 0,
          "Result": "NotRun",
          "Id": "23d16899-703f-4e4a-84af-6b87e3bd3adb"
        },
        {
          "Description": "Click next page button",
          "ExpectedResult": "Page 2 is displayed",
          "Notes": "Use HTML report mode",
          "OrderNumber": 1,
          "Result": "NotRun",
          "Id": "ca5a155d-7c4b-4876-bebe-c6bf8649465d"
        },
        {
          "Description": "Click last page button",
          "ExpectedResult": "Final page of results is displayed, next page button is disabled.",
          "Notes": "Use HTML report mode",
          "Data": "Use the large sample data set",
          "OrderNumber": 2,
          "Result": "NotRun",
          "Id": "b37d130a-98b9-4b2a-9b79-af9fcfae6177"
        }
      ],
      "Self": "http://localhost/api/agilerun/e7a8ade8-2452-4856-9f7d-6296b3b82fc8",
      "Links": [
        {
          "Href": "http://localhost/api/agilerun/e7a8ade8-2452-4856-9f7d-6296b3b82fc8/relationships",
          "Rel": "Relationships"
        },
        {
          "Href": "http://localhost/api/agilerun/e7a8ade8-2452-4856-9f7d-6296b3b82fc8/allrelationships",
          "Rel": "AllRelationships"
        }
      ]
    }
  ]
}

Status Code

200 - OK

POST


Creates a new agile run.

Required Permissions

  • TestManagement/ManageExecutions/ExecuteAllTests
  • TestManagement/ManageExecutions/ExecuteOnlyMyTests

Supported Expansions

For more details on expansions, please see the Expand help topic.

Status Codes

These are the expected status codes returned by the service. In addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

StatusDescription
201 - CreatedReturned if agile run is created successfully.

Example - Create agile run (minimum required information)

Example of creating a new agile run with the bare minimum of information (supplying only the package where the agile run should be created).

Request Headers

KeyValueDescription
Content-typeapplication/json
Acceptapplication/json

Request Body

{ "PackageId": "a5c52dc7-e849-4af9-ab99-a01401130d25" }

Response Headers

KeyValueDescription
Locationhttp://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "Description": null,
  "Name": "Agile Run Started At 2-05-2012 10:00:08 p.m.",
  "Notes": null,
  "Number": 1,
  "Objective": null,
  "PostCondition": null,
  "PreCondition": null,
  "PriorityId": "a79e5778-befc-4ffe-b910-873ff737296c",
  "StatusId": "f304c468-58d4-4245-a9c8-7b61a42f57f3",
  "TypeId": "27537607-6c59-4d7c-b812-d5dff13ff738",
  "PackageId": "a5c52dc7-e849-4af9-ab99-a01401130d25",
  "OrderNumber": 0,
  "ProjectId": "ef7b7b88-b990-4cb9-98b5-2d89786e51f3",
  "ProjectName": "Test Project",
  "PackageName": "Execution Sets",
  "EstimatedDuration": null,
  "ActualDuration": null,
  "ExecutionStatus": "Not Run",
  "AgileRunNumberReadOnly": false,
  "Expands": [
    "Widgets",
    "FieldValues",
    "Steps"
  ],
  "Self": "http://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "Links": [
    {
      "Href": "http://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610/relationships",
      "Rel": "Relationships"
    },
    {
      "Href": "http://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610/allrelationships",
      "Rel": "AllRelationships"
    }
  ]
}

Status Code

201 - Created

Example - Create agile run (all fields populated)

Example of creating a new agile run with all inbuilt fields populated.

Request Headers

KeyValueDescription
Content-typeapplication/json
Acceptapplication/json

Request Body

{
  "AssignedToId": "f508eb90-445e-41ba-9921-b1740ae930f8",
  "Description": "Attempting to login with an invalid password should not allow access to the application",
  "Steps": [
    {
      "Description": "Enter login and press tab",
      "ExpectedResult": "Focus moves to password field",
      "OrderNumber": 0,
      "Result": "Passed"
    },
    {
      "Description": "Enter invalid password and press enter",
      "ExpectedResult": "Error message displayed stating that username or password is invalid.",
      "Notes": "Invalid passwords must be longer then minimum length for a valid password e.g. 6 characters",
      "Data": "Example passwords: 'invalid', 'unkonwn', '$$$$$'",
      "OrderNumber": 1,
      "ActualResult": "Was logged in successfully",
      "Result": "Failed"
    }
  ],
  "Name": "Login using invalid password",
  "Notes": "Some notes about the script",
  "Number": 123,
  "Objective": "To determine if app password validation is working correctly",
  "PostCondition": "Access must be denied",
  "PreCondition": "User must exist, but with a different password to what we will attempt to login with",
  "PriorityId": "a79e5778-befc-4ffe-b910-873ff737296c",
  "StatusId": "f304c468-58d4-4245-a9c8-7b61a42f57f3",
  "TypeId": "27537607-6c59-4d7c-b812-d5dff13ff738",
  "PackageId": "a5c52dc7-e849-4af9-ab99-a01401130d25",
  "OrderNumber": 0,
  "EstimatedDuration": "5m",
  "ActualDuration": "5m"
}

Response Headers

KeyValueDescription
Locationhttp://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "AssignedToId": "f508eb90-445e-41ba-9921-b1740ae930f8",
  "AssignedTo": "Joe Bloggs",
  "Description": "Attempting to login with an invalid password should not allow access to the application",
  "Name": "Login using invalid password",
  "Notes": null,
  "Number": 123,
  "Objective": null,
  "PostCondition": null,
  "PreCondition": null,
  "PriorityId": "a79e5778-befc-4ffe-b910-873ff737296c",
  "StatusId": "f304c468-58d4-4245-a9c8-7b61a42f57f3",
  "TypeId": "27537607-6c59-4d7c-b812-d5dff13ff738",
  "PackageId": "a5c52dc7-e849-4af9-ab99-a01401130d25",
  "OrderNumber": 0,
  "ProjectId": "ef7b7b88-b990-4cb9-98b5-2d89786e51f3",
  "ProjectName": "Test Project",
  "PackageName": "Execution Sets",
  "EstimatedDuration": null,
  "ActualDuration": null,
  "ExecutionStatus": "Failed",
  "AgileRunNumberReadOnly": false,
  "Expands": [
    "Widgets",
    "FieldValues"
  ],
  "Steps": [
    {
      "Description": "Enter login and press tab",
      "ExpectedResult": "Focus moves to password field",
      "OrderNumber": 0,
      "Result": "Passed",
      "Id": "7c1d0d2d-aa32-4655-b08a-b95367a1b631"
    },
    {
      "Description": "Enter invalid password and press enter",
      "ExpectedResult": "Error message displayed stating that username or password is invalid.",
      "Notes": "Invalid passwords must be longer then minimum length for a valid password e.g. 6 characters",
      "Data": "Example passwords: 'invalid', 'unkonwn', '$$$$$'",
      "OrderNumber": 1,
      "ActualResult": "Was logged in successfully",
      "Result": "Failed",
      "Id": "ea8bc4de-cfaf-4db8-811b-f88449e1e675"
    }
  ],
  "Self": "http://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "Links": [
    {
      "Href": "http://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610/relationships",
      "Rel": "Relationships"
    },
    {
      "Href": "http://localhost/api/agilerun/4bb709c2-e0e7-4af3-9f60-a045016a9610/allrelationships",
      "Rel": "AllRelationships"
    }
  ]
}

Status Code

201 - Created

  • No labels