Jmeter+badboy Installation Use Documentation

Source: Internet
Author: User
Tags documentation generator

Jmeter+badboy Installation Use Documentation

Directory

1. JMeter Installation 1

2, JMeter base use 3

3. Use JMeter for distributed testing 10

4. Badboy Installation 11

5. Badboy+jmeter Recording and exporting Test 12

JMeter Introduction:

JMeter can be used to test the performance of static or dynamic resources (files, Servlets, Perl scripts, Java objects, databases and queries, FTP servers, or other resources). The original Jmemer was designed for web/http testing, but it has been extended to support a wide variety of test modules. It is shipped with modules for HTTP and SQL databases (using JDBC). It can be used to test the operation of a static database or a server in an active database, which can be used to simulate a heavy load on a server or network system to test its resistance, or to analyze all operating conditions under different load types. It also provides a replaceable interface for customizing data display, test synchronization, and test creation and execution.

Note

JMeter installation Start error: Not able to find Java executable or version. Please check your Java installation, do the following:

Add in the environment variable path:%systemroot%/system32;%systemroot%;

1, JMeter Installation

1, download JMeter, the official website is http://jmeter.apache.org/(choose to download the binaries type of installation package, do not select the source type, or you will appear unable to access Jarfile./apachejmeter.jar's error)

(Make sure Java is installed before installing)

2, after the download is complete, the direct decompression, in the JMeter bin directory, locate the Jmeter.bat file, double-click Run

3. Main interface:

There is also a command box that cannot be closed, and a close jmeter will also close

2, JMeter Basic use

After the program runs, we can see that the JMeter is organized and tested in the form of a test plan. Right-click on the test plan and select "Add", we can see that the JMeter mainly contains the following components:

1. Thread Group (Threads)-represents a certain number of concurrent users, which can be used to impersonate concurrent users to send requests. The actual request content is defined in sampler, and all requests need to be included in the thread group.

2. Test Fragment--the test fragment is a special type of controller that is sibling to the thread group in the test plan. The difference between a test fragment and a thread group is that in a test plan, the thread group itself is executed, and the test fragment itself is not executed. The test fragment is executed only if it is referenced by a module controller or is included in a controller. Simply put, we can understand the thread group as an entry function and interpret the test fragment as a private function, and the test fragment will be executed only when it is called.

3, configuration Components--Configure the components to maintain sampler required configuration information, and according to actual needs will modify the content of the request.

4. Timer--Define the delay interval between requests.

5. Pre-processor, post-processor-responsible for completing the work before and after generating the request. The predecessor processor is often used to modify the requested settings, and the post processor is often used to process the response data.

6. Assertion--to determine if the result of the request response is as expected by the user. It can be used to check the validity of the test, isolate the problem domain, and perform the stress test if the function is correct.

7, the listener-responsible for collecting test results, and in a variety of ways to display.

Simple example:

1) First add a thread group and set the thread concurrency amount:

which

1) Number of threads-Indicates how many threads JMeter will initiate for target access

Ramp-up period– indicates how long (in seconds) the JMeter will start to complete these threads

Cycle Count – Indicates how many times JMeter will iterate over the current thread group

  1. Set up a collector (Sampler) to add a sampler for an HTTP request to a thread group

    Configured as follows (the default port for Apache server (Http) is 80;ssl (HTTPS) is 443)

  2.  

    4) run startup test, view results

    run the test to see the graphical results, we can see the amount of data accessed, the average access time, median value, the amount of deviation from access (the difference between access time and median time), throughput.

     

     

    5) results analysis

    The results from the listener can be exported, and then further data analysis of these results, you can estimate the performance of the measurement site. (Common listener except the above two also has the aggregation report)

     

  3. distributed testing using JMeter

    1, install JMeter on all machines that expect to run JMeter as a load generator, and identify one of the machines as the controller and the other as the agent. Then run the Jmeter-server.bat file on all agent machines-assuming we use two machines 172.20.80.47 and 172.20.80.68 as proxies;

    2, locate the bin directory under the JMeter installation directory of the controller machine, find the Jmeter.properties file, and use Notepad or other text editing tools to open it;

    3, find the string "remote_hosts=" in the open file, and you can find a line like "remote_hosts=127.0.0.1". The 127.0..0.1 represents the machine running the JMeter agent, which needs to be modified to "remote_hosts=172.20.80.47,172.20.80.68";

    4, save the file and restart the JMeter on the controller machine and go to start--The Remote boot menu item. You will see the address of the two agents we just added, select to run, if you want to start all agents at the same time, select Remote all start.

    5, to be distributed test agent machine need to add environment variables, that is, add user variable Jmeter_home=d:\jmeter, Add D:\jmeter\bin to path in the system variable (assuming JMeter is placed in the D-packing directory)

    4, Badboy install

  4. Download (http://www.badboy.com.au/download/index) Badboy software on official website
  5. Download finished directly click on the exe file to install, as usual software installation, here is unknown.
  6. When the installation is complete, click on the icon to see the Badboy IDE interface, as

    5. Badboy+jmeter Recording and export test

    is a few comments on the interface, after reading can probably understand its basic application

    1) Enter the URL of the Web app you want to record in the Address bar (the section labeled red in the figure), and here we take http://www.baidu.com as an example.

    2) Click the "Start Recording" button (the section marked in the red circle in the figure) to start recording.

    3) After you start recording, you can work directly in the Badboy embedded browser (on the right side of the main interface) and all operations are recorded in the edit window on the left side of the main interface (the section labeled in the picture).

    5) When the recording is complete, click the Stop Recording button in the toolbar (the part marked in the red box in the figure) to complete the recording of the script.

  7. Select the file-, export to JMeter menu, fill in the filename "baidu.jmx", and export the recorded script to the JMeter script format. You can also choose the File-by-save menu to save as a badboy script.

  8. Start JMeter, click File-Open, select the test script you just generated, you can test it with JMeter

Jmeter+badboy Installation Use Documentation

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.