Make AppVeyor aware of NUnit3 test results

Justin Stark's Avatar

Justin Stark

06 May, 2016 05:31 PM

Can you make AppVeyor recognize NUnit3 test results?

I saw on another post that using "--result=TestResult.xml;format=AppVeyor" should work but it errors saying "Unknown result format: AppVeyor" when I use the latest NUnit3.ConsoleRunner 3.2.1 that I have checked into my repo.

Example build with NUnit3 Console Runner.
https://ci.appveyor.com/project/justinjstark/delivered/build/203

  1. Support Staff 1 Posted by Feodor Fitsner on 06 May, 2016 05:43 PM

    Feodor Fitsner's Avatar

    Hi Justin,

    NUnit 3 doesn't have built-in integration with AppVeyor (you can submit an issue on NUnit project page and ask for the integration).

    However, current integration is made by mean of custom logger.

    You can use this PS script to install logger into your NUnit3 folder:

    $nunitPath = "$env:SYSTEMDRIVE\Tools\NUnit3"
    
    $zipPath = "$($env:USERPROFILE)\Appveyor.NUnit3ResultWriter.zip"
    (New-Object Net.WebClient).DownloadFile('http://www.appveyor.com/downloads/Appveyor.NUnit3ResultWriter.zip', $zipPath)
    7z x $zipPath -y -o"$nunitPath\bin\addins" | Out-Null
    Move-Item "$nunitPath\bin\addins\appveyor.addins" "$nunitPath\bin\appveyor.addins"
    

    Change first line to point to your NUnit location.

  2. 2 Posted by Justin Stark on 06 May, 2016 06:18 PM

    Justin Stark's Avatar

    Awesome. Thanks for the response. For those interested, I downloaded the ZIP:

    http://www.appveyor.com/downloads/Appveyor.NUnit3ResultWriter.zip

    and dropped the files in NUnit.ConsoleRunner/tools. I changed nunit.appveyor.addins to point to Appveyor.NUnit3ResultWriter.dll instead of addins\Appveyor.NUnit3ResultWriter.dll.

    Then I am able to do
    nunit3-console.exe MyApp.Tests.Dll --result="TestResult.xml" --result="TestResultAppVeyor.xml;format=AppVeyor"}

    This gives the standard NUnit3 results and also the AppVeyor formatted results.

    When run locally, it simply says
    "Sending test results to AppVeyor...Skipped - APPVEYOR_URL environment variable was not found."

  3. 3 Posted by Wojciech Kotlar... on 21 Sep, 2016 11:33 AM

    Wojciech Kotlarski's Avatar

    The solution with Appveyor.NUnit3ResultWriter addin works very well, however it requires adding dlls to the source control, so I would like to ask if you could make a nuget package for Appveyor.NUnit3ResultWriter and upload it to nuget.org please?

  4. Support Staff 4 Posted by Feodor Fitsner on 21 Sep, 2016 05:49 PM

    Feodor Fitsner's Avatar

    Currently, real-time logging plugin is coming with nunit3-console available on build workers. No need to download it anymore.

  5. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:08 AM.

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

Keyboard shortcuts

Generic

? 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

 

16 Jul, 2019 04:51 AM
15 Jul, 2019 06:33 PM
15 Jul, 2019 06:09 PM
15 Jul, 2019 05:53 PM
15 Jul, 2019 05:46 PM
15 Jul, 2019 05:21 PM