alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

JMeter example source code file (build-adv-web-test-plan.xml)

This example JMeter source code file (build-adv-web-test-plan.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - JMeter tags/keywords

building, figure, http, http, id, license, license, manager, plan, test, test, url, url, web

The JMeter build-adv-web-test-plan.xml source code

<?xml version="1.0"?>
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
 
       http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->

<!DOCTYPE document[
<!ENTITY sect-num '6'>
]>

<document prev="build-web-test-plan.html" next="build-db-test-plan.html" date="$Date: 2009-06-13 11:30:38 +0100 (Sat, 13 Jun 2009) $">

<properties>
  <title>User's Manual: Building an Advanced Web Test Plan
</properties>

<body>

<section name="§-num;. Building an Advanced Web Test Plan" anchor="building">
<p>In this section, you will learn how to create advanced
<a href="build-test-plan.html">Test Plans to test a Web site.

<p>For an example of a basic Test Plan, see <a href="build-web-test-plan.html">Building a Web Test Plan.

<section name="§-num;.1 Handling User Sessions With URL Rewriting" anchor="session_url_rewriting"> <p>If your web application uses URL rewriting rather than cookies to save session information, then you'll need to do a bit of extra work to test your site.</p> <p>To respond correctly to URL rewriting, JMeter needs to parse the HTML received from the server and retrieve the unique session ID. Use the appropriate <complink name="HTTP URL Re-writing Modifier"/> to accomplish this. Simply enter the name of your session ID parameter into the modifier, and it will find it and add it to each request. If the request already has a value, it will be replaced. If "Cache Session Id?" is checked, then the last found session id will be saved, and will be used if the previous HTTP sample does not contain a session id. </p> <example title="URL Rewriting Example" anchor="url_rewriting_example"> <p>Download this example. In Figure 1 is shown a test plan using URL rewriting. Note that the URL Re-writing modifier is added to the SimpleController, thus assuring that it will only affect requests under that SimpleController.</p> <figure image="url_rewrite_example_a.png">Figure 1 - Test Tree <p>In Figure 2, we see the URL Re-writing modifier GUI, which just has a field for the user to specify the name of the session ID parameter. There is also a checkbox for indicating that the session ID should be part of the path (separated by a ";"), rather than a request parameter</p> <figure image="url_rewrite_example_b.png">Figure 2 - Request parameters </example> </section> <section name="§-num;.2 Using a Header Manager" anchor="header_manager"> <p>The lets you customize what information JMeter sends in the HTTP request header. This header includes properties like "User-Agent", "Pragma", "Referer", etc.</p> <p>The , like the , should probably be added at the Thread Group level, unless for some reason you wish to specify different headers for the different <complink name="HTTP Request"/> objects in your test.</p> </section> </body> </document>

Other JMeter examples (source code examples)

Here is a short list of links related to this JMeter build-adv-web-test-plan.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.