Automated Implementation of Jenkins + testng + testlink

Source: Internet
Author: User
Tags testlink testng

We have already achieved the perfect combination of Jenkins and testng, but some drawbacks have been found during use, mainly because the correlation between test code and test cases is not strong, and the test code execution status cannot be directly associated with the test case execution status! To solve this problem, you must use a test management tool to manage the code, use cases, and execution status in a unified manner. In order to quickly solve this problem without modifying the original framework, to avoid repeated wheel creation, consider introducing the testlink test management tool for the following reasons:

1. This tool is easy to use and widely used, so it has fewer faults and low maintenance costs.

2. This tool is open-source for further development.

3. Jenkins provides dedicated plug-ins for this tool to reduce development workload

The combination process is roughly as follows:

1. Install testlink

If you search for images on the Internet, you will not detail them. install them in sequence:

1. Apache: Web server. Run the yum command.

2. install various PHP components and run the yum command.

3. Install the source file testlink and decompress it to the specified path. What is my path (/var/www/testlink)

4. Install the MySQL database

5. Start the apache service. Install the service step by step after accessing the browser.

2. Set testlink

1. Go to the "Custom Field Management" Page and create a custom field, such as runclass, for example:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/49/08/wKioL1QNx9mxch2BAAC2usxV9WA347.jpg "Title =" testlink1.png "alt =" wkiol1qnx9mxch2baac2usxv9wa347.jpg "/>

2. In the "product management" module, go to the "specify custom fields" module, and you can see the fields you just created. Select this option and perform the specified operation.

3. Create a test project in the "product management" module.

4. Create test requirements and test cases in the "test cases" module.

5. On the "Create Test Case" Page, display the previously created custom fields, as shown in figure

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/49/06/wKiom1QNx-aRFSQfAAD4080oAX8601.jpg "Title =" testlink2.png "alt =" wKiom1QNx-aRFSQfAAD4080oAX8601.jpg "/>

In the input box, enter the full package path of the testng test class, indicating that the current test case is associated with the class. If you want to associate the granularity to the method level, add "# method name" after the class and set the type to "automatic"

6. Create a test plan in the "test plan management" module.

7. Return to the "test cases" module and associate the created test cases with the test plan.

3. Set Jenkins

1. download and install the testlink plug-in "plug-in management"

2. After the installation is successful, you can see the testlink settings on the "system settings" Page, such:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/49/06/wKiom1QNyATAf-y7AAEIxkeQ7sM324.jpg "Title =" jenkins.png "alt =" wKiom1QNyATAf-y7AAEIxkeQ7sM324.jpg "/>

The key entered in the develop key is the content displayed in the API column of testlink's "personal account ".

3. on the job configuration page, add invoke testlink in the "build" step, enter the test project name, Test Plan Name, build name, and custom field name to associate with the test cases and their test classes in the test plan defined in testlink.

4. to execute all test classes iteratively, select "iterative test Build Steps" and fill in the following information:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/49/06/wKiom1QNyDPDlDE8AADAoA4IaXc396.jpg "style =" float: none; "Title =" jenkins3.png "alt =" wkiom1qnydpdlde8aadaoa4iaxc396.jpg "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/49/08/wKioL1QNyD6yQTWjAAEHCPEF5-A532.jpg "style =" float: none; "Title =" jenkin4.png "alt =" wKioL1QNyD6yQTWjAAEHCPEF5-A532.jpg "/>




After performing the preceding steps, the execution result of the test code will be returned to testlink after each Automatic Build. You can view the automatic use case on testlink!


Automated Implementation of Jenkins + testng + testlink

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.