Jenkins continuous integration project practice - automated testing based on Python Selenium (2)

The previous article talked about how to build jenkins. This article mainly talks about how to connect automation code with jenkins

Two ways to run on jenkins:

The first one is to run local code on jenkins as follows:

  1. New project: Fill in the project name according to your own project situation and choose the free mode
  2. Configure according to the order shown in Figure 2 [Note: If the project has a virtual environment, add the operation command of the virtual environment when building the environment: source ****/even/bin/python This command is written in the local project After the path, before running the file]
  3. Click Apply-Save, and then build it. build now, usually the build is successful
  4. Note: I set the build trigger to automatically build every 15 minutes. If you need other time settings, you can check the shell-related syntax. I haven't studied it carefully. If you encounter other problems, please leave a message

                    figure 2

The second is to run the server code on jenkins as follows:

  • First configure the git public key of your computer to the github of the project you are currently running. This involves privacy companies that have not sent it out. You can get it in gzh at the end of the article
  • Jenkins itself is built on the liunx server, and then the project creation and configuration are the same as the first one, adding the operation of adding git, as shown in the figure below
  • After the configuration is successful, apply and save, and you can run the code on the linux server (the company's server, domain name address, jenkins with interface)
  • Note: Interface automation will appear during operation. Linux server does not have an interface browser, and there will be problems. This problem needs to be studied to see if it can be solved, but this problem will not occur in the automated test of the interface. The interface does not need to start the browser.
  • If you have any problems with your own research, please leave a message. There is no real operation on the linux server. Maybe everyone will encounter problems. Welcome to leave a message and solve it together.

Finally: In order to give back to the die-hard fans, I have compiled a complete software testing video learning tutorial for you. If you need it, you can get it for free【保证100%免费】

Software Testing Interview Documentation

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Ali, Tencent, and Byte, and some Byte bosses have given authoritative answers. Finish this set The interview materials believe that everyone can find a satisfactory job.

Guess you like

Origin blog.csdn.net/jiangjunsss/article/details/131491195