Let’s start Performance Test with Grinder in 10 steps


A very quick tutorial about how to start with Grinder 3:

  1. Download and unpack Grinder 3.2
  2. Create a mygrinder directory (wherever you want)
  3. Copy …\grinder-3.2\examples\grinder.properties to mygrinder
  4. Create in mygrinder the batch console.bat: java -cp …\grinder-3.2\lib\grinder.jar net.grinder.Console
  5. Create in mygrinder the batch agent.bat: java -cp …\grinder-3.2\lib\grinder.jar net.grinder.Grinder mygrinder\grinder.properties
  6. Create in mygrinder the batch tcpProxy.bat java -cp …\grinder-3.2\lib\grinder.jar  net.grinder.TCPProxy -console -http [-httpproxy {host} {port}] > script_name.py (-httpproy parameter only if required)
  7. To record a test script set your browser proxy settings to localhost and port 8001, disable cache, execute tcpProxy.bat, while you use the browser the tcpProxy will record the requests-responses flow. If you use a proxy server you have to uncomment the script line “connectionDefaults.setProxyServer(…)”.
  8. Edit grinder.properties and add the line: grinder.jvm.arguments = -Dpython.cachedir=”mygrinder” (for example “C:\\tools\\mygrinder”)
  9. The line grinder.script contains the name of the script which will be executed during the performance test: put a reference to the recorded script_name.py.
  10. Execute console.bat, agent.bat and finally Start the Test!

The Console process is the collector of the performance data and Agents are the executor of the tests. They will send test data to the Console. By default the Console and the Agents communicate on port 6372 of the localhost machine. You can change this values of grinder.consoleHost and grinder.consolePort into grinder.properties.

Advertisements

One Response to “Let’s start Performance Test with Grinder in 10 steps”

  1. Borislav Andruschuk Says:

    The Grinder is the best tool for performance testing. I’ve working on GrinderStone – IDE for Grinder scripts which allows debug scripts using Eclipse and provides some interesting features for development like modularity and pretty useful logging in debug mode. That project you can download from official project site:

    http://code.google.com/p/grinderstone

    we also have Eclipse Update site for simple plugin installation into Eclipse platform. All details you can obtain on our site and support group. Look thru GrinderStone and you’ll like it, it gives you more power to develope Grinder scripts.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: