Try running tests from the command line. Automation of the user interface allows you to perform only one test in one run. After the test is completed (it does not matter if it was failed or passed), the application will be knocked out by the system (UIAutomation). At least it works with real devices.
Running the command line script will work as follows: 1. Reads the configuration file (it can be any txt or xml file) with the path to your tests. At this point, you will have an array with a path to your tests and the total number of tests. 2. Then, using a simple "for" loop (from 1 to "testcount"), it will start UIAutomation with the required parameters. One of the parameters will be the path to your test script, which was read from the configuration file.
You can also put the path to the "configuration file" as a parameter to run the command line script. This will allow you to run any test suite by simply invoking a script to run with the necessary configuration file.
source share