Reporting

Get all test identifiers

GET /api/megaload/all_tests/:familyUUID

Returns

List of test identifiers

Example request

curl http://localhost:8080/api/megaload/all_tests/c719a664-83cb-4ab5-b02f-0f91f3e6f512

Example response

Status: 200 OK
["test-1", "test-2"]

Get all phase identifiers

POST /api/megaload/phases/:familyUUID

Input

Name Type Info
id string Test identifier

Example

{ "id" : "test-1" }

Returns

List of phase identifiers for a given test.

Example request

curl http://localhost:8080/api/megaload/phases/c719a664-83cb-4ab5-b02f-0f91f3e6f512 --data "{\"id\" : \"test-1\"}" --header "Content-Type: application/json"

Example response

Status: 200 OK
["phase-1", "phase-2"]

Get test assertions report

GET /api/megaload/test_report/:familyUUID

Returns

The summary of the status of the test and phase assertions. Returns: the global success status, the test identifier, the test assertions status, and a list of the status of the assertions on each phase.

Example request

curl http://localhost:8080/api/megaload/test_report/c719a664-83cb-4ab5-b02f-0f91f3e6f512

Example response

Status: 200 OK
{
  "phase_assert" : [
                    {
                      "id" : "phase-1",
                      "position" : 1,
                      "success" : true
                    },
                    {
                      "id" : "phase-2",
                      "position" : 2,
                      "success" : true
                    }
                   ],
  "test_assert" : true,
  "test" : "test-1",
  "success" : true
}

Get test assertion details

GET /api/megaload/test_info/:familyUUID

Returns

The details of the test assertions.

Example request

curl http://localhost:8080/api/megaload/test_info/c719a664-83cb-4ab5-b02f-0f91f3e6f512

Example response

Status: 200 OK
{
  "assertions" :
     [
      {
        "json" : { "assert-counter" : { "id" : "global_counter_successfulRequests",
                                        "metric" : "count",
                                        "filter" : { "gt": 0 }}
                 },
        "status" : true,
        "value" : 387
      },
      {
        "json" : { "assert-counter" : { "id" : "global_counter_failedRequests",
                                        "metric" : "count",
                                        "filter" : {"eq" : 0}}
                 },
        "status" : true,
        "value" : 0
      }
     ],
  "id" : "test-1"
}

Get phase assertion details

GET /api/megaload/phase_info/:familyUUID/:phasePosition

Input

The phase position is the position returned in the get all phases request.

Returns

The details of the phase assertions.

Example request

curl http://localhost:8080/api/megaload/phase_info/c719a664-83cb-4ab5-b02f-0f91f3e6f512/1

Example response

Status: 200 OK
{
  "assertions" :
     [
      {
        "json" : { "assert-counter" : { "id" : "global_counter_failedRequests",
                                        "metric" : "count",
                                        "filter" : {"eq":0}}
                 },
        "status" : true,
        "value" : 0
      },
      {
        "json" : { "assert-histogram" : { "id" : "http_histogram_responseTime",
                                          "statistic" : "mean",
                                          "filter" : {"lt":500000}}
                 },
        "status" : true,
        "value" : 79569.54380664653
      }
     ],
  "id" : "phase-2",
  "position" : 2
}

Get response time statistics

GET /api/megaload/stat_response_time/:familyUUID

Returns

The statistics for the response time on each available protocol. HTTP only.

Example request

curl http://localhost:8080/api/megaload/stat_response_time/c719a664-83cb-4ab5-b02f-0f91f3e6f512

Example response

Status: 200 OK
[
 {
   "protocol" : "http",
   "data" : {
              "mean" : 82405,
              "min" : 48690,
              "max" : 473296,
              "median" : 81439,
              "percentile" : [{ "index" : 50, "value" : 81439 },
                              { "index" : 75, "value" : 89824 },
                              { "index" : 90, "value" : 104831 },
                              { "index" : 95, "value" : 120023 },
                              { "index" : 99, "value" : 159389 },
                              { "index" : 999, "value" : 473296 }]
            }
 }
]

Get response time statistics per URL

GET /api/megaload/stat_response_time_per_url/:familyUUID

Returns

The average response time per URL. HTTP only.

Example request

curl http://localhost:8080/api/megaload/stat_response_time_per_url/c719a664-83cb-4ab5-b02f-0f91f3e6f512

Example response

Status: 200 OK
[
 {
   "path" : "/",
   "host" : "74.125.230.247",
   "mean" : 82404.7803617571
 }
]

Get rate statistics

GET /api/megaload/stat_rate/:familyUUID

Returns

The statistics for the global rate in requests per second. It includes all protocols.

Example request

curl http://localhost:8080/api/megaload/stat_rate/c719a664-83cb-4ab5-b02f-0f91f3e6f512

Example response

Status: 200 OK
[
 {
   "path" : "/",
   "host" : "74.125.230.247",
   "mean" : 82404.7803617571
 }
]

Get configuration

GET /api/megaload/get_configuration/:familyUUID

Returns

The test configuration stored in Megaload. Returns all tests, phases, scenarios and plugins in JSON format on a single file.

Example request

curl http://localhost:8080/api/megaload/get_configuration/c719a664-83cb-4ab5-b02f-0f91f3e6f512

Example response

Status: 200 OK
[
 { "test" : { "id" : "test-1",
            "phases" : ["phase-1"],
            "plugins" : ["server-under-test"] }
 },
 { "plugin" : { "id" : "server-under-test",
             "plugin_info" : {"http-plugin" : { "servers" : [{ "host" : "127.0.0.1",
                                                     "port" : 80,
                                                   "ssl" : false }]
                                      }
                         }
           }
 },
 { "phase" : { "id" : "phase-1",
             "arrival_rate" : 10,
             "duration" : 30000,
             "concurrent_scenarios" : 1,
             "rate" : 5,
             "scenarios" : [ { "main-page" : 1 } ]}
 },
 {"scenario" : { "id" : "main-page",
             "actions" : [ 
                {"http-request" : {"plugin_id" : "SUT_server",
                               "method" : "GET",
                               "path" : "/",
                                       "headers" : {"Cookie" : "PREF=ID=1345ds2345d3",
                                                    "Connection" : "keep-alive"},
                                       "assert_status" : "200"}}
                         ]
             }
 }
]