Skip to content

Commit

Permalink
Merge pull request #143 from buildkite/SUP-2762
Browse files Browse the repository at this point in the history
SUP-2762: add example of JSON test results
  • Loading branch information
tomowatt authored Dec 4, 2024
2 parents 96bdd7a + c1ca32a commit b0db96f
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions pages/test_engine/importing_json.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,3 +394,65 @@ Detail objects contains additional information about the span.
}
```

### Test result format

The following JSON code block shows an example of how your JSON test results should be formatted, so that these results can be successfully uploaded to Test Engine.

```json
[
{
"id": "95f7e024-9e0a-450f-bc64-9edb62d43fa10",
"scope": "Analytics::Upload associations",
"name": "fails",
"location": "./spec/models/analytics/upload_spec.rb:24",
"file_name": "./spec/models/analytics/upload_spec.rb",
"result": "failed",
"failure_reason": "Failure/Error: expect(true).to eq false",
"failure_expanded": [],
"history": {
"start_at": 347611.724809,
"end_at": 347612.451041,
"duration": 0.726232000044547,
"children": [
{
"section": "http",
"start_at": 347611.734956,
"end_at": 347611.735647,
"duration": 0.0006910000229254365,
"detail": {
"method": "POST",
"url": "https://example.com",
"lib": "curl"
}
}
]
}
},
{
"id": "56f6e013-8e9a-340f-bc53-8edb51d32fa09",
"scope": "Analytics::Upload associations",
"name": "passes",
"location": "./spec/models/analytics/upload_spec.rb:56",
"file_name": "./spec/models/analytics/upload_spec.rb",
"result": "passed",
"history": {
"start_at": 347611.724809,
"end_at": 347612.451041,
"duration": 0.726232000044547,
"children": [
{
"section": "http",
"start_at": 347611.734956,
"end_at": 347611.735647,
"duration": 0.0006910000229254365,
"detail": {
"method": "GET",
"url": "https://example.com",
"lib": "curl"
}
}
]
}
}
]
```

0 comments on commit b0db96f

Please sign in to comment.