geri
NUnit test class what has functions Step1,Step2,Step3...
You could do the testing in one big test case where you test the StepN's functionality .
- You'll have much assertations and checks in one testcase(which is not a great idea?)
Or you create N test cases and in every testcase you run the Steps from 0 to N-1 with validating their result.
- This results in redundant testing, and in some testcases still a lot assertations.
So you can do, NOT validating the Step results from 0 to N-1 and make sure that the TestStepN-1 test runs before TestStepN-2 by applying Order attribute to them. Then you test the StepN function...
- Testing is not redundant however calling the StepN function of the tested class is.
- Order attribute needs to be applied and some people says good tests shouldn't depend on the running order...
5 replies