File: read-session.md

package info (click to toggle)
mozjs128 128.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,132,528 kB
  • sloc: javascript: 2,181,430; cpp: 1,371,420; python: 776,651; ansic: 641,398; xml: 117,736; sh: 17,537; asm: 13,468; makefile: 11,191; yacc: 4,504; perl: 2,221; lex: 1,414; ruby: 1,032; exp: 756; java: 185; sql: 66; sed: 18
file content (61 lines) | stat: -rw-r--r-- 1,466 bytes parent folder | download | duplicates (24)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# `read session` - [Tests API](../README.md#tests-api)

The `read session` method of the tests API fetches all tests contained in a test session grouped by their status.

## HTTP Request

`GET /api/tests/<session_token>`

## Response Payload

```json
{
  "token": "String",
  "pending_tests": {
    "<api_name>": "Array<String>"
  },
  "running_tests": {
    "<api_name>": "Array<String>"
  },
  "completed_tests": {
    "<api_name>": "Array<String>"
  }
}
```

- **pending_tests** are tests that have yet to be executed.
- **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.
- **completed_tests** are tests that are finished and have a result.

## Example

**Request:**

`GET /api/tests/cd922410-c344-11e9-858f-9063f6dd878f`

**Response:**

```json
{
  "token": "cd922410-c344-11e9-858f-9063f6dd878f",
  "pending_tests": {
    "apiTwo": ["/apiTwo/test/three.html"],
    "apiThree": [
      "/apiThree/test/one.html",
      "/apiThree/test/two.html",
      "/apiThree/test/three.html"
    ]
  },
  "running_tests": {
    "apiTwo": ["/apiTwo/test/two.html"]
  },
  "completed_tests": {
    "apiOne": [
      "/apiOne/test/one.html",
      "/apiOne/test/two.html",
      "/apiOne/test/three.html"
    ],
    "apiTwo": ["/apiTwo/test/one.html"]
  }
}
```