0

Is there any way we can create ordered list from nunit,

there are multiple test-cases which need to be run multiple times but not in sequence.

For Example : 
1) TestCase A 
2) TestCase B
3) TestCase C
4) TestCase B

How can I achieve it through N-Unit (C#)?

Thanks in Advance

  • It's almost always a bad idea to have the order in which tests are executed to have an effect. They should be independent. – Rob May 30 '17 at 07:16
  • Yeah , I know but there must be options still to keep it going , are there any? – Shobhit Maheshwari May 30 '17 at 07:17
  • Yes there are, in the linked question (https://stackoverflow.com/a/37054935/563532 in particular). I just noticed `TestCase B` is repeated, so it's not necessarily a duplicate. Sorry about that. – Rob May 30 '17 at 07:17
  • Can ordering accept multiple values,how can I make TestCase B called twice? – Shobhit Maheshwari May 30 '17 at 07:22

1 Answers1

-1

you can use it like below

 [Test, Order(1)]
 [Test, Order(2)]
 [Test, Order(3)]

Thank you!!

akhil dev
  • 27
  • 3