I followed instructions to set up grinderstone:
Also under windows-preferences, I set show whitespace characters to true.
Next I create a python project. I added grinder.jar and grinder-agent.jar to the external libraries of the project build path. Now I can add my first grinder file under src/HelloGrinder.py:
Next I need to add a grinder.properties to the directory as well:
Logs will appear under src. You will need to click refresh (F5) on you project before they get visible ..
Output looks like:
- eclipse 3.5.2
- pydev from update site
- grinderstone from update site
- jython 2.5.1 installed
- grinder 3.4 installed
Also under windows-preferences, I set show whitespace characters to true.
Next I create a python project. I added grinder.jar and grinder-agent.jar to the external libraries of the project build path. Now I can add my first grinder file under src/HelloGrinder.py:
from net.grinder.script.Grinder import grinder
# An instance of this class is created for every thread.
class TestRunner:
# This method is called for every run.
def __call__(self):
# Per thread scripting goes here.
grinder.getLogger().output("Hello World")
Next I need to add a grinder.properties to the directory as well:
grinder.processes = 1I can now select my HelloGrinder.py file, and with right mouse button select: Run As - Grinder Run.
grinder.threads = 1
grinder.runs = 1
grinder.useConsole = false
grinder.logDirectory = logs
grinder.numberOfOldLogs = 0
grinder.initialSleepTime=50
Logs will appear under src. You will need to click refresh (F5) on you project before they get visible ..
Output looks like:
02.06.10 16:27:18 (process emeafralp560-0): The Grinder version 3.4
02.06.10 16:27:18 (process emeafralp560-0): Java(TM) 2 Runtime Environment, Standard Edition 1.5.0_06-b05: Java HotSpot(TM) Client VM (1.5.0_06-b05, mixed mode) on Windows XP x86 5.1
02.06.10 16:27:18 (process emeafralp560-0): time zone is CEST (+0200)
02.06.10 16:27:20 (process emeafralp560-0): worker process 0
02.06.10 16:27:20 (process emeafralp560-0): Java VM does not support instrumentation, DCR unavailable
02.06.10 16:27:20 (process emeafralp560-0): instrumentation agents: NO INSTRUMENTER COULD BE LOADED
02.06.10 16:27:20 (process emeafralp560-0): executing "C:\Dokumente und Einstellungen\jan.kester\workspace\Grinder1\src\HelloGrinder.py" using Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)]
02.06.10 16:27:20 (process emeafralp560-0): starting threads
02.06.10 16:27:20 (thread 0): starting, will do 1 run
02.06.10 16:27:20 (process emeafralp560-0): start time is 1275488840962 ms since Epoch
02.06.10 16:27:20 (thread 0): sleeping for 38 ms
02.06.10 16:27:20 (thread 0 run 0): Hello World
02.06.10 16:27:20 (thread 0): finished 1 run
02.06.10 16:27:20 (process emeafralp560-0): elapsed time is 58 ms
02.06.10 16:27:20 (process emeafralp560-0): Final statistics for this process:
Tests Errors Mean Test Test Time TPS
Time (ms) Standard
Deviation
(ms)
Totals 0 0 ? 0,00 ?
Tests resulting in error only contribute to the Errors column.
Statistics for individual tests can be found in the data file, including
(possibly incomplete) statistics for erroneous tests. Composite tests
are marked with () and not included in the totals.
02.06.10 16:27:20 (process emeafralp560-0): finished
Comments