Commit a57fd941 authored by drew cimino's avatar drew cimino Committed by Jan Provaznik

Expose file path from XML Test Report artifact

parent 2e1d2227
......@@ -6,6 +6,7 @@ class TestCaseEntity < Grape::Entity
expose :status
expose :name
expose :classname
expose :file
expose :execution_time
expose :system_output
expose :stack_trace
......
---
title: Expose file path from XML Test Report artifact
merge_request: 43594
author:
type: changed
......@@ -8,6 +8,7 @@
"status": { "type": "string" },
"name": { "type": "string" },
"classname": { "type": "string" },
"file": { "type": ["string", "null"] },
"execution_time": { "type": "float" },
"system_output": { "type": ["string", "null"] },
"stack_trace": { "type": ["string", "null"] },
......
......@@ -19,6 +19,7 @@ RSpec.describe TestCaseEntity do
expect(subject[:status]).to eq('success')
expect(subject[:name]).to eq('Test#sum when a is 1 and b is 3 returns summary')
expect(subject[:classname]).to eq('spec.test_spec')
expect(subject[:file]).to eq('./spec/test_spec.rb')
expect(subject[:execution_time]).to eq(1.11)
end
end
......@@ -30,6 +31,7 @@ RSpec.describe TestCaseEntity do
expect(subject[:status]).to eq('failed')
expect(subject[:name]).to eq('Test#sum when a is 1 and b is 3 returns summary')
expect(subject[:classname]).to eq('spec.test_spec')
expect(subject[:file]).to eq('./spec/test_spec.rb')
expect(subject[:execution_time]).to eq(2.22)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment