Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Page Tree
rootREST API
spacesTFJC
startDepth1

Below are the list of REST APIs we developed:

GET /rest/testray/latest/public/testPlan/{testPlanIssueKey}/cycles

Expand
titleGet Test Cycles in a Test Plan
Status
colourGreen
titlesample
: http://testray.goldfingerholdings.onl/rest/testray/latest/public/testPlan/FRS-25/cycles)

Status
colourBlue
titleResponse

Code Block
languagejs
[
    {
        "id": 3377,
        "name": "Round 1 - Chrome",
        "environment": "Chrome",
        "status": "Active",
        "build": "Build 1.0",
        "plannedStartDate": "2022-01-03T00:00:00.000+00:00",
        "plannedEndDate": "2022-02-04T00:00:00.000+00:00",
        "cycleStartedDate": null,
        "completed": false,
        "active": true,
        "aborted": false,
        "draft": false,
        "deleteable": false
    },
    {
        "id": 3378,
        "name": "Round 2 - Firefox",
        "environment": "Firefox88",
        "status": "Active",
        "build": "Build 1.0",
        "plannedStartDate": "2022-02-01T00:00:00.000+00:00",
        "plannedEndDate": "2022-03-31T00:00:00.000+00:00",
        "cycleStartedDate": null,
        "completed": false,
        "active": true,
        "aborted": false,
        "draft": false,
        "deleteable": false
    }
]
Expand
titleGet Test Runs from a Test Cycle by Cycle Id

GET /rest/testray/latest/public/testPlan/{testPlanIssueKey}/cycle/cycleId/testRunsByCycleId

Status
colourGreen
titlesample
: http://testray.goldfingerholdings.onl/rest/testray/latest/public/testPlan/FRS-25/cycle/3377/testRunsByCycleId

Status
colourBlue
titleResponse

Code Block
languagejs
[
    {
        "id": 217677,
        "status": "Passed",
        "executionTimeStamp": "2022-06-22T11:09:26.000+00:00",
        "summary": "Return flight information if flight number is correct.",
        "testCaseId": 43120,
        "testCaseKey": "FRS-5",
        "attachments": [],
        "bugs": []
    },
    {
        "id": 217678,
        "status": "Passed",
        "executionTimeStamp": "2022-06-22T11:09:27.000+00:00",
        "summary": "Return an error if flight number is incorrect.",
        "testCaseId": 43121,
        "testCaseKey": "FRS-6",
        "attachments": [],
        "bugs": []
    },
    {
        "id": 217679,
        "status": "Passed",
        "executionTimeStamp": "2022-06-22T11:09:28.000+00:00",
        "summary": "Return flight information if date is valid.",
        "testCaseId": 43122,
        "testCaseKey": "FRS-7",
        "attachments": [],
        "bugs": []
    },
    {
        "id": 217682,
        "status": "Passed",
        "executionTimeStamp": "2022-06-22T11:10:32.000+00:00",
        "summary": "Valid the bank name",
        "testCaseId": 43116,
        "testCaseKey": "FRS-1",
        "attachments": [],
        "bugs": []
    },
    {
        "id": 217683,
        "status": "Failed",
        "executionTimeStamp": "2022-06-22T11:14:35.000+00:00",
        "summary": "Return error if name is not correct",
        "testCaseId": 43117,
        "testCaseKey": "FRS-2",
        "attachments": [
            {
                "id": 6948,
                "fileName": "/storage/testray/uploads/attachments/26/217/217683/376607/Test_Image_1.png",
                "mimeType": "image/png"
            }
        ],
        "bugs": [
            {
                "id": 10218,
                "summary": "There is no error returned.",
                "key": "FRS-26"
            }
        ]
    },
    {
        "id": 217685,
        "status": "Passed",
        "executionTimeStamp": "2022-06-22T11:15:04.000+00:00",
        "summary": "Return error if sex is not correct",
        "testCaseId": 43119,
        "testCaseKey": "FRS-4",
        "attachments": [],
        "bugs": []
    }
]
Expand
titleGet Test Run Details by Test Run Id

GET /rest/testray/latest/public/testRun/{testRunId}

Status
colourGreen
titlesample
: http://testray.goldfingerholdings.onl/rest/testray/latest/public/testRun/217677

Status
colourBlue
titleResponse

Code Block
languagejs
{
    "id": 217677,
    "status": "Passed",
    "executionTimeStamp": "2022-06-22T11:09:26.000+00:00",
    "summary": "Return flight information if flight number is correct.",
    "testCaseId": 43120,
    "testCaseKey": "FRS-5",
    "attachments": [],
    "bugs": [],
    "testRunSteps": [
        {
            "id": 376582,
            "status": "Passed",
            "expectedResult": "Expected result for step 1",
            "step": "It is the first step",
            "testRunStepAttachments": [],
            "testRunStepBugs": []
        },
        {
            "id": 376583,
            "status": "Passed",
            "expectedResult": null,
            "step": "It is the second step",
            "testRunStepAttachments": [],
            "testRunStepBugs": []
        },
        {
            "id": 376584,
            "status": "Passed",
            "expectedResult": "Expected result for step 3",
            "step": "It is the third step",
            "testRunStepAttachments": [],
            "testRunStepBugs": []
        }
    ]
}
Expand
titleUpdate Test Run Result by Using Test Run Id

PUT /rest/testray/latest/public/testRun/update

Status
colourBlue
titleRequest

Code Block
languagejs
{
    "runId":217677,
    "result": "Failed",
    "comment": "API Run Level Comment",
    "bugs":["FRS-26"], 
    "executorId": "5f115539e5efc1001bbd5051"
}
Expand
titleUpdate Test Run Step Result by Using Test Run Step Id

PUT /rest/testray/latest/public/testRun/updateStep

Status
colourBlue
titleRequest

Code Block
languagejs
{ "runStepId": 376584, "result": "Passed", "actualResult": "API Test Run Step Comment, 3rd Step", "bugs":["FRS-27"], "executorId": "5f115539e5efc1001bbd5051" } Info

More and more APIs are still under development …