Python+selenium Automated Software Testing (11th): Continuous integration with Jenkins and GitHub

Source: Internet
Author: User

11.1 Jenkins Continuous Integration environment

Related installation package download link: http://pan.baidu.com/s/1qYhmlg4 Password: dcw2
Complimentary Jenkins integrated selenium environment video
Link http://pan.baidu.com/s/1qXAHwg0 Password: juy7

11.2 Tomcat+jenkins

*******************************************************************************
Related installation package download link: http://pan.baidu.com/s/1qYhmlg4 Password: dcw2
Complimentary Jenkins integrated selenium environment video
Link http://pan.baidu.com/s/1qXAHwg0 Password: juy7
*********************************************************************************
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 Many, here do not speak, Baidu search!
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

11.3 GitHub Use

Objective
Don't use GitHub to be ashamed to say that you are a yard farmer, GitHub as an open source code warehouse management platform, the management of code is really very important.
The question is: why are more and more small partners like open source? Answer: Because we can download the source of the great God free of charge Ah!

One, register your github account
1. Register an account first, register the address: https://github.com/
2. After logging in, start your journey

3. Create a repository name, enter the box to take a name (do not use Chinese!!!) )

4. Point create Repository is created successfully, the interface is as follows

Second, install Git
1.git is a tool for local client management code: Https://git-scm.com/download/win

2. Download to the local computer, all the way to install the Fool Next->next->-next

3. After the installation is complete, create a local folder, such as GitHub, and enter CMD in the File Address field.

4. After opening the DOS interface, enter git and see the following interface to show the installation success

Third, the local warehouse
1. Back to the previous GitHub interface, here are a few instructions to tell us how to upload the local code:
Git init

git add readme.md
Git commit-m "First commit"
Git remote add Origin https://github.com/yoyoketang/yoyoketang.git
Git push-u Origin Master

2. On the GitHub file directory that you created above, put the code that needs to be uploaded, and then install the steps above to start

Operation
First step: Git init--opening a position
Step two: Git add *-Add code to the local repository (* code to add all updates)
Step three: Git commit-m "First commit"--commits to the local cache ("quotes indicate what is being submitted")

Fourth step: Git remote Add Origin https://github.com/yoyoketang/yoyoketang.git-submit to remote GitHub (at the back of the address, which is the previously configured repository address)

Fifth step: Git push-u Origin master--push to master Branch

3. After the code has been uploaded successfully,

Iv. encountering problems and solutions Note: For the first time, the following questions will be encountered during the input of the above instruction:
1. If the cmd window sees a prompt for these two messages
$ git config--global user.name "John Doe"

$ git config--global user.email [email protected]
Workaround: Press the above elevation, cmd window and then enter
>git config--global user.name "Here is your GitHub user name"
>git config--global user.email [email protected] (your email)
2. When submitting to remote, prompt:
Fatal:remote origin already exists.
WORKAROUND: Delete the remote git repository
>git Remote RM origin
3. When you need to log in during the first operation, enter your account name and password as prompted.

Python+selenium Automated Software Testing (11th): Continuous integration with Jenkins and GitHub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.