View RSS Feed

JMeter

Apache JMeter tutorials.

  1. Using Variables to parameterise tests

    by , 04-27-2012 at 07:29 PM
    Variables don't have to vary - they can be defined once, and if left alone, will not change value. So you can use them as short-hand for expressions that appear frequently in a test plan. Or for items which are constant during a run, but which may vary between runs. For example, the name of a host, or the number of threads in a thread group.

    When deciding how to structure a Test Plan, make a note of which items are constant for the run, but which may change between runs. Decide on ...
    Categories
    Tutorial
  2. Properties and Variables

    by , 04-27-2012 at 07:29 PM
    JMeter properties are defined in jmeter.properties. Properties are global to jmeter, and are mostly used to define some of the defaults JMeter uses. For example the property remote_hosts defines the servers that JMeter will try to run remotely. Properties can be referenced in test plans.

    JMeter variables are local to each thread. The values may be the same for each thread, or they may be different.
    If a variable is updated by a thread, only the thread copy of the variable ...
    Categories
    Tutorial
  3. JMeter Assertions

    by , 04-27-2012 at 07:28 PM
    Assertions allow you to assert facts about responses received from the server being tested. Using an assertion, you can essentially "test" that your application is returning the results you expect it to.
    For instance, you can assert that the response to a query will contain some particular text. The text you specify can be a Perl-style regular expression, and you can indicate that the response is to contain the text, or that it should match the whole response.

    You ...
    Categories
    Tutorial
  4. JMeter Timers

    by , 04-27-2012 at 07:27 PM
    By default, a JMeter thread sends requests without pausing between each request. We recommend that you specify a delay by adding one of the available timers to your Thread Group. If you do not add a delay, JMeter could overwhelm your server by making too many requests in a very short amount of time.

    The timer will cause JMeter to delay a certain amount of time before each sampler which is in its scope.

    If you choose to add more than one timer to a Thread Group, JMeter ...
    Categories
    Tutorial
  5. JMeter Listeners

    by , 04-27-2012 at 07:26 PM
    Listeners provide access to the information JMeter gathers about the test cases while JMeter runs. The Graph Results listener plots the response times on a graph. The "View Results Tree" Listener shows details of sampler requests and responses, and can display basic HTML and XML representations of the response. Other listeners provide summary or aggregation information.

    Additionally, listeners can direct the data to a file for later use. Every listener in JMeter provides ...
    Categories
    Tutorial
  6. Error reporting

    by , 04-27-2012 at 07:26 PM
    JMeter reports warnings and errors to the jmeter.log file, as well as some information on the test run itself. Just occasionally there may be some errors that JMeter is unable to trap and log; these will appear on the command console. If a test is not behaving as you expect, please check the log file in case any errors have been reported (e.g. perhaps a syntax error in a function call).

    Sampling errors (e.g. HTTP 404 - file not found) are not normally reported in the log file. Instead ...
    Categories
    Tutorial
  7. Stopping a Test

    by , 04-27-2012 at 07:25 PM
    There are two types of stop command available from the menu:

    • Stop (Control + '.') - stops the threads immediately if possible. In Versions of JMeter after 2.3.2, many samplers are now Interruptible which means that active samples can be terminated early. The stop command will check that all threads have stopped within the default timeout, which is 5000 ms = 5 seconds. [This can be changed using the JMeter property jmeterengine.threadstop.wait ] If the threads have not stopped, ...
    Categories
    Tutorial
  8. Running a Test Plan

    by , 04-27-2012 at 07:24 PM
    To run your test plan, choose "Start" (Control + r) from the "Run" menu item. When JMeter is running, it shows a small green box at the right hand end of the section just under the menu bar. You can also check the "Run" menu. If "Start" is disabled, and "Stop" is enabled, then JMeter is running your test plan (or, at least, it thinks it is).

    The numbers to the left of the green box are the number of active threads / total number of ...
    Categories
    Tutorial
  9. Running JMeter

    by , 04-27-2012 at 07:24 PM
    To run JMeter, run the jmeter.bat (for Windows) or jmeter (for Unix) file. These files are found in the bin directory. After a short pause, the JMeter GUI should appear.

    There are some additional scripts in the bin directory that you may find useful. Windows script files (the .CMD files require Win2K or later):

    • jmeter.bat - run JMeter (in GUI mode by default)
    • jmeter-n.cmd - drop a JMX file on this to run a non-GUI test
    • jmeter-n-r.cmd - drop a ...
    Categories
    Tutorial
  10. JMeter's Classpath

    by , 04-27-2012 at 07:23 PM
    The classes from jars are automatically found by the Jmeter in the following directories:

    JMETER_HOME/lib - used for utility jars
    JMETER_HOME/lib/ext - used for JMeter components

    One point to remember here is that you should jar any JMeter components developed by you and also you need to copy the jar into JMeter's lib/ext directory. JMeter components will be automatically found by the JMeter in any jars found here.

    Furthermore you should define ...
    Categories
    Tutorial
  11. The principle of JMeter

    by , 04-27-2012 at 07:22 PM
    The principle of JMeter is very simple. If you want to test e.g. a SOAP interface layer, all you basically need is the URL and SOAP request. Starting with that you can build your test plan. And this can be as fancy as you want. Using variables, counters, parameters, CSV files, loops, logs, etc. There are almost no limits in designing your test and making it as maintainable as possible.

    Name:  1.jpg
Views: 1928
Size:  27.2 KB
    The principle of JMeter
  12. JMeter Installation

    by , 04-27-2012 at 07:21 PM
    The installation of JMeter (if you would call it an installation) is pretty straight forward. On the website is a link to the download area of stable versions. You also have the possibility to use nightly builds, but this is at your own risk. No guarantee that they work properly. So the advice is always to start with a stable version.

    Download the latest version (zip or tgz) and unpack the archive to a local folder. Before starting JMeter it is wise to have a look at the configuration. ...
    Categories
    Tutorial
  13. Apache JMeter Features

    by , 04-27-2012 at 07:20 PM
    Apache JMeter features include:
    • Can load and performance test many different server types:
    o Web - HTTP, HTTPS
    o SOAP
    o Database via JDBC
    o LDAP
    o JMS
    o Mail - POP3(S) and IMAP(S)
    • Complete portability and 100% Java purity .
    • Full multithreading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.
    • Careful GUI design allows faster operation ...
    Categories
    Tutorial
  14. Apache JMeter

    by , 04-27-2012 at 07:19 PM
    The Apache JMeter™ desktop application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions.

    Apache JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more). It can be used to simulate a heavy load on a ...
    Categories
    Tutorial