I opened a Maven project and import all the maven dependencies.
Everything is fine , except for TestNG dependencies.
I have this in my POM.xml
But I see this in my codes
I can see the TestNG appears in the Maven dependencies list , with (test) at the end. Not sure what does it mean.
Then I saw this options in my editor
When I click "Add library 'Maven: org.testng:testng:6.14.3' to classpath" , it solves my problem straightaway.
I checked the list of my Maven dependencies, I see the "(test)" disappear now.
- Why Intellij doesn't add the dependencies automatically ? It works automatically for other dependencies in the list (javax , mysql, etc), except for this TestNG dependency. Is there something special with this TestNG dependency ?
- What does " Adding XXX to classpath" mean? Does it mean adding to External Libraries list ?
- Secondly , in the Maven dependencies list, what does (test) and (provided) mean ?