How to run unit tests for multiple iterations

Category: visual studio unittest


thakurAnunay on Mon, 27 Nov 2017 10:55:06


I am using Microsoft Test framework to write my unit test. 

How to i run my tests for multiple iterations i.e. in an infinite loop? 




Fletch Zhou on Tue, 28 Nov 2017 02:50:31

Hi Thakur,

Please just put the code that is inside the loop in a separate function, and unit test that function without the loop.

Maybe this similar thread with some specific sample could give you some hints.




MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact