'Is it possible to distribute testng test cases across many docker containers?

I have a TestNg suite which has a 1000 test cases. They are not selenium test cases, they are Rest-api automation cases. I can spin up docker containers in my machine. My goal is to spin up 5 docker containers and have each container execute 200 test cases. This is basically distributed testing. At the end of the suite, my local machine should have all the results. The idea is to reduce the execution time. If I can achieve this, then I can drastically reduce the suite execution time. If it is selenium, I can use selenium grid. But question is more associated to test cases that are more RestAPI related. I did some search on Google, but couldn't find any answer. Can someone pitch-in some ideas or links that might help me to achieve this goal?

I want to distribute my test case execution across multiple containers and reduce the execution time. This is the goal that I would like to achieve.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source