Jenkins automation builds Python nose test

Source: Internet
Author: User

[this article is from the Sky cloud-owned blog park]

Brief introduction

Building a python nose test with Jenkins automation is two steps:

1. Create nodes (nodes are machines that perform automated tests);

2. Create the task and bind the node (using the specified machine to run the task we created, here we choose to execute a script).

Create a Node

1. Sign in to the Jenkins platform and find a node in the left-hand node and click "nodes" on the Navigation bar-click on "create node"-enter "node name"-select "Permanent Agent"-click "ok." ”:

2. Specify the working directory of jenkins, and click "Save" as you want:

3. Access the newly created Autonose node page on the machine where you need to perform the automated tests and click "Launch" to download "slave-agent.jnlp":

4. Double click to run the downloaded "slave-agent.jnlp" file, The following screen appears to be successful:

Create a task and bind a node

1. Create a new task on the Jenkis main page:

2. Enter the task Name--select "build a free-style software Project"-click "ok":

3. On the task configuration page, Enter the node name "autonose" to bind the "autonose" node you just created:

4. Select "Execute Windows batch command" from the build bar below the Page:

5. Enter the batch script to be executed, as an example of the Python nose automation test, and click "save" after entering:

-v-s--with-xunit

6. Click "build now" on the task page you created and click on the appropriate build task to enter the build page:

7. On the build page, click "console output" to see the console output on the right side of the page:

Now that the build is complete, the Python nose test task We specified has been run on our machine and generated the test result file as shown in:

In the actual work, we can further refine our construction tasks, and realize the functions of timing automatic construction and sending email Reminders.

Jenkins automation builds Python nose test

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.