How to use TestNG in Idea?
I'm using Idea 8.1 and TestNG 5.8.
I don't know how run testng in Idea. I found this place http://www.jetbrains.com/idea/features/junit_testng.html, but it doesn't help much. I'd like to be able to run testng as easily as junit (right click on the tab and choose run). Is that possible? If yes, could anybody tell me how?
Regards.
Please sign in to leave a comment.
It works the same way with TestNG. Do you have TestNG plugin installed ?
Yes, I do. I can see a symbol on the editor tab for a test class (that symbol looks like the one for junit test class). When I right-clicked the tab editor, I don't see any item to run this test class!
I have attached an image for you to see.
Attachment(s):
untitled.png
I see. You are right. This must be a bug. I usually invoke tests from browser tab and there right-click works fine for both JUnit and TestNG.
Maybe you should create a Jira ticket if there isn't one already.
Cheers,
d.
By the way, do I need a testng.xml file? If yes, how can I tell Idea about that testng.xml?
No you don't need testng.xml but you can run whole test suite if you have one. Create TestNG run task (Run/Debug Configuration) and select Suite. See screenshot.
Attachment(s):
TestNGSuite.png
Hello,
You've invoked popup menu on the editor tab. JUnit doesn't work there either.
PLease right click in editor on the class or method to run.
Thank you
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"