I'm able to run TestNG unit tests in IntelliJ and see the pass/fail output in a window; this is without using any testng.xml
file. I can also run the tests in the command-line using maven, ie mvn clean test -Dgroups=fast
, and that works fine.
I've created a testng.xml
file and added it to my project's directory, but it doesn't seem to have any effect.
How do I integrate the usage of a testng.xml
file to define my test execution within IntelliJ IDEA 9?
Follow this link - http://www.jetbrains.com/idea/webhelp/run-debug-configuration-testng.html#config
There is an option just before the run icon that allows you to add the testng.xml file. In the run config dialog select the suite option. Then select the testng file. It worked for me.
Hope it helps.
Just Add this Plugin " Create TestNg XML "
& restart your Intellij IDE.
then :
Follow the below steps:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.