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, i.e. "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?
解决方案
1.Go to Intellij>Preferences>Plugins>Verify that TestNG-J is enabled.
2.Configure the testNG xml file and provide it as an external source by going to edit configurations and selecting suite and providing the path of the testNG xml you created.