Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Automated Testing for Long Running Processes

We would like to do some automated integration testing of a process that requires sending data to an external source and then validating that the data has been correctly displayed on their website.

However it may take several hours before the data appears on the website.

The problem with traditional NUnit or MSTest is that the test will be held up for hours waiting for the result.

I have seen PNUnit which could be used - to run all the tests in parallel, but it doesn't seem an elegant solution to me. What if there are 1000 tests? Won't this create loads of processes/threads on the server? And how to keep a track of all of them.

So has anyone solved this problem? Did you home grow a solution, or is there an open source solution to this?

like image 735
Martin Capodici Avatar asked Nov 03 '11 23:11

Martin Capodici


2 Answers

This problem can be easily resolved by separating test data insertion and verifying. Just load all available test data to the system, wait for several hours until processing is done and then execute verification tests.

like image 64
Yauheni Sivukha Avatar answered Oct 05 '22 07:10

Yauheni Sivukha


Seems like PNUnit would be a good solution. If you are worried about "too many processes/threads" on the server, just throttle how many tests PNUnit can run at once (say, Max N); when a test completes, schedule the next test. I'm not asserting PNUnit knows how to do this; you may have to implement this custom.

like image 29
Ira Baxter Avatar answered Oct 05 '22 06:10

Ira Baxter