Report TestType in XML reports for templated test cases #2567
+35
−27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This tiny PR tries to allow XML reporter to add the actual
TestType
as an arg. toTestCase
if it's aTEMPLATE_TEST_CASE
.Proof of concept atm; if the idea attracts enough interest; I'll add it to other reports too as well as maybe generalizing this to arbitrary number of case properties.
Current behavior: Catch reports append the
TestType
to the case name; separated by a dash.Reason for this improvement: Want to see the actual failing
TestType
(if some fail and some pass) in my editor. But parsing the name is error prone (as I usually have dashes in case names, and there is no way to distinguish if it's a template test case - unless parsing the expression for TestType - which can be just mentioned there as a string value or variable ... you can see how this can get confusing quickly).Solution: As
TestType
is a property of the test case; adding it as a parameter to the correspondingTestCase
tag avoids all confusion; No effect should be observed in regular test cases.This quick test:
results in this XML report (notice the
testType="..."
when it's aTEMPLATE_TEST_CASE
)