NUnit 3 tests not discovered (mixed nUnit xUnit scenario)

r.baeriswyl's Avatar

r.baeriswyl

20 Dec, 2015 03:28 PM

Hi
With a project (White nUnit port) which has mixed nUnit and xUnit tests, only the xUnit tests are discovered. The settings are extremely basic.
Here's the last output:
https://ci.appveyor.com/project/RomanBaeriswyl/white-9yaco
What am I missing?
Thanks for help!

  1. Support Staff 1 Posted by Feodor Fitsner on 20 Dec, 2015 07:39 PM

    Feodor Fitsner's Avatar

    You are missing those files with NUnit tests in your project.

    Searched by nunit: https://github.com/TestStack/White/search?p=1&q=nunit&utf8=...

    There are tests in src/TestStack.White.UnitTests/CustomCommands folder referencing nunit namespace however it looks like none of those tests are included into the project: https://github.com/TestStack/White/blob/12943deaf74714f2016831af6de...

  2. 2 Posted by r.baeriswyl on 20 Dec, 2015 07:52 PM

    r.baeriswyl's Avatar

    Hi Feodor
    It's not in the master branch, it's in the nunit branch. there are around 400 nunit tests included in the project.

  3. 3 Posted by r.baeriswyl on 20 Dec, 2015 07:54 PM

    r.baeriswyl's Avatar

    I just did another test with another small project. There it executes nUnit and xUnit tests. Here's that one:
    https://ci.appveyor.com/project/RomanBaeriswyl/flaulib
    I don't see the difference between those two projects :/

  4. Support Staff 4 Posted by Feodor Fitsner on 20 Dec, 2015 08:07 PM

    Feodor Fitsner's Avatar

    OK, this is csproj file from nunit branch: https://github.com/TestStack/White/blob/nunit/src/TestStack.White.U...

    Can you tell what .cs files included in that project have nunit tests?

  5. 5 Posted by r.baeriswyl on 20 Dec, 2015 08:11 PM

    r.baeriswyl's Avatar
  6. Support Staff 6 Posted by Feodor Fitsner on 20 Dec, 2015 08:54 PM

    Feodor Fitsner's Avatar

    I see now. It first runs xunit tests and fails thus termination the build.

  7. 7 Posted by r.baeriswyl on 20 Dec, 2015 09:02 PM

    r.baeriswyl's Avatar

    Okay. I thought it will run all tests before exiting if any test fails. But obviously it will only run the tests until an error is found. Good to know. Thanks, I'll try fixing those tests and rerun it.

  8. 8 Posted by r.baeriswyl on 20 Dec, 2015 09:16 PM

    r.baeriswyl's Avatar

    You were totally right. After all xUnit tests succeed, the nunit tests start to run. Is there any possibility to run all tests and only fail/succeed at the very end of all tests?

  9. Support Staff 9 Posted by Feodor Fitsner on 20 Dec, 2015 09:19 PM

    Feodor Fitsner's Avatar

    Nope, in "auto" mode. However, you can use PowerShell script or batch file, run all test commands in it and check for error codes.

  10. 10 Posted by r.baeriswyl on 20 Dec, 2015 09:21 PM

    r.baeriswyl's Avatar

    Ok, thanks for this information!

  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

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

Recent Discussions

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