Closed vinayvennela closed 3 years ago
Will be happy to contribute and create MR
I'm closing this issue since this was already discussed in the context of #2. Also I'm not sure that the xUnit format allows specifying such tags as screenshots
and unstable
and I'm afraid that the consumers of this format aren't aware of these tags either, so I think it's better to stick to the current implementation.
You can create your own fork of this reporter, or use the existing fork posted in the issue above (where all of the described problems were fixed). Also if you're using this reporter along with Jenkins, I recommend that you look at the Jenkins reporter instead (see Introducing the TestCafe Jenkins Plugin).
Appending screenshots path to the test name isn't just right way to do. I'm sure xUnit standard doesn't supporting appending customs tags and paths to the test name either, but we are doing it.
Every consumer of this reporter must have written the same logic to strip off the screenshots paths and unstable tags before parsing the xml. XMLs are indeeded meant for machines.
This is the reporter officially supported by testcafe and at some point we need to fix this.
Agreed that users may not be aware of these new tags. Let's update the document and bump the major version.
The current approach with appending the (unstable)
tag and the screenshot path to the name of a test seems to be better as it doesn't violate the xUnit format. After all, the name
attribute of the testsuite
and testcase
tags remains to be just a string.
I agree that users are still forced to parse this information from the test name but this is inevitable since we want to stay within the xUnit format, which simply doesn't provide special tags/attributes for such information. Thank you for your proposal but we do not want to change the xUnit format by introducing new tags.
Background:
When a test fails, then the screenshot path is appended to the name of the test When quarantine mode is enabled and if a test is unstable, then the tag '(unstable) ' is being appended to the name of the test
Both of the above look like a deviation of XML reports.
The suggestion is to have them added as a child tags inside the tag like we are adding
Current XML report -1: (Failure)
Current XML Report - 2: (Unstable)
Proposed XML Report - 1 (Failed)
Proposed XML Report - 2 (Unstable)