Search Unity

NUnit Test Runner Format

Discussion in 'Editor & General Support' started by Gizmoi, Feb 27, 2018.

  1. Gizmoi

    Gizmoi

    Joined:
    Jan 9, 2013
    Posts:
    327
    Hi, I'm getting issues with Bamboo claiming that my tests were skipped / quarantined. I've narrowed this down to NUnit producing the results.xml in an incompatible format for my version of Bamboo.
    As I'm unable to update Bamboo I need to have these results with the v2 format.
    This is possible to achieve via the console runner using the command specified on this page.
    Code (csharp):
    1. --result=TestResults.xml;format=nunit2
    At the moment I'm unable to do that and am having to use a python script I found on this Unity Answer.

    The ability to specify the NUnit format would be lovely. Any chance this can be integrated into an upcoming version of Unity? Ideally via a command line parameter.
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    See the release notes for 2017.3: https://unity3d.com/unity/whats-new/unity-2017.3.0

    Editor: The generated TestResults.xml when running playmode and editmode tests is now updated to be in NUnit3 format. (910845, 940839)

    Not sure this is what you need exactly.
     
  3. Gizmoi

    Gizmoi

    Joined:
    Jan 9, 2013
    Posts:
    327
    No, I need the NUnit2 format. I am unable to update my version of Bamboo, which doesn't support NUnit3.
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    what format is it in by default? or they didn't adhere to any known format ?
     
  5. Gizmoi

    Gizmoi

    Joined:
    Jan 9, 2013
    Posts:
    327
    Unity outputs NUnit3 format. With standalone NUnit you can specify the format version with command line arguments, but this is all wrapped up in Unity.