My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Usage  
GrinderStone usage for Grinder scripts development, run and debug in Eclipse.
Featured, Phase-Deploy
Updated May 28, 2010 by borislav.andruschuk

Run and Debug Grinder Scripts

To Run or Debug scripts you should:

  • use Run As / Debug As > Grinder Run from Eclipse menu
  • right click on necessary file > Run As / Debug As > Grinder Run

GrinderStone will search grinder.properties file in root of your project and use it as default grinder configuration file for all running configurations in project. If grinder.properties is not found you have to locate it manually using displayed dialog:

For debugging Grinder scripts set breakpoint on necessary line and start debugging as Debug As > Grinder Run. The script execution will stop on this line and you can perform step by step debugging as usual:

It can be useful to evaluate some expressions during debug Grinder scripts. Just select necessary text in script > right click > Watch:

Project References

GrinderStone resolve referenced Java projects from Jython projects, i.e. you can use separate Java project to develop Java classes which will be used in Grinder script:

  1. create Java Project in Eclipse: File > New > Java Project
  2. open Jython project Properties > Project References
  3. check created Java project

All referenced projects with its dependencies will be automatically added to classpath during Grinder script Run.

Deprecated Usage Requirements

  • You should not add the following code to the end of script file which contains TestRunner class now:
  •  if __name__ == '__main__': 
        TestRunner().__call__() 
This code can stay but it will not be executed neither in Eclipse by GrinderStone nor in standard running mode by Grinder. GrinderStone use other method to call TestRunner in Debug mode now and do it explicitly for user.

  • The requiremet to indicate all classes and functions which are used in main module in imports over commas without '*' usage is not necessary (this requirement was only for main module script). Debugger can work with imports used '*' in declarations now.

NOTE:

It is not necessary to enumerate all usages in imports without '*' but It is a good practice (i.e. you can but you shouldn't).

Related links

  1. Installation
  2. ProjectSetup

Sign in to add a comment
Powered by Google Project Hosting