I have a working testNG script that I can run from inside of Eclipse.
I want to run it from the Windows 10 command line and later from a .bat file.
A) Can I AND do I need to compile the entire testNG blob(all the classes and other required files) to run it or can I have the command run it inside of Eclipse?
B) Inside of Eclipse I instruct it to run as a testNG script by right clicking on the project and selecting: run as testNG. How do I do this from the Windows command line? Now I have and it does not appear to run:
You probably want to create a jar file. Then you can run the project with all the dependencies in the classpath. Or if you use Maven/Gradle, you can created a shaded jar which is one jar with everything you need
I watched a video on YouTube for how to run a TestNG script from the command line. It is from a website called www.softwaretestingmaterial.com How to run TestNG test using command prompt is the name of the video.
It shows putting all of the jars into the bin folder. Using an XML file which I don't remember how to set up anymore. Then using a line similar to:
I'm still trying to figure out if the code has been automatically compiled. I'm not sure what to click on to check if it automatically being compiled.
If you have Build Automatically checked, then the class is built every time you save it. The classes are compiled to the output folder. By default, this "bin" under your project folder.
To check for sure what your output folder is, right-click on the project in the Project Explorer, select Build Path > Configure Build Path... Then click the Source tab. At the bottom you will see what your output folder is.
If you really want to see if a class has been compiled, you can use a file explorer or list command for you system. First, find your workspace folder. It is usually called "workspace" or "eclipse-workspace" and is in you home directory. Then navigate to your project folder "kaa1" and then your output folder (probably "bin"). You will find folders and/or files in this folder. Navigate to the kaa1 folder. In it you will see NewTest.class. Note the file modification date and time.
Please note that the above is only necessary to satisfy your curiosity.
All things are lawful, but not all things are profitable.