問題描述
按順序運行 TestNG 組並在每個組中並行測試 (Run TestNG groups sequentially and tests in each group in parallel)
I have several tests suites based on the functionality they test and I want to run them in parallel ‑ to complete more quickly. It turned out that within one suite I need to put several tests that run against different environmental setting. I think I can do this by assigning tests to groups and then use the @BeforeGroups annotation to insert a method which set ups the environmental settings. However I don't know how to make the tests within each group to run in parallel and groups to wait for each other ‑ otherwise there will be tests working in the wrong environment. Any suggestions would be appreciated.
‑‑‑‑‑
參考解法
方法 1:
You can define your dependencies of the groups in the xml. Example here
(by munch、niharika_neo)