nodejs test suite integration with xunit reporter

Facundo Cabrera's Avatar

Facundo Cabrera

13 Aug, 2014 12:43 AM


I'm using your service to run a test suite with nodejs and I want to integrate the tests report in a better way. I can enable the xunit reporter at the moment I run the tests, so the question is: Is there a way to create a notification using the xunit output? I'm looking for something better than an email saying "success" or "failure".


  1. 1 Posted by Facundo Cabrera on 13 Aug, 2014 01:36 AM

    Facundo Cabrera's Avatar

    I'm checking the code for mocha reporters and it should be extremely easy to create a custom reporter for appveyor to show the test directly in the tests tab.


    What do you think?

  2. Support Staff 2 Posted by Feodor Fitsner on 13 Aug, 2014 04:33 AM

    Feodor Fitsner's Avatar

    Hi Facundo,

    Yeah, I think it's doable. First, we have Build Worker REST API for pushing test results in a real-time. Take a look how it's made in xUnit:
    xUnit reporter from Mocha looks very similar!

    Second, there is another way to push results in XML format:

    Let me know if you have any questions.

  3. 3 Posted by Facundo Cabrera on 13 Aug, 2014 04:51 AM

    Facundo Cabrera's Avatar

    For now I'm doing the following:

    1. Run mocha and generate a json report.
    2. I have created an PS script to parse the json report and call the command Add-AppveyorTest "Test A" -Outcome Passed -Duration 1000 # in milliseconds with the correct information per test executed.

    Should I embed the script into the appveyor.yml? because I didn't see an example calling a .ps file hooking the after_test property


  4. 4 Posted by Facundo Cabrera on 13 Aug, 2014 05:16 AM

    Facundo Cabrera's Avatar

    Yay, it works!

    If you have any comments, please let me know :D

  5. Support Staff 5 Posted by Feodor Fitsner on 13 Aug, 2014 03:45 PM

    Feodor Fitsner's Avatar

    Cool, thanks for the update!

    I can only add that if you have more than 100 tests a better way to push them to a build console could be calling REST API directly and in batches:

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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