Aug 2, 2010 at 2:37 PM
Edited Aug 2, 2010 at 2:42 PM
Can you post a sample test. I'm particularly interested in how you "block" the test until the request is received.
It may be something that we are forgetting, maybe one of the asynchronous testing attributes ?
AgUnit also has a fix where it doesn't wait for the silverlight UI thread (aka the Dispatcher thread) during the test run. The default silverlight test runner from the toolkit doesn't do this.
If you wait for a dispatch run between your tests, you can only run 1 test during each frame of your silverlight application.
Say if your test application has 30 FPS, it means that only 30 tests run each second at maximum. I usually work with a project that has about 3000 unit tests, making the theoretical absolute minimum duration of the test run 100 sec. With this fix the
actual test run usually takes less than 50 sec.
This basically means that you can't do UI testing with AgUnit, or anything else that relies on the dispatcher thread (Web requests, UI controls, ...).
I already had the idea in mind to introduce UI testing to AgUnit, by making this a configuration setting and introducing a UI surface, like the test runner from the toolkit does. So it may be available in a future release.