Objective
After the selenium script is written, it is generally integrated into the Jenkins environment, which facilitates one-click execution.
First, the Environment preparation
Small Series Environment:
1.WIN10 64-bit
2.JDK 1.8.0_66
3.tomcat 9.0.0.M4
4.jenkins 2.0
Ii. Installation of JDK
1. Install JDK tutorial A lot, do not say here, you can refer to this link tutorial:JDK Installation Configuration Tutorial _ Baidu Experience
Add the following variables in the system environment variable:
Installation path of ①JAVA_HOME:JDK C:\SUN\JAVA\JDK
②classpath: ".; %java_home%\lib; "
③path: ";%java_home%\bin"
2. Check if the environment is successful (this step is important)
>>java-version
>>javac
(Enter Javac must see these contents in Chinese)
Second, the Tomcat environment
1. Open Baidu Web page, in the Baidu Search bar input key sub: Tomcat, in the query results click on the Tomcat website to download. (The software must be downloaded in the official website, do not mess, be careful Semma)
2. Installation process, on-line also available:tomcat how to download installation How to configure environment variables _ Baidu Experience
3.TOMCAT Environment variables
Add the following variables to the system variable Windows 7 system installation and Configuration Tomcat Server environment _ Baidu Experience
1) New Tomcat_home variable
Variable name Tomcat_home
Variable Value D:\tomcat
The value of the variable is the Tomcat decompression path we downloaded, and here's my d:\tomcat.
2) New Catalina_home variable
Variable name Catalina_home
Variable Value C:\tomcat
Yes, the value of the Catalina_home variable is the same as the value of the Tomcat_home variable.
3) Modify the variable path
Locate the path variable name in the system variable, double-click or click Edit, and add the following at the end
;%catalina_home%\bin;%catalina_home%\lib
It is important to note that the values of each variable must be separated.
Third, start Tomcat
1. Start the Tomcat server
Under cmd Command Window enter Startup.bat carriage return, run as shown
(There is no need to switch to the directory if the environment variable is installed)
2. Double-click Start Run
3.Tomcat after successful startup, launch the browser, in the browser's address bar type: http://localhost:8080/. then enter. Enter the following screen. This means that Tomcat is installed correctly
Iv. Environment of Jenins
The 1.Jenkins package is divided into two types:
One is the Setup.exe client package (this double-click with QQ, do not say)
One is a war package
2.war bag put under WebApps
3. Start Jenkins
Restart Tomcat:startup.bat First, then enter http://localhost:8080/jenkins/in the browser
V. Configuring Jenkins
1. Create a new job
2. Enter the project name
3. Build triggers
4. Configuring the cmd command
5. Select project One click to execute, start automation
(Students who have purchased this book can get the corresponding Jenkins video tutorial in 10.1 chapters)
The study process has encountered the question, may add selenium (Python+java) QQ Group Exchange: 232607095
You can also pay attention to my personal public number:
Selenium+python Advanced Tutorial "published:selenium webdriver based on Python source case (purchase this book to send the corresponding PDF version)
Selenium2+python Automation 62-jenkins Continuous Integration Environment construction