|
Hi There I am currently having the same issue. I am trying to intergrate Nunit from Windows, appears that the Nuget managers' NUnit version is 3 something. I have tried running
in the build step I use MSBuild to build the project. I then use a CMD Build with this command
"C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" "C:\VisualStudios2015Repo\Mace E-Commerce Development\MACE_eCommerce_MAIN\Mace_E-Commerce_Project\WebUnitTest\bin\Debug\WebUnitTest.dll" /work:"C:\TestWeb" "--result:TestResult.xml;format=nunit2" cd C:\TestWeb\ cd
I then have a post Build process to publish the result The result is named TestResult.xml and is found in the C:\TestWeb
I am getting the same error the fixes above have not resolved the issue.
Please could anyone give any pointers
The XML produced from the CMD command is attatched to this ticket Named "TestResult.xml"
Here is the output by Jenkins:
============================================================
Run Settings WorkDirectory: C:\TestWeb ImageRuntimeVersion: 4.0.30319 ImageTargetFrameworkName: .NETFramework,Version=v4.5 ImageRequiresX86: False ImageRequiresDefaultAppDomainAssemblyResolver: False NumberOfTestWorkers: 4
Test Run Summary Overall result: Failed Test Count: 1, Passed: 0, Failed: 1, Inconclusive: 0, Skipped: 0 Failed Tests - Failures: 1, Errors: 0, Invalid: 0 Start time: 2016-04-07 10:38:59Z End time: 2016-04-07 10:38:59Z Duration: 0.150 seconds
Results (nunit2) saved as TestResult.xml
C:\Users\wilson.li\.jenkins\jobs\SlaveJobRunner\workspace>cd C:\TestWeb\
C:\TestWeb>cd C:\TestWeb
C:\TestWeb>exit 0 Recording NUnit tests results ERROR: Step ‘Publish NUnit test result report’ aborted due to exception: hudson.util.IOException2: Could not transform the NUnit report. Please report this issue to the plugin author at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:68) at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:26) at hudson.FilePath.act(FilePath.java:990) at hudson.FilePath.act(FilePath.java:968) at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:145) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: org.xml.sax.SAXParseException; systemId: file:/C:/Users/wilson.li/.jenkins/jobs/SlaveJobRunner/workspace/temporary-junit-reports/temp-junit.xml; lineNumber: 2; columnNumber: 3; Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) at hudson.plugins.nunit.NUnitReportTransformer.splitJUnitFile(NUnitReportTransformer.java:102) at hudson.plugins.nunit.NUnitReportTransformer.transform(NUnitReportTransformer.java:72) at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:63) ... 13 more Finished: FAILURE@Mention someone by typing their name...
|