jmeter testing tools

A, Jmeter testing tools Introduction

Jmeter is a pure java development of test tools, so it can be used on any operating system installed in the JVM.

Jmeter load and performance testing can be used to support different server / protocol.

E.g:

  • Web - HTTP, HTTPS
  • SOAP / REST
  • FTP
  • Database via JDBC (jmeter using java development because it requires the use of test drives a corresponding database jdbc)
  • LDAP
  • Message-oriented middleware (MOM) via JMS (an open source java messaging middleware)
  • Mail - SMTP (S), POP3 (S) and IMAP (S) mail service
  • MongoDB (NoSQL) MongoDB database testing
  • Native commands or shell scripts 
  • TCP

For details, see the official website http://jmeter.apache.org/usermanual/get-started.html

Second, set up a test environment

This document describes only in the windows environment to build

1. Installation JDK6 or higher version of the win or linux

2. Go to the official website to download the latest Jmeter (recommended version is best not to hold than the official website the latest version 3 or later poor)

http://jmeter.apache.org/download_jmeter.cgi

Jmeter directory structure Introduction

This document describes only two major directory bin and lib, the other is not within the scope of this article to discuss.

Bin directory includes executable Jmeter jar file and some batch or script file, click jmeter.bat in the windows environment to run a batch file to launch jmeter

lib directory is to place some of the main jmeter dependent jar file library. For example, with Jmeter test mysql database, jmeter default is not provided jdbc driver mysql data, which will need to download a mysql jdbc driver into the lib directory in order to do the test.

Third, build test plans

1. Add test plan

[File] -> [] Templates, then select a template test plan, as shown in FIG.

2. Build Web plan

In the picture above select Building a Web Test Plan, post-click [create] Jmeter shall we created a web test plan

As shown below:

Jmeter Users] [image above is actually a thread group, is to use the thread group to simulate multiple users. Its name is a change that. As shown below

【Jmeter Users】下包含【HTTP Request Default】,【Home Page】,【Changes】,【Graph Results】。

They will do the following simple understanding, [HTTP Request Default] in fact it is this global configuration Web http test plan, set global service ip, port number. As follows

[Home Page] is actually a http request it to be, a page can also be a http interface [Changes] and [Home Page] is the same, they can many of these new http request, the operation as shown below

The following is a simple configuration http request

[Graph Results] is the result of monitoring represented graphically.

You can use other reports the results, as shown in FIG.

3. Build a database test

An example of the above is presented by [Templates] to select a template to build a test on this case will be by default when you start the initial Jmeter of a test plan to go step by step to build a complete database testing program. The first step, adding a thread group Add-> Thread (users) -> Thread Group

After addition shown below

Error correction: Ramp-Up Period under the figure represents the start interval (an interval between the start of the user) between threads

The second step is added JDBC link configuration the Add  ->  Config Element  ->  JDBC Connection the Configuration

After the addition shown in FIG.

Database url can not use anti \, right jdbc: mysql: // localhost: 3306 / edu

The third step, a connection request to add jdbc the Add  ->  Sampler  ->  the JDBC the Request

After addition the following figure shown in FIG.

4 Add the results of listening test

The Add  ->  Listener  ->  the Summary Report can choose other monitoring report

 

 

Reproduced in: https: //my.oschina.net/u/1760791/blog/729371

Guess you like

Origin blog.csdn.net/weixin_34402090/article/details/92144061