Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Jenkins+Ant+TestNG+Testlink Automation build Integration

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

During this period of time, we used to manually execute automated test scripts in the Eclipse project and call Testlink API to execute test cases. at present, we build the way of Jenkins automated construction testing to achieve continuous construction and execute automated testing.

Hardware environment:

Operating system: Windows Server 2008 R2 Enterprise

CPU:Intel (R) Xeon (R) CPU E5-2620 v2@2.10GHz 4-core processor

Memory: 8GB

Disk: 1T

Software environment:

Jdk1.7.0_79

Ant1.9.4

Apache-tomcat-8.0.28

Jenkins2.37

Testlink1.9.9

Prerequisites:

After deploying jenkins, you need to install the following plug-ins:

Ant Plugin, build timeout plugin, Subversion Plug-in, TestLink Plugin, HTML Publisher plugin if you need to use TestNG to display the report after construction, you need TestNG Results Plugin

The following plug-ins and versions that must be installed

Try the exchange group: 1017539290, join the group to get the test learning materials free of charge!

Ant Plugin1.5

Subversion Plug-in2.8

TestLink Plugin3.12

TestNG Results Plugin1.14 or HTML Publisher plugin1.13

Jenkins system Administration-Configure Global Security, modifying the access control security domain, allowing users to register

Jenkins system Administration-Global Tool Configuration configuration, where JDK and Ant are configured and installed

Jenkins system Administration-system Settings, fill in TestLink configuration information

Note:

The xmlrpc.php file path under the URL:testlink installation directory

Developer Key: log in to the personal API access key generated under the testlink- personal account

New Project and configuration of Testlink

1. Install Testlink

two。 New automation project, test plan

3. Create custom fields and assign custom fields to the current automated test project

4. To create a new set of test cases and test cases, note two things:

1) change "test mode" to "automatic"

2) fill in the custom field "Java Class" as the package path of "test class # method name" for Eclipse project

5. Associate test cases to the test plan

The relevant configuration of TestLink has been completed.

Jenkins new build project and configuration

1. Build a new free-style software project

2.General, which is fine by default

3. Source code management, SVN management, select Subversion

Repository URL: the path where the source code is stored on the SVN

Credentials: click "Add-Jenkins" and enter your jenkins login account and password, as shown in the figure.

Repository depth: select infinity

Check-out Strategy:Use 'svn update' as much as possible

Other defaults are fine.

4. Build triggers. Default is fine.

5. Build the environment by default

6. Build, select Invoke TestLink, and fill in the following information

TestLink Configuration:

Test Execution:

Result Seeking Strategy: add TestNG class name and fill in the following information

7. After building, add "Publish HTML reports" and "Publish TestNG Results", and fill in the following information

8. After building, you can add "Publish to Subversion repository" (you need to install the SVN Publisher plugin plug-in), and upload the new result file generated after the build to SVN.

9. Build the result report

10. When you click HTML Report to view the result report, Jenkins does not display the HMTL report, as shown in the figure:

Problem solved: each time you restart Jekins, you need to enter the following script in system-script, and then run System.setProperty ("hudson.model.DirectoryBrowserSupport.CSP", "").

Try the exchange group: 1017539290, join the group to get the test learning materials free of charge!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report