First I added the dependency and repository to my project's maven pom.xml file:
<repositories>
<repository>
<id>jcenter</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.10</version>
<scope>test</scope>
</dependency>
and did a NetBeans "Clean and Build". It downloaded TestNG stuff but project code still showed it couldn't find the classes it needed. I can see that C:\Users\Greg.m2\repository\org\testng\testng\6.10\testng-6.10.jar exists. If I open that jar file I can see that org\testng\Assert.class exists. Why can't NetBeans find it?
Since that failed, I followed instructions for setting up TestNG Environment here: https://www.tutorialspoint.com/testng/testng_environment.htm
My TESTING_HOME environment variable is set to
C:\Users\Greg\Projects\TestNG
My CLASSPATH variable is set to
%CLASSPATH%;%TESTING_HOME%\testng-6.10.jar
Yes, that jar file exists there.
I open up a new command shell and navigate to
C:\Users\Greg\Projects\Enventive\en360\src
where there exists testng.xml
I then issue the following command per the TestNG author's doc
java org.testng.TestNG testng.xml
but get
Error: Could not find or load main class org.testng.TestNG
In NetBeans 8.2, I can create a TestNG class using
File>New File...>Unit Tests>TestNG Test Case
It produces test code but all the annotations have errors due to the error on the import line
import static org.testng.Assert.*;
which states
package org.testng does not exist
If I attempt to install the TestNG Plugin in NetBeans by downloading Maven TestNG Support and then trying to install it using
Tools>Plugins>Downloaded>[navigate to downloaded org-netbeans-modules-testng-maven.nbm]>Install
It fails to install with this error:
Some plugins require plugin Maven Embedder to be installed. The plugin Maven Embedder is requested in version >= 2.54 but only 2.52.1 was found. The following plugin is affected: Maven TestNG Support
A search for "Maven Embedder" in "Available Plugins" tab, or on the web finds nothing.