java TestNgFramework for automated testing framework
Building TestNg test framework requires installation of testNg plug-in.
Download address: http://testng.org/doc/download.html
http://dl.bintray.com/testng-team/testng-eclipse-release/zipped/6.14.0.201802161500/(Download the latest version of 6.14.0)
After downloading, decompress and put the corresponding files in eclipse.
You can also install plug-ins online.
TestNgJar package required for frame construction: com.beust.jcommander_1.72.0.jar
org.testng_6.14.2.r201802161450.jar
seleniumRequired jar package
selenium-server-standalone-3.9.1.jar
The examples are as follows
new–other—testNg classesCreating test classes for testNg
package com.test; import org.testng.annotations.AfterTest; import org.testng.annotations.Test; @Test public class TestNgAdd { @AfterTest public void testAdd() { System.out.println("---------test-----------"); } }
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="Suite1"> <test name="test12"> <classes> <class name="com.test.TestNgAdd" /> </classes> </test> </suite>