Parallel Test Execution in Azure
We have ~1300 API integration and Selenium tests which currently takes 8 hours to run. API integration tests runs everything (API server, db, etc) in memory but Selenium tests needs to recreate a DB server for every tests. This makes is impossible to run these tests in parallel on the same machine. To speed up the tests we need to parallelice the tests on several VMs. The VM is then pre-configured with a local database and so on. Maybe even better a container setup.
Is this possible to do in TC?
Please sign in to leave a comment.
Hi Martin,
I'm sorry but I'm not particularly familiarized with that scenario. In this situation, TeamCity does provide a little bit of help, but not too much. Unless you have specific tools to do the split of the tests and sending them to several VMs automatically, you would need to set up the several virtual machines with the DB, then split yourself the tests into several batches, launch them into each virtual machine and then pick up the results from all of them and combine them into one.
If there are no tools for it, we also don't (directly) have a tool to do that. We do have docker integration (for containers), and cloud support to run builds in Azure or several other cloud providers, so that's not a problem once you have the other issues mentioned above fixed.
In this scenario, you would separate the batches into separate build configurations, have a "final" build configuration that collects all the results and compiles them, and set up a snapshot dependency to each of the build configurations that runs the tests. This can have a snapshot dependency on a last build configuration that will actually compile the project and export the results as artifacts that the other builds can use.
If there are tools to perform that sort of split, you can simply run a command line / powershell script that runs exactly the required set of commands to start the processing, as if you were doing it from the console