Test Result Repositories - sonata-nfv/tng-rep GitHub Wiki
This page details the Test Result Repositories API.
Test Result Repositories are created or updated as a consequence of service instantiation. The API endpoints are responsible for handling the test result information of tests performed by 5GTANGO VnV. The test records are used by 5GTANGO VnV to store the results of the tests and the progress.
Through this endpoint GET request, the trr returns a JSON
formatted paginated list of test-plans.
- Request:
curl -X GET -H "Content-type:application/json" <base URL>/trr/test-plans
- Response:
[
{
"created_at": "2018-02-26T16:27:55.863+00:00",
"descriptor_version": "u1XvQWLbFaQQn.X8rBMr9pRwJSAZy5WhBFy8_OUt9-SzGOAR.490Oc4Ns.XtUN_8QhIJ6VXKbXza.TdAy08kC4",
"status": "normal operation",
"updated_at": "2018-02-26T16:27:55.863+00:00",
"uuid": "32adeb1e-d981-16ec-dc44-e288e80067a1",
"version": "1"
}
]
Through this endpoint POST request, the trr store a JSON
of a test-plans.
- Request:
curl -X POST-H "Content-type:application/json" --data-binary @spec/fixtures/trr-example.json <base URL>/trr/test-plans
- Response:
[
{
"created_at": "2018-02-26T16:27:55.863+00:00",
"descriptor_version": "u1XvQWLbFaQQn.X8rBMr9pRwJSAZy5WhBFy8_OUt9-SzGOAR.490Oc4Ns.XtUN_8QhIJ6VXKbXza.TdAy08kC4",
"status": "normal operation",
"updated_at": "2018-02-26T16:27:55.863+00:00",
"uuid": "32adeb1e-d981-16ec-dc44-e288e80067a1",
"version": "1"
}
]
Through this endpoint GET request, the trr returns a JSON
of a test-plan requested.
- Request:
curl -X GET -H "Content-type:application/json" <base URL>/trr/test-plans
- Response:
[
{
"created_at": "2018-02-26T16:27:55.863+00:00",
"descriptor_version": "u1XvQWLbFaQQn.X8rBMr9pRwJSAZy5WhBFy8_OUt9-SzGOAR.490Oc4Ns.XtUN_8QhIJ6VXKbXza.TdAy08kC4",
"status": "normal operation",
"updated_at": "2018-02-26T16:27:55.863+00:00",
"uuid": "32adeb1e-d981-16ec-dc44-e288e80067a1",
"version": "1"
}
]
Through this endpoint GET request, the plan-test sended as JSON
will be updated.
- Request:
curl -X PUT-H "Content-type:application/json" -d '{"status":"terminated","descriptor_version":"u1XvQWLbFaQQn.X8rBMr9pRwJSAZy5WhBFy8_OUt9-SzGOAR.490Oc4Ns.XtUN_8QhIJ6VXKbXza.TdAy08kC4","id":"32adeb1e-d981-16ec-dc44-e288e80067a1"}'<base URL>//trr/test-plans/<test_plan_uuid>
- Response:
[
{
"created_at": "2018-02-26T16:27:55.863+00:00",
"descriptor_version": "u1XvQWLbFaQQn.X8rBMr9pRwJSAZy5WhBFy8_OUt9-SzGOAR.490Oc4Ns.XtUN_8QhIJ6VXKbXza.TdAy08kC4",
"status": "normal operation",
"updated_at": "2018-02-26T16:27:55.863+00:00",
"uuid": "32adeb1e-d981-16ec-dc44-e288e80067a1",
"version": "1"
}
]
Through this endpoint DELETE request, the uuid of the test-plan sent will be deleted.
curl -X DELETE <base URL>/trr/test-plans/<test_plan_uuid>
Response:
- Headers:
- Status: 200 OK
- Content-Type text/html
- Body:
- Empty
Through this endpoint GET request, the trr returns a JSON
formatted paginated list of test-suite-results.
- Request:
curl -X GET -H "Content-type:application/json" <base URL>/trr/test-suite-results
- Response:
[
{
"created_at": "2018-02-26T16:27:55.863+00:00",
"descriptor_version": "u1XvQWLbFaQQn.X8rBMr9pRwJSAZy5WhBFy8_OUt9-SzGOAR.490Oc4Ns.XtUN_8QhIJ6VXKbXza.TdAy08kC4",
"status": "normal operation",
"updated_at": "2018-02-26T16:27:55.863+00:00",
"uuid": "32adeb1e-d981-16ec-dc44-e288e80067a1",
"version": "1"
}
]
Aditionally, the endpoint allow searches by ns_uuid or test_uuid.
curl -X GET -H "Content-type:application/json" <base URL>/trr/test-suite-results?ns_uuid=<uuid>
curl -X GET -H "Content-type:application/json" <base URL>/trr/test-suite-results?test_uuid=<uuid>
Through this endpoint POST request, the trr store a JSON
of a test-suite-result.
- Request:
curl -X POST-H "Content-type:application/json" --data-binary @spec/fixtures/trr-example.json <base URL>/trr/test-suite-results
- Response:
[
{
"created_at": "2018-02-26T16:27:55.863+00:00",
"descriptor_version": "u1XvQWLbFaQQn.X8rBMr9pRwJSAZy5WhBFy8_OUt9-SzGOAR.490Oc4Ns.XtUN_8QhIJ6VXKbXza.TdAy08kC4",
"status": "normal operation",
"updated_at": "2018-02-26T16:27:55.863+00:00",
"uuid": "32adeb1e-d981-16ec-dc44-e288e80067a1",
"version": "1"
}
]
Through this endpoint GET request, the trr returns a JSON
of a test-suite-result requested.
- Request:
curl -X GET -H "Content-type:application/json" <base URL>/trr/test-suite-results
- Response:
[
{
"created_at": "2018-02-26T16:27:55.863+00:00",
"descriptor_version": "u1XvQWLbFaQQn.X8rBMr9pRwJSAZy5WhBFy8_OUt9-SzGOAR.490Oc4Ns.XtUN_8QhIJ6VXKbXza.TdAy08kC4",
"status": "normal operation",
"updated_at": "2018-02-26T16:27:55.863+00:00",
"uuid": "32adeb1e-d981-16ec-dc44-e288e80067a1",
"version": "1"
}
]
Through this endpoint GET request, the test-suite-result sended as JSON
will be updated.
- Request:
curl -X PUT-H "Content-type:application/json" -d '{"status":"terminated","descriptor_version":"u1XvQWLbFaQQn.X8rBMr9pRwJSAZy5WhBFy8_OUt9-SzGOAR.490Oc4Ns.XtUN_8QhIJ6VXKbXza.TdAy08kC4","id":"32adeb1e-d981-16ec-dc44-e288e80067a1"}'<base URL>//trr/test-suite-results/<test_plan_uuid>
- Response:
[
{
"created_at": "2018-02-26T16:27:55.863+00:00",
"descriptor_version": "u1XvQWLbFaQQn.X8rBMr9pRwJSAZy5WhBFy8_OUt9-SzGOAR.490Oc4Ns.XtUN_8QhIJ6VXKbXza.TdAy08kC4",
"status": "normal operation",
"updated_at": "2018-02-26T16:27:55.863+00:00",
"uuid": "32adeb1e-d981-16ec-dc44-e288e80067a1",
"version": "1"
}
]
Through this endpoint DELETE request, the uuid of the test-plan sent will be deleted.
curl -X DELETE <base URL>/trr/test-suite-results/<test_suite_result_uuid>
Response:
- Headers:
- Status: 200 OK
- Content-Type text/html
- Body:
- Empty
Through this endpoint GET request, the Records returns a plain text with the message pong and 200OK. It can be used as readiness probe.
- Request:
curl -X GET <base URL>/nsrs/ping
- Response:
pong