110 likes | 516 Views
GrinderStone – Eclipse plug-in for development Grinder scripts. GrinderStone is covered by Eclipse Public License. GrinderStone dependencies. GrinderStone is based on PyDev OSS Eclipse plug-in for development of Python scripts. GrinderStone uses PyDev API (scripts and java classes).
E N D
GrinderStone – Eclipse plug-in for development Grinder scripts GrinderStone is covered by Eclipse Public License
GrinderStone dependencies • GrinderStone is based on PyDev OSS Eclipse plug-in for development of Python scripts. GrinderStone uses PyDev API (scripts and java classes). • Eclipse SDK 3.2 platform – primary platform for plugins development • Java 5.0 (Sun JDK 1.5.0.04) – generics were used in GrinderStone everywhere • Grinder 3 beta 30 – latest release of Java Load Testing Framework • Jython 2.1 – Java interpreter of Python scripts compatible with Python 2.2 specification
GrinderStone Installation • Download and install Eclipse SDK 3.2 from eclipse.org • Download and install JRE or JDK 1.5 from sun.com • Configure Eclipse launching using JRE 1.5 via command line parameter “-vm” because GrinderStone contains Java 5.0 specific: Example: eclipse.exe -vm D:\Java.work\JVM\jdk1.5.0_05\jre\bin\javaw (in start.bat file in Eclipse root folder) • Download latest version of binaries of GrinderStone from GrinderStone repository • Install GrinderStone plug-in to Eclipse: It is necessary simply to copy content of features and plugins folders from GrinderStone archive to features and plugins folders in your Eclipse directory accordingly • GrinderStone is ready to be used
Jython interpreter configuration • Open Eclipse • Configure Jython interpreter: Window -> Preferences -> PyDev -> Iterpreter-Jython -> New and choose jython.jar. When Selection Needed window is appeared choose folder where jython is located and Lib folder also from jython’s folder. After that click ‘Apply’. PyDev process all libraries and create an interpreter info for running scripts • Close Eclipse preferences window
Project creation • Switch to PyDev perspective • Create PyDev project (choose project type - jython 2.1)
Grinder configuration • Open project properties • Add grinder.jar to PYTHONPATH as external jar • Note that grinder.properties file should be placed in the root of your project directory (grinder.logDirectory parameter is calculated relatively Eclipse installation directory if you not specify base directory in run configuration on Arguments tab)
Launching grinder scripts using GrinderStone • Click on ‘Run…’ option and choose ‘Grinder run’ option in Run window • Fill a Run configuration (It is common configuration, it will be used for debugging also). You can create some configurations for one project • Click Apply and Run
Debugging Grinder scripts using GrinderStone • For debugging you should add the following code to your main module: if __name__ == "__main__": TestRunner().__call__() This code will be executed only in debug mode in IDE. Also your main module should contains only imports declaration w/o ‘*’ • Set breakpoint in place where you want to stop execution • Launch adjusted configuration using ‘Debug’ shortcut
Links • PyDev by Fabio Zadzorny: http://pydev.sourceforge.net • Grinder by Philip Aston: http://grinder.sourceforge.net • Jython by Jim Hugunin: http://www.jython.org • Eclipse community supported by IBM: http://eclipse.org • GrinderStone project site:http://code.google.com/p/grinderstone • GrinderStone support group:http://groups.google.com/group/grinderstone-support