We have a metro app that is already developed and ready to be deployed. But we are still not satisfied with the tests we have made so far. We are aiming to write some inline test code within the app code with an aim to expose certain key events in the app, (By generating some events which a test code can wait on) and waiting for events generated by the test code.This way we can generate more scenarios.
For example if there are four components running as background threads A,B,C and D And we want that A executes then signals to test code an event and wait(on background thread only while UI thread keeps running). The test code then simulates some user actions and signals the app on which the app proceeds to do action B and C and then again waits when test code again runs some test cases on the UI while the background thread is still suspended.
So this way we achieved a scenario BackgroundThread A-> User event x-> Background Thread B -> Background Thread C -> user event y -> Background thread D
We hope to find more sync issues that may occur because of the background threads. The driving force behind this approach is that we have no control on when a thread will go out of context.So we want to simulate such scenarios to check for areas of contention. I have tried all basic IPC mechanisms but apparently they don't work between metro apps and desktop apps due to metro app sandboxing.