0

I moved from eclipse to Intellij but I am not able to write a Test with @Test annotation of TestNG. It was very simple in eclipse but I am not finding any documentation about the same in intellij website.

enter image description here

Suresh Kumar
  • 455
  • 2
  • 5
  • 13

1 Answers1

2

If you are not using build system (but I would definitely recommend to do it) you can add TestNG library as a jar dependency.

  • download the latest version from maven central - org.testng
  • add it as a library to Intellij IDEA project

Instructions how to add jar to Intellij project you can find in this question: Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project

Then, this jar will be indexed by Intellij IDEA and you will be able to execute tests using TestNG.

Andrii Abramov
  • 10,019
  • 9
  • 74
  • 96