Debian Codegraph @

testing/web-platform/tests/tools/wave/docs/rest-api/tests-api/read-last-completed.md

raw
1 # `read last completed` - [Tests API](../README.md#tests-api)
2
3 The `read last completed` method of the tests API returns a list of test files, which most recently finished and have a result. The files are grouped by the status their respective result had.
4
5 ## HTTP Request
6
7 `GET /api/tests/<session_token>/last_completed`
8
9 ## Query Parameters
10
11 | Parameter | Desciption | Default | Example |
12 | --------- | ------------------------------------------------------------------------------------------------------------------------- | ------- | --------------------- |
13 | `count` | Number of files per status to return | 5 | `count=5` |
14 | `status` | The status the files results must have. Comma separated list. Possible values: `all`, `pass`, `fail` and `timeout` | `all` | `status=timeout,pass` |
15
16 ## Response Payload
17
18 ```json
19 {
20 "pass": "Array<String>",
21 "fail": "Array<String>",
22 "timeout": "Array<String>"
23 }
24 ```
25
26 ## Example
27
28 **Request:**
29
30 `GET /api/tests/7dafeec0-c351-11e9-84c5-3d1ede2e7d2e/last_completed?count=3&status=fail,timeout`
31
32 **Response:**
33
34 ```json
35 {
36 "fail": [
37 "/apiTwo/test/four.html",
38 "/apiOne/test/twentyfour.html",
39 "/apiOne/test/nineteen.html"
40 ],
41 "timeout": [
42 "/apiFive/test/eight.html",
43 "/apiThree/test/five.html",
44 "/apiThree/test/two.html"
45 ]
46 }
47 ```