Uploading Fixie Testresults as NUnit or xUnit gives 500 Error

Lodewijk's Avatar


19 Dec, 2014 07:59 AM


I'm using Fixie as my unit testing framework. It supports exporting the testresults as NUnit or xUnit formatted xml-files. However, uploading the test results give me an internal server error (500):

Exception calling "UploadFile" with "2" argument(s): "The remote server returned an error: (500) Internal Server Error." At line:6 char:65
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JO ...
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : WebException

Command executed with exception: Exception calling "UploadFile" with "2" argument(s): "The remote server returned an error: (500) Internal Server Error."

I'm using the following code to upload the file (sample from your documentation):

# run tests

# upload results to AppVeyor
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResult.xml))
  1. Support Staff 1 Posted by Feodor Fitsner on 19 Dec, 2014 08:02 AM

    Feodor Fitsner's Avatar

    Could you drop a sample of test results file you are uploading?

  2. 2 Posted by Lodewijk on 19 Dec, 2014 10:51 AM

    Lodewijk's Avatar

    I've attached the testresults in the NUnit and XUnit formats. Both cause the 500 error.

  3. Support Staff 3 Posted by Feodor Fitsner on 19 Dec, 2014 07:34 PM

    Feodor Fitsner's Avatar


    TestResult.AsXUnit.xml - root element must be <assembly>, not <assemblies>. See this article: https://xunit.codeplex.com/wikipage?title=XmlFormat

    TestResult.AsNUnit.xml - test-suite element doesn't contain type attribute.

  4. 4 Posted by Lodewijk on 20 Dec, 2014 09:06 AM

    Lodewijk's Avatar

    Ow, thanks for checking this. I'll contact the Fixie people about fixing it.

  5. 5 Posted by Patrick Lioi on 21 Dec, 2014 10:11 PM

    Patrick Lioi's Avatar

    Looking at the NUnit/xunit code, I disagree.

    First, NUnit test-suite nodes *do* get a type attribute. See https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Internal/Tests/TestSuite.cs#L212

    Second, xUnit *does* include an outer assemblies node. See https://github.com/xunit/xunit/blob/master/src/xunit.console/Program.cs#L146

    Frustrating that the xUnit documentation page isn't entirely accurate to what the implementation is doing, but Fixie's output was based on real xUnit / NUnit output as a guide.

  6. Support Staff 6 Posted by Feodor Fitsner on 21 Dec, 2014 10:24 PM

    Feodor Fitsner's Avatar

    Yes I agree, but TestResult.AsNUnit.xml attached to this thread does not have type attributes.

    Regarding xUnit - I see it's 2.0 while AppVeyor parser is based on 1.9.2. But thanks for pointing that out - will add support for xUnit 2.0 XML output.

  7. Support Staff 7 Posted by Feodor Fitsner on 21 Dec, 2014 10:30 PM

    Feodor Fitsner's Avatar

    Btw, would be cool to add "native" AppVeyor integration to console runner: https://github.com/plioi/fixie/tree/master/src/Fixie.Console like it's done for TC.

    Same as xUnit visitor: https://github.com/xunit/xunit/blob/master/src/xunit.console/Visito...

  8. 8 Posted by Patrick Lioi on 12 Aug, 2015 05:04 PM

    Patrick Lioi's Avatar

    FWIW, Fixie includes a fix for its own generation of NUnit XML output, now compatible with the XSD used by the latest stable NUnit (2.6.4).

  9. 9 Posted by Petr Svihlik (r... on 30 Dec, 2015 02:11 PM

    Petr Svihlik (rocky)'s Avatar

    regarding xunit - is it still true that the 2.0 format is not supported?
    I'm getting HTTP 500 when uploading the results.

    AppVeyor Log:

    Test results: attached (generated by "dnx test -xml results.xml")

  10. Support Staff 10 Posted by Feodor Fitsner on 31 Dec, 2015 04:50 AM

    Feodor Fitsner's Avatar

    Yes, xUnit 2.0 format is supported and attached XML is parsed without any issue yielding 2 tests.

  11. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:03 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac