Sunday, July 5, 2009

The grinder - open source load testing framework

http://grinder.sourceforge.net/g3/tutorial-perks.html

http://www.oreillynet.com/xml/blog/2005/03/load_testing_web_services_with.html

http://grinder.sourceforge.net/g3/tutorial-perks.pdf

http://www.anticlue.net/archives/000395.htm

http://pierrerebours.com/blog/load-testing-using-grinder


The grinder is an open source load testing framework. I went very out of character and utilized the Beta version, grinder 3, because it uses Jython to write scripts. With the grinder 3, you can load test anything; databases, messaging services, web apps, web services, etc. I?m hoping to utilize the grinder 3 to load test Quovadx/Cloverleaf Interface Engine, the Siemens Soarian Clinical Access, Crystal Enterprise 10, 3M?s Encoder, and several other applications.

Installing the Grinder 3

1. First ensure java is installed on the machine where you will be running the scripts. If not, please download from here.
2. Download and unzip the grinder 3 from here.
3. Download the jython2.1 class file.
4. Add the grinder.jar to your CLASSPATH variable.
- Set CLASSPATH=%CLASSPATH%;c:\grinder-3.0-beta23\lib\grinder.jar
5. Install the jython2.1 class file.
- Java jython2-1
Aside: Remember the directory and set it in the grinder.properties file

To get into the Grinder console, run java net.grinder.Console. You can find more about the console here. I'm not very big on the GUI, but it does its job.


Recording Web App test scripts
Hand coding the test scripts would get to be very trying in a very short time. In order to maintain one?s sanity, exploit the TCPProxy httpplugin to record scripts.

1. First, set up IE to temporarily use a proxy server.
- Menu -> Tools -> Internet Options -> Connections tab
- Click on Lan Settings button
- Check the use a proxy server for your lan setting
- Click on Advanced button
- Set the http proxy address to use to be localhost, port 8001
- Set the secure proxy address to use to be localhost, port 8001

2. Fire off the TCPProxy within grinder.
- java net.grinder.TCPProxy ?console ?httpplugin
3. Surf away with the IE session, and you will have all actions recorded.
4. Click Stop Recording on the TCPProxy Window, when you are done.
5. Remove the changes to the IE Browser, unchecking using a proxy server.
6. You will notice within the directory there is a httpscript.py and a httpscript_tests.py file. These are your test scripts.
A quick aside point is that if you don?t want to switch setting, one could always leave ie in the record mode and surf the web with firefox.


Running the test scripts
A key thing to remember when you are running your test scripts, set up multiple grinder sessions on multiple machines. This way everyone isn?t using the same network interface.

1. Set up resource monitoring with performance monitor on the server, and client machine.
2. To run the grinder test scripts;
- In the same directory have a grinder.properties, this file contains the configuration settings
- Also within that directory, have the script you would like to run. For our example, find the httpscript.py and httpscript_tests.py files.
- run java net.grinder.Grinder, from that directory.

1 comment:

jeje said...

Il a écrit adidas zx flux grise noir rose que le joueur pourrait triompher de la course en raison des nike air force jordan exercices physiques assouplissants, mais dans la plupart des air jordan 11 low georgetown retail price cas, le joueur serait en retard simplement parce que les asics gel femme running soldes routines d'échauffement mettent dans la puissance électrique chaussures running homme free 5.0 m noir nike physique. Je suis un grand fan de Nike Jordan air jordan retro 11 homme mais au cours des deux dernières années, j'ai étudié et nike air jordan 6 homme essayé d'autres lignes que Nike fournit. Les deux baskets chaussure nike pas cher france utilisent un caoutchouc solide à chevrons sur la semelle asics femme pas cher extérieure.