Research on tester Automation test based on Linux Rational performance

Source: Internet
Author: User
Tags cpu usage

1. Introduction to Tools

Rational Performance Tester is a software designed for testing WEB applications that captures and corrects performance issues before deployment. Rational Performance Tester generates a series of reports by simulating the number of concurrent users, which are clearly flagged to display information such as the performance, URL, and transaction of a Web page to help engineers identify system bottlenecks before deployment. Advanced features include detailed test scheduling arrangements at the behavior and usage level of each user group. The Rational performance Tester also provides an automated "data pool" feature that can change the test data settings used by each impersonated user. Using a browser window with integrated Test Editor, you can review the Web pages you visited during your Test history. In addition, advanced testers have the option of inserting custom Java code into performance tests to perform operations similar to advanced data analysis and request resolution.

2. Usage Scenarios

RPT is a powerful performance testing tool for Web application design, based on the Windows and Linux user interface, simulating the generation of a number of concurrent users, completing performance tests and generating a series of reports, and clearly marking the performance data of the Web pages. Use the tree-based Test Editor to provide advanced and detailed test views and test data for viewing.

Experimental Environment configuration: host Linux, Memory 4G, operating system Ubuntu 13.04,IBM Rational Performance Tester automated test management tool.

3 How to use
    RPT集成了Eclipse作为图形化界面,所以即使在Linux下操作起来也非常方便。我们主要通过RPT完成性能测试。因此首先新建性能测试项目,然后主要通过四个步骤:记录测试、关联数据池、创建调度、生成性能报告来完成测试。
3.1 New Performance Test project

Create a new Select Performance test Project and click Next to complete the project name.

(1), the project file structure, the project folder is commonly used in testing, scheduling, data pool, results:

(2), set up test under test folder, Note: For Web application testing, you can use HTTP test, socket test, TN3270 test, select Browser.

(3), begin to record the test, it is best to familiarize yourself with the test process (including the URL and the action to be done), note that before the test to remove the browser visited the test URL of all records including cookies, etc., to avoid causing inaccurate test results.

(4), the main steps in the test process: The following pictures are mainly used in the test tool for comments, snapshots, explanations and so on.
通过注释,标示当前测试页面

快照保留参数输入等关键动作:

(5), close the browser, complete the test:


All test data (including snapshots, annotations, etc.)

3.2 New Data pool

数据池中添加数据

3.3 Replace existing test data items (such as search keywords) with data in the data pool

选择数据项,单击替换

用现有数据池数据替换

3.4 New Schedule
在调度文件夹下新建调度

在调度中分配用户组,并添加延迟,循环等事务

运行调度

3.5 scheduling complete, generating performance reports

3.6 Exporting a performance report

4. Results Collection and analysis
收集响应时间分解数据、收集资源监控器数据、为分析收集的数据提供视图和工具,以便找出引起性能问题的原因。
4.1 Resource Monitoring
资源监控数据由一序列在特定间隔期间的观察组成。实时收集数据,除了响应时间分解数据之外,资源监控数据提供了一种更加完善的系统视图,可以用来确定问题。可以收集并分析一下数据:

? CPU usage (overall, for a single processor, even a single process)
? Available memory
? HDD Usage Status
? TCP/IP and network throughput

4.2 Response Time decomposition
响应时间分解显示了系统的每一个部分在测试期间的时间所占用系统运行总时间的比重。响应时间分解视图和一个测试或者时间表的页面元素(URL)相关。这样可以在任意 HTTP 页面元素的响应时间统计表中,察看在测试下系统每一个部分所花费的时间。可以通过响应时间:

? Identify code issues
? See which application on the server is the bottleneck of the entire system
? Further decide which package, class, or method is causing the problem

5. Design test Plan complete test Case 5.1 test scenario
对于测试一个Web应用程序,需要一些简单的测试用例,如加载多图片页面,填入用户数据,搜索关键字等都是测试的关键部分。关联数据池,比如在测试过程中有搜索动作或者登录动作,可以用建立的数据池中的数据替换掉搜索的关键字并重复进行,比如持续性恶意登录。 调度主要模拟并发,建立调度后可以根据百分比或者绝对数量建立用户组,用户组模拟现实中的大量用户,可以给用户组添加刚才的测试,即每个用户组中的用户执行以上测试所进行的动作,也可以为不通过的用户组分配不同的测试用例,同时可以添加循环,延迟等测试条件,这对测试网络并发量非常重要。
5.2 Test Cases:
以北航ihome和未来花园为例,通过测试登录、加载多图、发表状态(更新数据库)、搜索关键字等关键性指标来测试网络性能;主要动作包括:Ihome 登录Ihome加载多图页面和发表状态未来花园查看贴子和搜索相关关键字

And through the data pool into different parameters to simulate the malicious login and multi-person lookup, the user group of 5 people as an example, and in the scheduling to add iterations, loops, delays, etc., simulation concurrency.
All of these are from Test ihome and future garden use cases, so don't repeat the testing process.

6. Data analysis and processing
生成的性能报告如下
6.1 Overall:

6.2 Summary

6.3 Page Performance:

6.4 Page Response Time:

6.5 Page Response Time details


6.6 Page Throughput

6.7 Server Throughput:

6.8 Server Health

6.9 Server Run Details

6.10 Cache

6.11 Resources:

6.12 Page Size

6.13 Error Number:

6.14 Page Health:

7. Simple analysis of data
由于是试用版本的Rational Performance Tester只支持5人的用户组,所以对于并发的模拟结果并不太好,但还是能够从性能报告中获得一些我们需要的信息:

(1), ihome Home response time is much larger than other pages, this page needs to load a large number of components and pictures, but also did not do much optimization. A good percentage of running is only around 27%.
(2), the user page hit rate is also relatively low.
(3), the server throughput decreased in the case of increased number of cases is more obvious.
(4), Ihome's login page and home Server Status code success percentage is very low.
(5), as far as the host resources are concerned, _total–%disk time is the longest when logging into Ihome home page.

Of course, the data contains a lot of information, because the test case is also relatively simple, so the complex analysis is no longer done here. Just a basic way to illustrate the entire performance testing process and data analysis.
  

Research on tester Automation test based on Linux Rational performance

Related Article

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.