Data examples
This page provides examples of the various data sent to Launchable with the CLI.
You can also use the --log-level audit global option when you invoke the CLI to view exactly what data was passed in the request. See CLI reference.

Recording builds

e.g. launchable record build --name 549854157 --source .

Request 1: Create a build

POST body sent to the Launchable API:
1
{
2
"buildNumber": "549854157",
3
"commitHashes": [
4
{
5
"repositoryName": ".",
6
"commitHash": "8fc4e65781dc63605d336b1883497f051daff946"
7
}
8
]
9
}
Copied!

Request 2: Record commits

There was --scrub-pii CLI option. Now this is on by default, and this option becomes no-op. Full names are removed and email addresses are hashed before sending. Previously sent data is already scrubbed on the server side, and even if you use the old version of CLI without this option being on, the server will scrub the PIIs upon arrival.
  • Removes full names from the payload (authorName and committerName), and
  • Hashes email addresses before sending (authorEmailAddress and committerEmailAddress)
POST body sent to the Launchable API:
1
{
2
"commits": [
3
{
4
"id": 0,
5
"workspaceId": 0,
6
"commitHash": "ff84e8fbcb4ddc88879adc3c49760e2562aba1d8",
7
"authorName": "",
8
"authorEmailAddress": "994a70d1ac542e847f24abfcbe05e68926c281c81cd13c704964800d58d022e3",
9
"authorWhen": 1611341818000,
10
"authorTimezoneOffset": -480,
11
"committerName": "",
12
"committerEmailAddress": "994a70d1ac542e847f24abfcbe05e68926c281c81cd13c704964800d58d022e3",
13
"committerWhen": 1611341818000,
14
"committerTimezoneOffset": -480,
15
"organizationId": 0,
16
"parentHashes": {}
17
},
18
{
19
"id": 0,
20
"workspaceId": 0,
21
"commitHash": "76cf64103a2dfc5c4e62b6c19526dc66e554b34c",
22
"authorName": "",
23
"authorEmailAddress": "994a70d1ac542e847f24abfcbe05e68926c281c81cd13c704964800d58d022e3",
24
"authorWhen": 1611775208000,
25
"authorTimezoneOffset": -480,
26
"committerName": "",
27
"committerEmailAddress": "994a70d1ac542e847f24abfcbe05e68926c281c81cd13c704964800d58d022e3",
28
"committerWhen": 1611775208000,
29
"committerTimezoneOffset": -480,
30
"organizationId": 0,
31
"parentHashes": {
32
"ff84e8fbcb4ddc88879adc3c49760e2562aba1d8": [
33
{
34
"id": 0,
35
"commitRelationId": 0,
36
"linesAdded": 1,
37
"linesDeleted": 1,
38
"status": "MODIFY",
39
"path": "gradle/.gitignore",
40
"pathTo": "gradle/.gitignore",
41
"organizationId": 0
42
},
43
{
44
"id": 0,
45
"commitRelationId": 0,
46
"linesAdded": 2,
47
"linesDeleted": 2,
48
"status": "ADD",
49
"path": "/dev/null",
50
"pathTo": "gradle/ci.sh",
51
"organizationId": 0
52
}
53
]
54
}
55
},
56
{
57
"id": 0,
58
"workspaceId": 0,
59
"commitHash": "86a656d2ca948ec5f845e177ae9be7a8ca9a8208",
60
"authorName": "",
61
"authorEmailAddress": "994a70d1ac542e847f24abfcbe05e68926c281c81cd13c704964800d58d022e3",
62
"authorWhen": 1611775770000,
63
"authorTimezoneOffset": -480,
64
"committerName": "",
65
"committerEmailAddress": "994a70d1ac542e847f24abfcbe05e68926c281c81cd13c704964800d58d022e3",
66
"committerWhen": 1611775927000,
67
"committerTimezoneOffset": -480,
68
"organizationId": 0,
69
"parentHashes": {
70
"76cf64103a2dfc5c4e62b6c19526dc66e554b34c": [
71
{
72
"id": 0,
73
"commitRelationId": 0,
74
"linesAdded": 19,
75
"linesDeleted": 19,
76
"status": "MODIFY",
77
"path": "gradle/ci.sh",
78
"pathTo": "gradle/ci.sh",
79
"organizationId": 0
80
}
81
]
82
}
83
},
84
...
85
]
86
}
Copied!

Subsetting tests

e.g. launchable subset --target 25% --build 549854157 gradle src/test/java
POST body sent to the Launchable API:
1
{
2
"testPaths": [
3
[
4
{
5
"type": "class",
6
"name": "example.MulTest"
7
}
8
],
9
[
10
{
11
"type": "class",
12
"name": "example.AddTest"
13
}
14
],
15
[
16
{
17
"type": "class",
18
"name": "example.SubTest"
19
}
20
],
21
[
22
{
23
"type": "class",
24
"name": "example.DivTest"
25
}
26
]
27
],
28
"target": 0.25,
29
"session": {
30
"id": "6370"
31
}
32
}
Copied!

Recording test results

e.g. launchable record test --debug --build 549854157 gradle build/test-results/test/*.xml
POST body sent to the Launchable API:
1
{
2
"events": [
3
{
4
"type": "case",
5
"testPath": [
6
{
7
"type": "class",
8
"name": "example.AddTest"
9
},
10
{
11
"type": "testcase",
12
"name": "calc"
13
}
14
],
15
"duration": 0.004,
16
"status": 1,
17
"stdout": "",
18
"stderr": "",
19
"created_at": "2021-02-19T21:33:02",
20
"data": null
21
},
22
{
23
"type": "case",
24
"testPath": [
25
{
26
"type": "class",
27
"name": "example.DivTest"
28
},
29
{
30
"type": "testcase",
31
"name": "calc"
32
}
33
],
34
"duration": 0,
35
"status": 1,
36
"stdout": "",
37
"stderr": "",
38
"created_at": "2021-02-19T21:33:02",
39
"data": null
40
},
41
{
42
"type": "case",
43
"testPath": [
44
{
45
"type": "class",
46
"name": "example.MulTest"
47
},
48
{
49
"type": "testcase",
50
"name": "calc"
51
}
52
],
53
"duration": 0,
54
"status": 1,
55
"stdout": "",
56
"stderr": "",
57
"created_at": "2021-02-19T21:33:02",
58
"data": null
59
},
60
{
61
"type": "case",
62
"testPath": [
63
{
64
"type": "class",
65
"name": "example.SubTest"
66
},
67
{
68
"type": "testcase",
69
"name": "calc"
70
}
71
],
72
"duration": 0.001,
73
"status": 1,
74
"stdout": "",
75
"stderr": "",
76
"created_at": "2021-02-19T21:33:02",
77
"data": null
78
}
79
]
80
}
Copied!
Last modified 1mo ago