NUnit Test Run Order

前端 未结 16 1360
名媛妹妹
名媛妹妹 2020-12-02 11:44

By default nunit tests run alphabetically. Does anyone know of any way to set the execution order? Does an attribute exist for this?

16条回答
  •  我在风中等你
    2020-12-02 12:11

    I am working with Selenium WebDriver end-to-end UI test cases written in C#, which are run using NUnit framework. (Not unit cases as such)

    These UI tests certainly depend on order of execution, as other test needs to add some data as a precondition. (It is not feasible to do the steps in every test)

    Now, after adding the 10th test case, i see NUnit wants to run in this order: Test_1 Test_10 Test_2 Test_3 ..

    So i guess i have to too alphabetisize the test case names for now, but it would be good to have this small feature of controlling execution order added to NUnit.

提交回复
热议问题