[Grinder-use] unable to call java class.
Distributed load testing framework - Java, Jython, or Clojure scripts.
Brought to you by:
philipa
|
From: Gopu S. <gsh...@ut...> - 2013-09-24 16:23:25
|
Hi folks,
New to grinder therefore looking help. I am able to run hello world
mavenizing grinder.
Now I want to move forward and call a java class. Here is the status:
net.grinder.scriptengine.jython.JythonScriptExecutionException:
ImportError: no module named gov
File ".\target\test\config\hello.py", line 3, in ?
2013-09-24 09:48:24,872 INFO agent: finished
*her is my jython script:*
from net.grinder.script.Grinder import grinder
from net.grinder.script import Test
from gov.utah.grinder import GrinderTest
# defining a simple "hello world" function, in order to have something to
test
def hello_world():
thread = grinder.getThreadNumber()
print '> worker thread %d: hello world!' % thread
class TestRunner:
def __init__(self):
# creating a Grinder test object
#test = Test(1, "saying hello")
test = GrinderTest().readCSV
# creating a proxy, by wrapping the hello world function with our
Test-object
self.wrapped_hello = test.wrap(hello_world)
def __call__(self):
# calling "hello world" through the wrapped function
self.wrapped_hello()
|