NUnit XML report
About NUnit

NUnit is a unit-testing framework for all .Net languages. NUnit is Open Source software. This framework is very easy to work with and has user friendly attributes for working.
Common structure
In a basic NUnit report, you will find common tags representing test suites and test cases. Below are examples of test results in NUnit 2.6 and NUnit 3 formats:
NUnit 2.6 format
To visualize the structure more clearly, let’s take a look at below diagram.
-20241210-090835.png?inst-v=e3835335-d0be-4f4c-a82c-c62b3d80caa9)
NUnit 2.6 test report structure diagram
NUnit 3 format
To visualize the structure more clearly, let’s take a look at below diagram.
-20241210-091523.png?inst-v=e3835335-d0be-4f4c-a82c-c62b3d80caa9)
NUnit 3 test report structure diagram
How AgileTest would parse an NUnit report
In AgileTest, all test cases imported using the automation feature are classified as Generic Tests.
Imported test cases are distinguished by the name
attribute of the <test-case>
element parsed from the XML file. This information appears as the Test Definition in AgileTest after parsing and can be found just below the Description section of the test case ticket. The Summary of each test case issue is based on the value of the name
attribute.
Supported status tags
Test run status tag | Description |
---|---|
| PASSED → Test case yields the expected result. |
| FAILED → Test case returns the actual result not as expected. |
| BLOCKED → Test case is considered blocked due to a specific reason. |
| SKIPPED → Test case is skipped in the test run. |
| RETEST → Test case should be rerun again. |
| QUERY → The test case requires more details to have the final result. |
| TODO → Test case is not yet run. It’s the default status of every Test case in AgileTest. |
The priority of status tags in AgileTest is as follows:
failed > blocked > retest > skipped > query > passed (or no tag).
If multiple tags are added to a single <test>
element, the tag with the highest priority will be used as the test status in AgileTest.
Test result with attachments
AgileTest supports 2 customized structures for integrating attachments into your test reports. Users can choose either option to upload test results along with evidence files.
1. Attachment element with name attribute and content inside
Element structure
<attachment name="filename"> base64 content </attachment>
Example
<test-case>
...
<attachments>
<attachment name="test.png">iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAQ0lEQVR42u3PQREAAAgDINc/9Mzg14MGZNrOAxERERERERERERERERERERERERERERERERERERERERERERERERERuVh9TJWdbWjzsQAAAABJRU5ErkJggg==</attachment>
</attachments>
<test-case>
2. Attachment element with separate name and content elements inside
Element structure
<attachment>
<name> filename </name>
<rawcontent> base64 content </rawcontent>
</attachment>
Example
<test-case>
...
<attachments>
<attachment>
<name>test.png</name>
<rawcontent>iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAQ0lEQVR42u3PQREAAAgDINc/9Mzg14MGZNrOAxERERERERERERERERERERERERERERERERERERERERERERERERERuVh9TJWdbWjzsQAAAABJRU5ErkJggg==</rawcontent>
</attachment>
</attachments>
</test-case>
Should you need any assistance or further AgileTest inquiries, please contact us here!