JMeter- performance test

JMeter- performance test

 Reference documents: https://jmeter.apache.org/usermanual/boss.html

First, the problem

1, the estimated average number of users is how much (normal load)?

2, is expected to peak number of users is how much?

3, taking into account that the load test may cause one or more server crashes, what time is our application load testing of a good time (after hours or on weekends)?

4, stateful applications it? If so, how management state that the application of it (with the cookie, session rewriting or other means)?

5. What is the purpose of testing to achieve?

 

Second, resources

1, the network: who knows our network topology? If you encounter any firewall or proxy issues, turn to for help. If you have a dedicated test network (network with very low latency) will be a very good thing, you know who you can set which will be very useful. If the application can not be expanded as expected, who can help add additional hardware?

2, Application: Who knows how we want to test the application is running? Normal test sequence is:

  Low-volume test (we can for our application benchmarks it?)
  Benchmark (average number of users)
  load test (maximum number of users)
  destructive testing (what our limitations are hard?)
  Test may be from the black box the development of white-box testing (except that the first one does not require the application of knowledge [are considered "black box"], while the second one requires knowledge of program). In this process, you may find a lot of application problems, so be prepared to protect the work.

 

Third, the platform

Which platform to run the benchmark / load testing should be used?

The platform should be a widely used hardware, software and installation standards. Remember, if you publish the test results, the first thing is to hire a professional staff to do the customer to verify it. You may want to simplify this person's work as much as possible.

For Windows, Windows XP Professional system has the minimum requirements of the (other systems can not thread 50-60 concurrent connections)

Good free platform including linux, BSD and Solaris Intel. If you have more money, you can use commercial Linux.

For non-Windows platform, use "ulimit -n unlimited" to the number of files per process is set to open does not limit, and the command includes startup script (test account .bashrc or .cshrc script) in a user account .

Also note that some Linux / Unix version only server. These are usually little or no GUI support, this operating system should be able to run JMeter in CLI mode, but if the minimal installation GUI environment, should be able to run JMeter in GUI mode.

With the large-scale benchmark / load testing, the platform itself will become a limiting factor. Therefore, conditional on the use of the best hardware and software. Remember to publish benchmarks should be included in the hardware / software configuration information.

When you need a lot of machine or want to test network latency, cloud can help you. JMeter can run on almost any available infrastructure in the cloud, so you can easily install on cloud instances. If you do not want to manage JMeter, then Commercial Cloud PAAS also supports JMeter.

Do not forget JMeter batch (CLI) mode. For several reasons, this mode should be used during the load test:

  If you have a strong support Java server functionality, but may not achieve fast graphics, or you need to log in remotely.
  And using a remote display or client - server mode compared to batch (CLI) mode can reduce network traffic.
  Java AWT thread for GUI mode sometimes to change behavior by preventing implantation

Log files may be loaded to the batch JMeter the workstation for analysis, or can use CSV outputs the data into a spreadsheet.

Remember, GUI mode is used to create and debug scripts, not for load testing

 

Fourth, tools

ping This can be used to determine whether you can reach the target site. You can specify options to "ping" provide "traceroute" the same route as the report type.

nslookup / dig Although users will typically use a human-readable Internet address, but you may want to avoid avoid the overhead of a DNS lookup when performing benchmark / load testing. This tool can be used to determine the unique address of the target site.

traceroute If you can not "ping" the destination site, you can use it to identify the problem (probably firewall or proxy). It can also be used to estimate overall network latency (as low as possible should be provided in the local network run delay - Keep in mind that your users will likely run on a busy Internet). Typically, the number of hops as possible.

 

Fifth, how to enhance JMeter?

 There are many open source and commercial providers JMeter plug-ins or other resources for use JMeter. Some of these are listed in the JMeter Wiki. They are divided into the following categories:

 JMeterPlugins  - Extended JMeter plug

JMeterAddons  - plug-in for use with JMeter, browser, Maven and Jenkins plugins.

JMeterServices  - third-party services, such as cloud-based JMeter

Please note that these appear on the Wiki Apache JMeter does not mean that any project approved. Any support request should directly contact the supplier.

 

VI. Why is Java?

Why is java, rather than Perl or C? Perl may be a good choice, but only in addition to other Benchmark package seems to give rather vague results. And, with Perl simulate multiple users it is a difficult problem (can simulate multiple connections through many processes derived from Shell scripts, but these are not thread, but the process). Perl community large

If you find that someone has written something useful, this may be a good solution. Of course, C is also a good choice (please see Apache ab tool). But to write all the required benchmarks custom network applications, threads and state management code.

Java provides you with the required benchmark application custom network free, thread and state management code. Java knows HTTP, FTP and HTTPS- and RMI, IIOP and JDBC (not to mention the cookie, URL encoding and URL rewriting). In addition, Java provides you with a security automatic garbage collection and bytecode levels.

 

Guess you like

Origin www.cnblogs.com/bigfacecat-h/p/performanceTesting.html