Commit d8f4335
[bcl-tests] fix NUnit test result files for Jenkins (#2094)
* [Xamarin.Android.NUnitLite] don't omit empty <categories />
Context: https://jenkins.mono-project.com/job/xamarin-android-pr-builder/3806
Context: mono/NUnitLite#12
Our on-device tests don't appear to be reporting properly in Jenkins:
INFO: Starting to record.
INFO: Processing NUnit-2.x (default)
INFO: [NUnit-2.x (default)] - 16 test report file(s) were found with the pattern 'xamarin-android/TestResult-*.xml' relative to '/Users/builder/jenkins/workspace/xamarin-android-pr-builder' for the testing framework 'NUnit-2.x (default)'.
WARNING: The file '/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/TestResult-Xamarin.Android.Bcl_Tests.nunit-Debug.xml' is an invalid file.
WARNING: At line 7 of file:/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/TestResult-Xamarin.Android.Bcl_Tests.nunit-Debug.xml:cvc-complex-type.2.4.b: The content of element 'categories' is not complete. One of '{category}' is expected.
Followed by thousands of similar warnings...
Apparently the latest Jenkins plugin for NUnit tests is more strict
about the test result format. We can add the patch from @akoeplinger
to prevent these empty `<categories />` from being omitted.
Hopefully this fixes it!
* [TestRunner.xUnit] reorder when <properties /> emitted
Context: https://jenkins.mono-project.com/job/xamarin-android-pr-builder/3806
Context: xunit/xunit#1797
Our on-device XUnit tests don't appear to be reporting properly in
Jenkins:
WARNING: The result file '/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/TestResult-Xamarin.Android.Bcl_Tests.nunit-Debug.xml' for the metric 'NUnit' is not valid. The result file has been skipped.
WARNING: The file '/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/TestResult-Xamarin.Android.Bcl_Tests.xunit-Debug.xml' is an invalid file.
WARNING: At line 36993 of file:/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/TestResult-Xamarin.Android.Bcl_Tests.xunit-Debug.xml:cvc-complex-type.2.4.d: Invalid content was found starting with element 'properties'. No child element is expected at this point.
WARNING: At line 37006 of file:/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/TestResult-Xamarin.Android.Bcl_Tests.xunit-Debug.xml:cvc-complex-type.2.4.d: Invalid content was found starting with element 'properties'. No child element is expected at this point.
@akoeplinger also has a patch for the XLST transforms in XUnit.
Hopefully this fixes all of our on-device tests!1 parent 97231f9 commit d8f4335
File tree
2 files changed
+4
-1
lines changed- src/Xamarin.Android.NUnitLite/NUnitLite/Runner/OutputWriters
- tests/TestRunner.xUnit
2 files changed
+4
-1
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | | - | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
0 commit comments