Skip to content

TestExecutionRuns

Find test run by test analysis id

Attempt to find a test execution run specified by a test analysis id

Request

get /testexecution/testruns/{test_analysis_id}/picker

Parameters

Parameter Path/Query Type Required Notes
test_analysis_id path integer yes defines the id of a test analysis

Request body

This endpoint does not have a request body


curl --location 'https://example.juno.one/testexecution/testruns/1/picker' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA' \
--header 'X-tenantID: example'
import requests

url = "https://example.juno.one/testexecution/testruns/1/picker"

payload = {}
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val request = Request.Builder()
  .url("https://example.juno.one/testexecution/testruns/1/picker")
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of find test execution run specified by test analysis id has the status 200 with following response body:

[
      {
        "id": "test",
        "batchId": 1,
        "status": {
          "id": 0,
          "name": "test",
          "projectId": {
            "id": 13,
            "name": "test",
            "test_case_robust": true
          },
          "state": 0,
          "color": "#29a745"
        },
        "testAnalysisId": 1
      }
]

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test analysis with id 30 was not found.",
    "path": "/testexecution/testruns/30/picker"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/testexecution/testruns/30/picker"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path": "/testexecution/testruns/30/picker"
}

Find test run by jira issue and project id

Attempt to find a test execution run specified by a jira issue id and a project id

Request

get /testexecution/testruns/{jiraIssueId}/{ProjectId}

Parameters

Parameter Path/Query Type Required Notes
jiraIssueId path string yes defines the jira issue id
projectId path integer yes defines the project id

Request body

This endpoint does not have a request body


curl --location 'https://example.juno.one/testexecution/testruns/13/1' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA' \
--header 'X-tenantID: example'
import requests

url = "https://example.juno.one/testexecution/testruns/13/1"

payload = {}
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val request = Request.Builder()
  .url("https://example.juno.one/testexecution/testruns/13/1")
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of find test execution run specified by jira issue and project id has the status 200 with following response body:

[
  {
    "testAnalysisId": 1,
    "runId": "test",
    "testSteps": [
      {
        "id": 1,
        "creatorId": {
          "id": 2,
          "firstname": "test",
          "lastname": "test",
          "email": "test@juno.one",
          "avatar": "9",
          "deleted": false
        },
        "precondition": "test",
        "expected_result": "test",
        "deleted": false,
        "deleted_at": "2020-06-03T00:00:00.000Z",
        "created_at": "2020-06-03T00:00:00.000Z",
        "updated_at": "2020-06-03T00:00:00.000Z",
        "position": 1,
        "visible": false,
        "testExecution": {
          "id": 1,
          "testPlanId": {
            "id": 2,
            "name": "test"
          },
          "testStepId": 1,
          "creatorId": {
            "id": 2,
            "firstname": "test",
            "lastname": "test",
            "email": "test@juno.one",
            "avatar": "9",
            "deleted": false
          },
          "statusId": {
            "id": 0,
            "name": "test",
            "projectId": {
              "id": 13,
              "name": "test",
              "test_case_robust": true
            },
            "state": 0,
            "color": "#29a745"
          },
          "actual_result": "test",
          "duration": 1,
          "position": 1,
          "batchId": 1,
          "jirraIssueId": "DNTPPJI-1",
          "jirraIssueUrl": "https://domain.atlassian.net/browse/DNTPPJI-189",
          "created_at": "2023-03-16T10:17:04.000Z",
          "updated_at": "2023-03-16T10:17:04.000Z",
          "related_issues": [
            {
              "id": 2,
              "issueTypeId": {
                "id": 2,
                "name": "test"
              },
              "statusId": {
                "id": 13,
                "name": "test",
                "color": "#29a745",
                "deleted": true,
                "final": true
              },
              "closed": true,
              "deleted": true
            }
          ],
          "related_jira_issues": [
            {
              "id": 2,
              "jiraIssueId": 14,
              "jiraKeyId": "DNTPPJI-1",
              "jiraLink": "https://domain.atlassian.net/browse/DNTPPJI-189",
              "closed": true,
              "closed_at": "2023-03-16T12:23:30.000Z",
              "deleted": true,
              "deleted_at": true,
              "created_at": "2023-03-16T12:23:30.000Z",
              "updated_at": "2023-03-16T12:23:30.000Z"
            }
          ]
        },
        "labels": [
          {
            "id": 22,
            "name": "test",
            "previous_name": "prevtest",
            "color": "#c0507e",
            "previous_color": "#c0507e",
            "created_at": "2022-09-05T18:59:37.000Z",
            "updated_at": "2022-09-05T18:59:37.000Z",
            "projectId": 13,
            "gitlabLabelId": 2,
            "deleted": true,
            "deleted_at": "2022-09-05T18:59:37.000Z"
          }
        ]
      }
    ]
  }
]

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Project with id 13 was not found.",
    "path": "/testexecution/testruns/14/13"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/testexecution/testruns/14/13"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path": "/testexecution/testruns/14/13"
}

Cancel test run

Attempt to cancel a test execution run

Request

post /testexecution/cancel-run

Request body

Attribute Type Required Notes
executionId integer yes defines the id of a test execution
status_id integer yes defines the id of a status
actual_result string yes defines the actual result of a test run

Request body example

[
{
"executionId": 1,
"status_id": 1,
"actual_result": "1"
}
]
curl --location 'https://example.juno.one/testexecution/cancel-run' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA' \
--header 'X-tenantID: example' \
--header 'Content-Type: application/json' \
--data '[
          {
            "executionId": 1,
            "status_id": 1,
            "actual_result": "1"
          }
        ]'
import requests
import json

url = "https://example.juno.one/testexecution/cancel-run"

payload = json.dumps([
  {
    "executionId": 1,
    "status_id": 1,
    "actual_result": "1"
  }
])
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "[\n          {\n            \"executionId\": 1,\n            \"status_id\": 1,\n            \"actual_result\": \"1\"\n          }\n        ]".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/testexecution/cancel-run")
  .post(body)
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .addHeader("Content-Type", "application/json")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of cancel test execution run has the status 200 with no response body.

400 Bad Request

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 400,
    "error": "Bad Request",
    "message": "The request is missing executionId",
    "path": "/testexecution/cancel-run"
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test execution with id 30 was not found.",
    "path": "/testexecution/cancel-run"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/testexecution/cancel-run"
}

412 Precondition failed

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 412,
    "error": "Precondition failed",
    "message": "You do not have permission for this action",
    "path" : "/testexecution/cancel-run"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path" : "/testexecution/cancel-run"
}

Stop run

Attempt to stop a test execution run specified by a test analysis id and batch id

Request

post /testexecution/{test_analysis_id}/stop-execution/{batch_id}

Parameters

Parameter Path/Query Type Required Notes
batch_id path integer yes defines the id of a batch
test_analysis_id path integer yes defines the id of a test analysis

Request body

This endpoint does not have a request body


curl --location --request POST 'https://example.juno.one/testexecution/1/stop-execution/2' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA' \
--header 'X-tenantID: example'
import requests

url = "https://example.juno.one/testexecution/1/stop-execution/2"

payload = {}
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val mediaType = "text/plain".toMediaType()
val body = "".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/testexecution/1/stop-execution/2")
  .post(body)
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of stop test execution run has the status 200 with no response body.

400 Bad Request

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 400,
    "error": "Bad Request",
    "message": "The request is missing batch_id parameter",
    "path": "/testexecution/1/stop-execution/2"
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Batch with id 2 was not found.",
    "path": "/testexecution/1/stop-execution/2"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/testexecution/1/stop-execution/2"
}

412 Precondition failed

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 412,
    "error": "Precondition failed",
    "message": "You do not have permission for this action",
    "path": "/testexecution/1/stop-execution/2"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path": "/testexecution/1/stop-execution/2"
}