The selenium automation framework runs under the window command line 2017.1.11

In order to test the function of the project, and save the time of development and testers, the test framework will be given time to let it start testing at the specified time.

Configure testng environment

1. Create a folder such as D:\testng

2. Put testng-6.8.5.jar, selenium-server-standalone-2.49.0.jar, the jar package of test framework and jcommander-1.4.jar, testng.xml in the folder.

3. Configure environment variables, right-click "Computer" -> Properties -> Advanced System Settings -> Environment Variables, establish the path TESTNG-HOME,

4. Put testng-6.8.5.jar, selenium-server-standalone-2.49.0.jar, the jar package of the test framework and jcommander-1.4.jar into the CLASSPATH.

5. Open the folder on the command line and enter java org.testng.TestNG testng.xml

 

First of all, if there is no main function, it is because of the lack of a jcommander-1.4.jar, remember to add environment variables.

The second point is that the environment variables are similar to the jdk configuration, but there are a lot of jar packages required, such as testng-6.8.5.jar, selenium-server-standalone-2.49.0.jar, the jar package of the test framework and jcommander-1.4 .jar.

The third point, if there is no problem with the configuration, it still can't run. The problem is that you have added other content to your code, such as logs, or other plug-ins.

 

Guess you like

Origin blog.csdn.net/u014179640/article/details/54341258