Test parallelism with IntelliJ and TestNG

后端 未结 5 1956
深忆病人
深忆病人 2021-02-08 16:12

I\'m attempting to run some TestNG tests in parallel but don\'t have access to a testng.xml as IntelliJ builds it on the fly. I\'ve tried adding parameters such as \'parallel=m

5条回答
  •  孤街浪徒
    2021-02-08 16:50

    It appears that you would be able to use the JDK Settings tab to specify "vm parameters", and then specify the parameters like so: -parallel methods -threadcount 2

    However, IntelliJ actually creates an XML file and then uses that when running TestNG. That XML file has parallel="none" inside of it. As a result, the XML configuration 'wins' and you do not get the parallelization you are looking for.

    There doesn't appear to be an easy way to adjust the contents of that default XML file, at least in terms of the parallelization options. You may just be stuck with creating XML suites yourself.

提交回复
热议问题