Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Integration method of selenium webdriver or Appium+testng+ant+jenkins

Shulou Source: shulou.com Published: 2022-06-03 03:44:54 10月04日 Update

Automated testing seems to be inseparable from jenkins, well, in fact, I do not think it is really necessary to rely so much, but this is the reality, let's be vulgar, this time we will see how to integrate

1. There is no problem with the script.

2. Testng and reportng are all right. Don't ask me how to do it.

3. Ant (https://ant.apache.org/bindownload.cgi), configure environment variables, and go to google by yourself.

4. Jenkins goes to the official website to download the windows version (https://jenkins.io/download/), and you can install it all the way to next.

Next, let's talk about the logic of integration: jenkins > ant (build.xml) > script, the core of which is the writing of build.xml.

The content of build.xml is as follows, and the path in it needs to be written according to the actual situation.

5. Start the jenkins service, and the browser visits http://localhost:8080 to see the page in a moment (if it is the latest version of jenkins, you need to have an installation process, it is all simple in English, it is not difficult, and children's shoes can't google themselves).

6. System management > plug-in management, install AntPlugin plug-in, TestNG Results Plugin plug-in and HTML Publisher plugin plug-in (need to install × × ×, otherwise the failure rate is high)

7. System management-> script command line, enter the following command, and run (modify the policy to allow external js, css, etc., to run and display, avoid the appearance of white pages):

System.setProperty ("hudson.model.DirectoryBrowserSupport.CSP", "sandbox; default-src 'self';")

8. Create a new free-style job

9. Run the view report

Tags: Run plug-in script manage command system problem integration vulgar necessary free next content variable failure rate actual that is situation report latest version Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MariaDB macOS Redmi vpn