You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by ja...@apache.org on 2004/03/11 16:28:38 UTC

[Apache JMeter Wiki] Updated: JMeterFAQ

   Date: 2004-03-10T16:15:56
   Editor: 80.176.146.62 <>
   Wiki: Apache JMeter Wiki
   Page: JMeterFAQ
   URL: http://wiki.apache.org/jakarta-jmeter/JMeterFAQ

   Added index

Change Log:

------------------------------------------------------------------------------
@@ -1,8 +1,7 @@
-'''Navigation trail:''' ["JMeterProjectPages"]
-----
 '''The JMeter FAQ'''
+[[TableOfContents]]
 
-'''Question:''' ''How to do remote testing the 'proper way'?''
+== How to do remote testing the 'proper way'? ==
 
 '''Answer:''' Here are a few notes to help you on your way.
 
@@ -17,30 +16,24 @@
 
 -- ScottEade 2003-01-21
 
-----
-
-'''Question:''' ''How to run JMeter test plan programatically, such as from an Ant script?''
+== How to run JMeter test plan programatically, such as from an Ant script? ==
 
 '''Answer:''' Quick answer, go here: http://www.programmerplanet.org/ant-jmeter/. I have permission from the author of this ant task to add it to JMeter's distribution, which I will do as soon as I have the time.["It should now be in the extras folder"].
 
-----
 
-'''Question:''' ''How can I do stress testing of EJBs?''
+== How can I do stress testing of EJBs? ==
 
 '''Answer:''' You can use the JavaSampler classes to write your own class that runs your EJB's, and then JMeter will take over the threading and reporting.  This, however, is not ideal.  Someone needs to write a good EJB Sampler implementation for JMeter (hint, hint).
 
-----
 
-'''Question:''' 
-''Why do HTTP 3xx redirects appear as errors ? Is there a way to make them appear as HTTP 200 OK''
+== Why do HTTP 3xx redirects appear as errors ? Is there a way to make them appear as HTTP 200 OK ==
 
 '''Answer:''' Quick answer: They appear as an error because 302 != 200, at least in v 1.8.1.
 
 Long answer: try using v1.9RC1, the code in  [http://cvs.apache.org/viewcvs.cgi/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java?rev=1.40&content-type=text/vnd.viewcvs-markup HTTPSampler] seems to take into account the result code for the redirect instead of the redirect result code.
 
-----
 
-'''Question:''' ''How do I parameterize my JMeter test cases?''
+== How do I parameterize my JMeter test cases? ==
 
 '''Answer:'''
 Parameters can be set at both the Test Plan and Thread Group levels. 
@@ -79,9 +72,7 @@
 
 When you view the results in the View Results Tree, you can see the ${category} value was replaced with the value from the User Parameters.  Each thread will use the category from the User Parameter setting automatically.  If there are more than two threads, they will reuse the values in these settings, so the third thread would use DOGS.
 
-----
-
-'''Question:''' ''How do I make parameters dynamic, reacting to the unique server responses of each test run?''
+== How do I make parameters dynamic, reacting to the unique server responses of each test run? ==
 
 '''Answer:'''
 You can use the Regular Expression Post Processor to extract a value from a response, and then reuse this response in another request.  Looking at the previous question in this FAQ, you could extract the product id from the result and use it in the following request:
@@ -101,9 +92,7 @@
 
 When you view the results in the View Results Tree, you can see the ${product} value was replaced with the value extracted by the regular expression.
 
-----
-
-'''Question:'''''How do I pass parameters into my Test scripts? I want to be able to use the same script to test with different numbers of threads and loops, and I don't want to have to change the script each time.''
+== How do I pass parameters into my Test scripts? I want to be able to use the same script to test with different numbers of threads and loops, and I don't want to have to change the script each time. ==
 
 '''Answer:'''as explained above, you can use functions and variables just about anywhere in the test plan. So if you want to pass in a value a run-time, just use the __property() function, which reads the value of a JMeter property. 
 
@@ -152,9 +141,7 @@
 
 if you omit the value, it defaults to 1
 
-----
-
-'''Question:'''''How do I use external data files to in my Test scripts?''
+== How do I use external data files to in my Test scripts? ==
 
 '''Answer:'''One way to do this is to create a User Parameters Pre-Processor in which you list all the values that you want to read from files. You can then use the variable names later in the script.
 
@@ -183,45 +170,31 @@
 
 N.B. If using such a script in client-server mode, make sure that any data files are copied to the appropriate place on the server host, as the files will be opened by the server process, not the client.
 
-----
-
-'''Question:'''''I'm having difficulty getting JMeter to work with SSL (HTTPS).  What's the problem?''
+== I'm having difficulty getting JMeter to work with SSL (HTTPS).  What's the problem? ==
 
 '''Answer:''' Check out the documentation  [http://jakarta.apache.org/jmeter/usermanual/get-started.html item 2.2.4].  ''[A lot of people struggle with this, either because of private certs or whatever - I'm looking for a page that details common trip-ups and solutions for them. - MikeStover]''
 
-----
-
-'''Question:'''''I'm having difficulty building Jmeter from NetBeans IDE. It is looking for a org.apache.log.Hierarchy, which log util is it looking for? ''
+== I'm having difficulty building Jmeter from NetBeans IDE. It is looking for a org.apache.log.Hierarchy, which log util is it looking for? ==
 
 '''Answer:''' Make sure to mount all of the jars in the lib folder.
 
-----
-
-'''Question:'''''Has anyone out there used JMeter as part of junit testing?  I'd like to think that by using assertions with a custom JUnit listener JMeter could be run in as part of functional testing.  ''
+== Has anyone out there used JMeter as part of junit testing?  I'd like to think that by using assertions with a custom JUnit listener JMeter could be run in as part of functional testing. ==
 
 '''Answer:''' It's a great idea to write some glue between JMeter and JUnit for just this purpose.  It doesn't exist currently, though there is an Ant task for JMeter that you might find useful.
 
-----
-
-'''Question:'''''Can JMeter record HTTPS requests using the recording proxy?''
+== Can JMeter record HTTPS requests using the recording proxy? ==
 
 '''Answer:'''No.  JMeter would never be able to decipher the encrypted requests the browser sends.  SSL Proxies create a tunnel from the browser to the destination server but do not and cannot read the messages.  Check out [http://www.badboy.com.au/ BadBoy] for a possible solution.
 
-----
-
-'''Question:'''''How can I display the response text my assertation runs against?''
+== How can I display the response text my assertation runs against? ==
 
 '''Answer:'''You can display your server's response text in the View Results Tree listener.
 
-----
-
-'''Question:'''''Is there a JMX Schema/DTD available?''
+== Is there a JMX Schema/DTD available? ==
 
 '''Answer:'''No.  Don't plan on having one either at this point.  Changes would be too frequent to realistically keep up with.  
 
-----
-
-'''Question:'''''What happens with redirects when asserting HTTP responses?''
+== What happens with redirects when asserting HTTP responses? ==
 
 '''Answer:'''Assertions aren't smart enough to do the right thing with redirected requests - currently the 302 response would be asserted against.  You can get around this by recording your test plans and leaving "follow redirects" off.
 
@@ -231,9 +204,7 @@
 
 JMeter will then not see the redirects at all.
 
-----
-
-'''Question:'''''I've set the CLASSPATH, but JMeter is not picking up my Jars''
+== I've set the CLASSPATH, but JMeter is not picking up my Jars ==
 
 '''Answer:'''The CLASSPATH variable is ignored when using the -jar flag. For some further information on this, see:[http://java.sun.com/j2se/1.4.1/docs/tooldocs/findingclasses.html#userclass How the Java launcher finds user classes ]
 
@@ -250,9 +221,8 @@
 with
 {{{ org.apache.jmeter.NewDriver }}}
 after adding ["ApacheJMeter"].jar to the classpath
-----
 
-'''Question:'''''What Pattern matching (regexen) does JMeter support?''
+== What Pattern matching (regexen) does JMeter support? ==
 
 '''Answer:'''JMeter includes the pattern matching software [http://jakarta.apache.org/oro/ Apache Jakarta ORO]. There is some documentation for this on the Jakarta web-site. There is also documentation on an older incarnation of the product at [http://www.savarese.org/oro/docs/OROMatcher/index.html OROMatcher User's guide], which might prove useful. The pattern matching is very similar to the pattern matching in Perl. A full installation of Perl will include plenty of documentation on regular expressions - look for perlrequick, perlretut, perlre, perlreref. O'Reilly sell a book called "Mastering Regular Expressions" by Jeffrey Friedl which will tell you all you need to know (and a lot more) about regular expressions. There are a couple of chapters available on their web-site covering REs in Java and .NET, and the Java chapter has a [http://www.oreilly.com/catalog/regex2/chapter/ch08.pdf section on ORO (PDF)] - worth a look.
 

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org