Follow

API - RESULTS

CHECK PROGRESS AND RESULT

Results can be checked via the test_instances API. You will need the test instance ID, that is returned when the RUN API is called.

The RUN API returns a JSON response with the following information:

{"msg":"Test Plan is enqueued.","test_id":456}

 

The test_id value needs to be passed to the test_instance API in the following way:

GET https://divecloud.nouvola.com/api/v1/test_instances/{test_instance_id}

Based on our example, it will be:

curl -X GET -H 'Content-Type: application/json' -H 'x-api: abc' https://divecloud.nouvola.com/api/v1/test_instances/456

 

This will return the following, if the test is still running.

{
"status”:”Working”,
 "outcome":”Pending"
}

This will return the result, if the test has completed:

{
"status”:"Emailed”,
 "outcome”:”Pass"
}


The field outcome assumes that the test was run with a  threshold set.  If the threshold is not set it will be set to null.

For more information about setting a threshold please go the the Threshold Help Page

To retrieve an overview of the results:

GET https://divecloud.nouvola.com/api/v1/test_instances/{test_instance_id}

This returns a JSON response (see below for sample).

To retrieve one session's results, get the session ID from the JSON response and then call:

GET https://divecloud.nouvola.com/api/v1/test_instances/{test_instance_id}?session_id={session_id}

To retrieve one URL's results:

GET https://divecloud.nouvola.com/api/v1/test_instances/{test_instance_id}?session_id={session_id}&url={url}&method={method}


Alternatively, each URL has an url_id that can be used instead, and does not require to insert session and URL name & method:

GET https://divecloud.nouvola.com/api/v1/test_instances/{test_instance_id}?url_id={url_id}

(If URL has no associated session, omit session_Id parameter or set it as null)

Example curl calls:

curl -i -H "x-api: abc" https://divecloud.nouvola.com/api/v1/test_instances/456 -k
curl -i -H "x-api: abc" "https://divecloud.nouvola.com/api/v1/test_instances/456?url=http://www.acme.com&method=GET" -k
">curl -i -H "x-api: abc" https://divecloud.nouvola.com/api/v1/test_instances/456?url_id=221

 

Where 221 is taken from the example below, as the first url_id.

 

Example of results in JSON format:

{
    "plan": "UI_MULTI",
    "status": "Complete",
    "run_date": "2015-01-16T23:43:51.023-08:00",
    "outcome": "Pass",
    "requests_per_interval": {
        "no_response": [
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0"
        ],
        "success": [
            "368",
            "720",
            "984",
            "1280",
            "1560",
            "1824",
            "2128",
            "1152",
            "1152",
            "1280"
        ],
        "client_errors": [
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0"
        ],
        "server_errors": [
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0"
        ],
        "duration": [
            "1.0",
            "2.0",
            "3.0",
            "4.0",
            "5.0",
            "6.0",
            "7.0",
            "8.0",
            "9.0",
            "10.0"
        ]
    },
    "request_error_rates": {
        "no_response": 0,
        "success": 12448,
        "redirects": 0,
        "client_errors": 0,
        "server_errors": 0,
        "request_count": 12448
    },
    "average_response_time": {
        "concurrent_users": [
            "3",
            "6",
            "9",
            "12",
            "15",
            "18",
            "21",
            "24",
            "27",
            "30"
        ],
        "response_time": [
            "76.18",
            "97.24",
            "101.48",
            "100.59",
            "91.99",
            "82.96",
            "90.32",
            "111.13",
            "90.95",
            "90.82"
        ],
        "test_duration": [
            "0",
            "60",
            "120",
            "180",
            "240",
            "300",
            "360",
            "420",
            "480",
            "540",
            "600"
        ]
    },
    "lengths": {
        "successful_requests": [
            "76.18",
            "97.24",
            "101.48",
            "100.59",
            "91.99",
            "82.96",
            "90.32",
            "111.13",
            "90.95",
            "90.82"
        ],
        "time_to_first_byte": [
            "71.33",
            "89.01",
            "93.88",
            "95.19",
            "88.7",
            "80.22",
            "87.59",
            "104.52",
            "87.53",
            "87.16"
        ],
        "redirect_time": [
            "0.0",
            "0.0",
            "0.0",
            "0.0",
            "0.0",
            "0.0",
            "0.0",
            "0.0",
            "0.0",
            "0.0"
        ],
        "dns_time": [
            "0.66",
            "0.55",
            "0.34",
            "0.17",
            "0.28",
            "0.15",
            "0.32",
            "0.3",
            "0.13",
            "0.49"
        ],
        "connection_time": [
            "4.58",
            "3.95",
            "1.48",
            "2.1",
            "1.54",
            "1.63",
            "1.91",
            "2.47",
            "1.18",
            "1.86"
        ],
        "ssl_time": [
            "5.9",
            "2.2",
            "0.77",
            "1.87",
            "1.06",
            "0.94",
            "1.04",
            "1.32",
            "0.91",
            "1.32"
        ],
        "errors": [
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0"
        ]
    },
    "sessions": [
        {
            "id": 74,
            "name": "CVSESS",
            "urls": [
                {
                    "id": 221,
                    "url": "http://www.cloudvola.com",
                    "method": "GET",
                    "avg_response_time": 74,
                    "min": 32,
                    "max": 605
                },
                {
                    "id": 220,
                    "url": "http://www.cloudydaystechnologies.com",
                    "method": "GET",
                    "avg_response_time": 95,
                    "min": 46,
                    "max": 1023
                }
            ]
        },
        {
            "id": 75,
            "name": "DC users signin",
            "urls": [
                {
                    "id": 234,
                    "url": "https://divecloud.nouvola.com/users/sign_in",
                    "method": "GET",
                    "avg_response_time": 117,
                    "min": 47,
                    "max": 1440
                }
            ]
        }
    ]
}

 

0 Comments

Please sign in to leave a comment.
Powered by Zendesk