Debian Codegraph @

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

raw
1 # `read session` - [Tests API](../README.md#tests-api)
2
3 The `read session` method of the tests API fetches all tests contained in a test session grouped by their status.
4
5 ## HTTP Request
6
7 `GET /api/tests/<session_token>`
8
9 ## Response Payload
10
11 ```json
12 {
13 "token": "String",
14 "pending_tests": {
15 "<api_name>": "Array<String>"
16 },
17 "running_tests": {
18 "<api_name>": "Array<String>"
19 },
20 "completed_tests": {
21 "<api_name>": "Array<String>"
22 }
23 }
24 ```
25
26 - **pending_tests** are tests that have yet to be executed.
27 - **running_tests** are tests that are currently executed by the device under test. Although only one test at a time is executed, test that time out or fail to send a result may still wait for the time out to occur. In this case there are multiple tests in this list.
28 - **completed_tests** are tests that are finished and have a result.
29
30 ## Example
31
32 **Request:**
33
34 `GET /api/tests/cd922410-c344-11e9-858f-9063f6dd878f`
35
36 **Response:**
37
38 ```json
39 {
40 "token": "cd922410-c344-11e9-858f-9063f6dd878f",
41 "pending_tests": {
42 "apiTwo": ["/apiTwo/test/three.html"],
43 "apiThree": [
44 "/apiThree/test/one.html",
45 "/apiThree/test/two.html",
46 "/apiThree/test/three.html"
47 ]
48 },
49 "running_tests": {
50 "apiTwo": ["/apiTwo/test/two.html"]
51 },
52 "completed_tests": {
53 "apiOne": [
54 "/apiOne/test/one.html",
55 "/apiOne/test/two.html",
56 "/apiOne/test/three.html"
57 ],
58 "apiTwo": ["/apiTwo/test/one.html"]
59 }
60 }
61 ```