Re: grinder failed to run jmssender.py (No module named weblogic)
Bill Yang <byang-5/qsY7LH4EwKCrqWeS0s09JR4SXAr38/@public.gmane.org> Wed, 25 Mar 2015 16:03:17 +0000
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <DM2PR08MB528541A854680574FC27EA9D40B0@DM2PR08MB528.namprd08.prod.outlook.com> |
Hi Philip,
Thanks for your information regarding my issue. Meanwhile, I started to test my java project for load testing, I am wondering if there is any sort of examples using a java code which can be through a bridge script. Actually I am not really using Python programming prior. But I found there is only demo on the Internet https://gist.github.com/kvalle/1622421 as below;
========================================================
public class MyTestRunner {
private HTTPRequest test;
public JavaTestRunner(HTTPRequest req) throws NotWrappableTypeException {
this.test = (HTTPRequest) new Test(100, "http test").wrap(req);
}
public void call() throws Exception {
this.test.GET("http://google.com");
this.test.GET("http://nytimes.com");
}}
==============================================================
java_test_runner = my.java.package.MyTestRunner
grinder.script = grinder.py
grinder.runs = 10
grinder.threads = 2
# etc
=========================================================
from net.grinder.plugin.http import HTTPRequest
from net.grinder.script.Grinder import grinder
def load_class(class_name):
m = __import__(class_name)
for comp in class_name.split('.')[1:]:
m = getattr(m, comp)
return m
test_runner = load_class(grinder.getProperties().getProperty('java_test_runner'))
class TestRunner:
def __init__(self):
self.runner = test_runner(HTTPRequest())
def __call__(self):
self.runner.call()
===================================================================
Unfortunately, my load test has to call my java application, e.g. PerformationLoadTest.jar, instead of calling HTTPRequest. I wonder if you have any suggestion or advance for me to implement with grinder?
Regards,
Bill Yang
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
grinder-use mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/grinder-use
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/