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?
Import XML namespacesPress Alt+Enter . If there are multiple choices, select the desired namespace from the list. Alternatively, hover your mouse pointer over the problem and click Create namespace declaration in the popup that opens. If there are multiple choices, select the desired namespace from the list.
Go to the dependencies tab. Click the "+" sign to add a new dependency and then select "JARs or directories". Write the path where you downloaded the jar file or navigate directly through the GUI and click Okay. Select Okay in the returning panel, and you will have your TestNG installed in IntelliJ.
Follow the below steps:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With