You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
juno.yoon edited this page May 22, 2016
·
2 revisions
Jython and Groovy
Some guy may want to use java libraries or python py modules in the scripts. For this case, nGrinder supports upload of these files and a user can use external libraries without any system configuration. Just upload the jar or py files in the lib folder on the same location of the test script file. The files in the lib folder will be automatically passed to agents and be located in the agent classpath when the test is executed.
Then You can just refer the uploaded jar or py like followings..
fromnet.grinder.scriptimportTestfromnet.grinder.script.Grinderimportgrinderfromorg.json.simpleimportJSONValuefromjava.utilimportRandomfromjava.langimportString# This library is located in the lib folder.frommpcCallerimportNpcCallerrandom=Random()Zcaller=NpcCaller("xx.xx.xx.15", 7090);
module="tchat"procedure="chatBO/RelayCommand"…
Groovy Maven Project
If you're using Groovy Maven Project you can easily add the external libraries in the pom.xml. Please refer [Groovy Maven Structure]