1 / 15

The Grinder

The Grinder. A load-testing framework. 30.11.2006 - Daniel Maier. Table of Contents. What is the Grinder? How does the Grinder work? Where to get the Grinder? How to start the Grinder? The TCPProxy Examples. What is the Grinder?. The Grinder is a Java load-testing framework

landonn
Download Presentation

The Grinder

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Grinder A load-testing framework 30.11.2006 - Daniel Maier

  2. Table of Contents • What is the Grinder? • How does the Grinder work? • Where to get the Grinder? • How to start the Grinder? • The TCPProxy • Examples

  3. What is the Grinder? • The Grinder is a Java load-testing framework • Tool to coordinate the activities of a test script across many machines • Uses the powerful scripting language Jython (Java implemention of Python )

  4. How does the Grinder work? The Grinder is divided into three parts: • Agent processes: runs on each test-client machine and is responsible for managing the worker processes on that machine • Worker processes: Created by The Grinder agent processes, they are responsible for performing the tests • The console: Coordinates the other processes and collates statistics

  5. How does the Grinder work?

  6. Where to get the Grinder? Official Project Page: http://grinder.sourceforge.net Newest version is The Grinder 3 (beta version)

  7. How to start the Grinder ? • Create a grinder.properties file on each test machine • Set your CLASSPATH to include the grinder.jar file which can be found in the lib directory on each test machine • Start the console on one test machine: java net.grinder.Console

  8. How to start the Grinder ? • Start an agent processs on each test machine: java net.grinder.Grinder • Start the agent processes by using the console

  9. The TCPProxy • The TCPProxy is a proxy process that you can place in a TCP stream between your browser and a server • The TCPProxy's main purpose is to automatically generate HTTP test scripts

  10. The TCPProxy How to use the TCPProxy : • java net.grinder.TCPProxy -console -http > grinder.py • Where grinder.py is the output script file

  11. The TCPProxy How to use the TCPProxy : • Setting up the proxy localhost:8001 in your browser • Do the things you want to record and click stop in the console

  12. Examples: grinder.properties grinder.processes=5 grinder.threads=100 grinder.runs=1 grinder.logDirectory=log grinder.numberOfOldLogs=0 grinder.script=test1.py

  13. Examples: Test Script # This example shows how many HTTP interactions can be grouped as a # single test by wrapping them in a function. from net.grinder.script.Grinder import grinder from net.grinder.script import Test from net.grinder.plugin.http import HTTPRequest from HTTPClient import NVPair # We declare a default URL for the HTTPRequest. request = HTTPRequest(url = "http://localhost:9998") def page1(): request.GET('/addcontact.php') request.GET('/index.html') request.GET('/aufgabe4.html') page1Test = Test(1, "First page").wrap(page1) class TestRunner: def __call__(self): page1Test()

  14. Examples: Results

  15. Examples: Results

More Related