How to Order NUnit Tests

前端 未结 5 1490
猫巷女王i
猫巷女王i 2020-12-20 11:17

More than once the question has been asked on SO. But the only answers that are given read \"you should not need to order your unit tests, it is bad because\" or \"you can

5条回答
  •  青春惊慌失措
    2020-12-20 12:03

    The work-around (hack) is to alphabetize your test case names. See this thread:

    https://bugs.launchpad.net/nunit-3.0/+bug/740539

    Relying on alphabetical order is a workaround that you can use but it is not documented and supported beyond the visual order of the display. In theory it could change at any time. In practice it won't change until NUnit 3.0, so you're pretty safe using it as a workaround

    This quote is from Charlie Poole, the main dev on NUnit.

    It also seems they have a scheme cooking to support ordered tests in NUnit 3, though how they will do so is still under discussion.

提交回复
热议问题