-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Providing unit test results in Sphinx documentation #985
Comments
@Paebbels VUnit supports two JUnit XML dialects: Jenkins and Bamboo. I attached the results for our basic user guide example that has both passing and failing test cases. |
@LarsAsplund Thanks for these files. Are you aware that these files (formats) are not JUnit compliant? Do you have a format specification (XSD, DTD, ...) for the Jenkins and Bamboo dialects? For "original junit" I researched this: https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd Problems are:
As VUnit knows the number of assertions, it could be exported too. |
I did not. When we first released VUnit almost a decade ago there was no definition to be found. We simply had to look what worked reasonably well in practice. The way Jenkins was doing it seemed to work fairly well for most other tools but at some point we were made aware of Bamboo doing it differently and we introduced the option to select what dialect to use. Haven't look into it since then. I will look at that specification you provided. Are you saying that this format is widely acknowledged or is it just an effort to reconsile the differences between dialects? |
According to some sources, the XSD by Windyroads refers to the original syntax of JUnit as produced by Java Ant. I also know that there are multiple JUnit versions and JUnit has writer classes to produce the XML. Unfortunately, the official documentation doesn't contain any syntax description for new and old versions what such a class would write. I'm until now refusing to read the Java code to reverse enginier what the could write to extract the syntax from it. So I hope that XSD is correct. OTOH, many have butchered the format and introduced simplifications like:
Neither of such modifications are allowed by XML / XSD. XML defines a tree structure and each node has certain attributes that must exist or are optional. This is needed so an XML file can be verified by the parser and a user can rely on a certain structure ... so less if element exist questions in the code. So I strongly refuse the common practice by Jenkins to allow the removal of Then I found the testmoapp repository any they claim to have collected/recreated what the market produces/accepts as formats. The also found these additions with I'm not yet sure (need to refresh my XML knowledge) if an XSD can already define a tag as whitespace preserving, if not, then the My suggestion to VUnit would be, to add the outer |
Hello @LarsAsplund.
I worked on a new Sphinx extension, which can render junit XML files as tables in a Sphinx based documentation.
This would allow you to:
Could you provide me a junit output of VUnit, so I can test my extension?
Moreover, you can find 2 other report formats in my extension that could be interesting for you:
See for https://pytooling.github.io/sphinx-reports/index.html more details
The text was updated successfully, but these errors were encountered: