Share via


How to run unit tests for multiple iterations

Question

Monday, November 27, 2017 10:55 AM

HI 

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? 

Thanks 

Thakur 

All replies (1)

Tuesday, November 28, 2017 2:50 AM

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.

 

Regards,

Fletcher

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 [email protected].