From dca9269648ae408c400b86ceab2bdfdadf07fcee Mon Sep 17 00:00:00 2001 From: Tom Watt Date: Tue, 26 Nov 2024 16:47:03 +0000 Subject: [PATCH 1/3] docs: add example of JSON test results --- pages/test_engine/importing_json.md | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/pages/test_engine/importing_json.md b/pages/test_engine/importing_json.md index 8f65949334..ce10396f6d 100644 --- a/pages/test_engine/importing_json.md +++ b/pages/test_engine/importing_json.md @@ -394,3 +394,62 @@ Detail objects contains additional information about the span. } ``` +### Example test results + +```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" + } + } + ] + } +] +``` From 0b4a62897f00535d9508efac53a738be653dd44a Mon Sep 17 00:00:00 2001 From: Tom Watt Date: Tue, 26 Nov 2024 16:54:45 +0000 Subject: [PATCH 2/3] fix: correct JSON test results example Signed-off-by: Tom Watt --- pages/test_engine/importing_json.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/test_engine/importing_json.md b/pages/test_engine/importing_json.md index ce10396f6d..a929dca44c 100644 --- a/pages/test_engine/importing_json.md +++ b/pages/test_engine/importing_json.md @@ -451,5 +451,6 @@ Detail objects contains additional information about the span. } ] } + } ] ``` From c1ca32a25875aa42fe06372358af7483c8796ec2 Mon Sep 17 00:00:00 2001 From: Tom Watt Date: Wed, 4 Dec 2024 08:54:47 +0000 Subject: [PATCH 3/3] docs: add clarity to test results example Co-authored-by: Giles Gas --- pages/test_engine/importing_json.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/test_engine/importing_json.md b/pages/test_engine/importing_json.md index a929dca44c..65a65a95a8 100644 --- a/pages/test_engine/importing_json.md +++ b/pages/test_engine/importing_json.md @@ -394,7 +394,9 @@ Detail objects contains additional information about the span. } ``` -### Example test results +### 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 [