About Overview Download Releases Download Nightly Tarball Changes Known Bugs License TODO Contributors Documentation User Manual Developer Manual JMeter Wiki Community Get Involved Mailing Lists CVS Repositories |
Assertions
Assertions allow the ability to assert facts about responses received from the server being tested. Using an assertion, you can essentially "test" your 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. Assertions can be added to any controller in a test plan (simply right-click on the controller and add an assertion). As always, these assertions will be attached to any test samples that "pass through" that controller. The assertion control panel let's you add strings to be tested. These strings can be regular expressions. You can also choose whether the strings will be expected to match the entire response, or if the response is only expected to contain the strings. You can attach multiple assertions to any controller for additionaly flexibility.
Assertion Listener
The assertion listener provides a very simple report about the test results. It displays the URL of each test sample as it is returned, and, if the test failed one or more assertions, those failures are reported under the sample URL. If the test succeeded, only the sampled URL is shown. It's very simplistic currently - but this listener is useful for watching what URL's JMeter is sampling. In the future, more powerful assertion listeners will be developed.
Example test tree
Copyright © 1999-2001, Apache Software Foundation