| 1 | Hostname and timestamp properties in generated JUnit XML reports |
| 2 | Pytest enables generating JUnit XML reports of the tests. |
| 3 | |
| 4 | However, there are some properties missing, specifically `hostname` and `timestamp` from the `testsuite` XML element. Is there an option to include them? |
| 5 | |
| 6 | Example of a pytest XML report: |
| 7 | ```xml |
| 8 | <?xml version="1.0" encoding="utf-8"?> |
| 9 | <testsuite errors="0" failures="2" name="check" skipped="0" tests="4" time="0.049"> |
| 10 | <testcase classname="test_sample.TestClass" file="test_sample.py" line="3" name="test_addOne_normal" time="0.001"></testcase> |
| 11 | <testcase classname="test_sample.TestClass" file="test_sample.py" line="6" name="test_addOne_edge" time="0.001"></testcase> |
| 12 | </testsuite> |
| 13 | ``` |
| 14 | |
| 15 | Example of a junit XML report: |
| 16 | ```xml |
| 17 | <?xml version="1.0" encoding="UTF-8"?> |
| 18 | <testsuite name="location.GeoLocationTest" tests="2" skipped="0" failures="0" errors="0" timestamp="2019-04-22T10:32:27" hostname="Anass-MacBook-Pro.local" time="0.048"> |
| 19 | <properties/> |
| 20 | <testcase name="testIoException()" classname="location.GeoLocationTest" time="0.044"/> |
| 21 | <testcase name="testJsonDeserialization()" classname="location.GeoLocationTest" time="0.003"/> |
| 22 | <system-out><![CDATA[]]></system-out> |
| 23 | <system-err><![CDATA[]]></system-err> |
| 24 | </testsuite> |
| 25 | ``` |