jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Laverge" <>
Subject Second try on 'AbstractJavaSamplerClient' how-to
Date Fri, 26 Nov 2004 14:22:45 GMT

		 After reading on JMeter I whanted to create a custom 'Java Request' to 
show to my co-worker how we could Load test our JMS application with this 
product. I simply cannot get my AbstractJavaSamplerClient class to show up 
into the 'Java Request' combo-box.
		 My class is in Jar under the /lib/ext folder (like in the User doc). What 
else should I do to get this thing working ? Any issues with the Classloader 
? Do I have to edit a .jmx file ?

After some research, it looks like I am not the only one with this problem :

Thank you for your Help.

//---------My  Sample Java Request

public class HvSampler extends AbstractJavaSamplerClient

        static private Arguments _arguments;
                _arguments = new Arguments();

        public Arguments getDefaultParameters()
                return _arguments;
        public void setupTest(JavaSamplerContext context)
                System.out.println("inside setUp");


        public SampleResult runTest(JavaSamplerContext context)
                System.out.println("inside runTest");
                catch (InterruptedException e){ e.printStackTrace();}
                return getSampleResult();

        public void teardownTest(JavaSamplerContext context)
                System.out.println("inside teadDown");
        private SampleResult getSampleResult()
                SampleResult r = new SampleResult();
                return r;
        private void printContext(JavaSamplerContext ctx)
                Iterator iterator = ctx.getParameterNamesIterator();
                System.out.println("SamplerContext :");
                while (iterator.hasNext())
                        String  name= (String);
                        String value = ctx.getParameter(name);
                        System.out.println(name+ "=" + value);

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message