Can't run Grinder Java Test Framework

旧巷老猫 提交于 2019-12-08 08:38:57

问题


I can't run Grinder3 framework with Jython. I've downloaded it and I see that there are a lib/ folder with some .jar files.

The grinder3 provide some examples (written in python). I receiver an error when I try to run these example with jython, the error tells me that the lib cannot be found.

How should I include those jar to be able to run the examples?

Traceback (most recent call last):
  File "amazon.py", line 18, in <module>
    from net.grinder.script.Grinder import grinder
ImportError: No module named ne

回答1:


You need to include grinder lib dir to CLASSPATH on to your shell. Make sure your environment variable has path added. As a thumb rule make sure GRINDERPATH, GRINDERPROPERTIES, CLASSPATH & JAVA_HOME are set before you start Grinder

I would suggest you to create environment variable file (or even add to startup profile script) with the above mentioned data & add it to shell profile. This will ensure that your path are set correctly

set GRINDERPATH=<em>(full path to grinder installation directory)</em>
set GRINDERPROPERTIES=<em>(full path to grinder.properties)</em>\grinder.properties
set CLASSPATH=%GRINDERPATH%\lib\grinder.jar;%CLASSPATH%
set JAVA_HOME=<em>(full path to java installation directory)</em>
PATH=%JAVA_HOME%\bin;%PATH%

If the setting does not solve it for you, then an you print CLASSPATH using "echo" and verify the presence of your JAR file? Paste it here along with the command that you are using to launch Grinder



来源:https://stackoverflow.com/questions/19148365/cant-run-grinder-java-test-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!