jeudi 30 juillet 2020

Google Unit test Concurrency

I have an application built upon google unit test comprising of four different test suites (currently) say A, B, C and D. Each suite has 3 test functions- A1, A2, A3, B1, B2, ... D2, D3. This application has the ability to process any random sequence of input in the order specified, for example- A.A3, B.B2, A.A1, D.D1, C.C1, D.D3. The catch here is that all these tests execute sequentially one after the another. I want to leverage this such that the test-suites [which appear in the input sequence] execute their tests CONCURRENTLY along with other suites since there's no link between any of the suites and this way I save lot of time.

Also there's only 1 binary of the application generated and the input is taken using an XML format/UI as it is upto the user to choose the sequence. I tried creating threads for the respective suites but alas it didn't work since only one gtest-instance is created for a process, in this case my application being the process. So the threads are going to share this instance if they try to run in parallel.

Hence need your help in resolving this design dilemma.

Aucun commentaire:

Enregistrer un commentaire