junit4
junit4 copied to clipboard
Custom data for the result XML report
In certain scenarios, it would be very handy to be able to add custom data to the xml report. Examples:
- Mapping the test to set of requirements
- Adding paths of screenshots taken during the test
- Metrics taken during the test
It could be either taken from static data - annotations, or through an API.
@Test @CustomReportData("foo=bar") fooStatic() { ... }
fooDynamic(){ this.setCustomReportData("name", "value") }
The junit project does not contain code for generating XML reports. Are you using, perhaps, ant or maven to generate XML?
I always thought it's JUnit since both Ant and Maven based projects produced the same XML reports. (In my case, it's Maven.) But still, the additional info would have to come from JUnit, wouldn't it? The XML reports have to be generated from some JUnit objects.
Hi !
I know this issue is quitely old but, I have the same problem as OndraZizka.
I read lot of docs and I have understood that ANT/Maven generate the XML report by reading the JUnit Description, If I'm wrong please tell me and explain how it works.
My problem is that I need to add more information into my report like url, picture path, etc... and then publish it with JUnit plugin on jenkins. For the moment I'm unable to modify Description and, to add information to the report...
Is there a way to do it? (it might be in your plan)
@7170 take a look http://allure.qatools.ru