On 28/01/2010, Robert Bowman <[email protected]> wrote: > My client class appears in the dropdown if I copy the jar to jmeter's > lib/ext directory or if I edit jmeter's properties file to include > > source_path=<absolute path of target directory>
Huh? JMeter does not use that property, it is "search_paths" > Either approach solves the immediate problem but neither solution scales > well. Huh? How is the Test Plan approach better in this regard? You can provide the path on the command-line: jmeter -Jsearch_paths=<path to jar> etc. You can provide > Unfortunately, it seems that the classpath defined in the TestPlan > configuration form is ignored by the Java Request sampler. I think the problem is that the list of classes is generated before the Test Plan classpath is processed. > Thanks for your assistance, > > > Bob Bowman > > > > > > From: sebb <[email protected]> > To: JMeter Users List <[email protected]> > > Date: 01/28/2010 12:58 PM > > Subject: Re: Custom Java sampler not visible > > > > On 28/01/2010, Robert Bowman <[email protected]> wrote: > > As I said in my initial query, I am adding my jar to the classpath using > > the Test Plan configuration form. There is a component at the bottom > of > > the form labelled "Add directory or jar to classpath". If the > classpath > > is ignored, what is the purpose of this component? > > Sorry, overlooked that. > > That should work, so there must be some other issue here. > > > The documentation of the Java Request sampler states: "This sampler > lets > > you control a java class that implements the JavaSamplerClient > interface. > > ... > > The pull-down menu provides the list of all such implementations found > by > > JMeter in its classpath." If this is accurate, how to I get my class > > into the classpath used by JMeter? > > Have you tried the other methods in the document I referenced? > > > > > Thanks, > > > > Bob Bowman > > > > > > > > From: sebb <[email protected]> > > To: JMeter Users List <[email protected]> > > > > Date: 01/28/2010 11:53 AM > > > > Subject: Re: Custom Java sampler not visible > > > > > > > > On 28/01/2010, Robert Bowman <[email protected]> wrote: > > > The jar is in the target directory of my Netbeans project. Compiled > > > classes are in target/classes. > > > > > > I have tried adding the following to the classpath: > > > > Classpaths are ignored when running an application using -jar. > > > > > 1. The absolute path of the jar. > > > 2 The absolute path of the target directory. > > > 3. The absolute path of the target/classes directory. > > > > > > If there is an alternative that I should be using please let me > know. > > > > See: > > > > http://jakarta.apache.org/jmeter/usermanual/get-started.html#classpath > > > > > Thanks, > > > > > > Bob Bowman > > > > > > > > > > > > > > > > > > From: sebb <[email protected]> > > > To: JMeter Users List <[email protected]> > > > Date: 01/28/2010 11:39 AM > > > Subject: Re: Custom Java sampler not visible > > > > > > > > > > > > > > > On 28/01/2010, Robert Bowman <[email protected]> wrote: > > > > I am trying to use JMeter to test the performance of a Java class. > I > > > have > > > > developed a test client that implements JavaSamplerClient by > > extending > > > > AbstractJavaSamplerClient. and implementing the runTest method. I > > have > > > > compiled my client class and built a jar containing it. > > > > > > And where did you put the jar? > > > > > > > In the JMeter test plan editor I go to the 'TestPlan' > configuration > > > form > > > > and add the jar containing my client class to the classpath. I > then > > > > attempt to add a Java Request sampler to my test plan. The > > > configuration > > > > form for the Java Request sampler has a drop-down for selecting > the > > > > classname. The dropdown has only two entries, > > > > org.apache.jmeter.protocol.java.test.JavaTest and > > > > org.apache.jmeter.protocol.java.test.SleepTest. The name of my > > client > > > > class does not appear and there is nowhere to enter an > alternative > > > > classname. > > > > > > > > I have tried various ways of adding my client class to the class > > path > > > but > > > > none of them results in my class appearing in the dropdown. Is > this > > a > > > bug > > > > or a feature? Is there a workaround? Or is there a better way > of > > > using > > > > JMeter to test the performance of a Java class that I have > > overlooked? > > > > > > What ways did you try? > > > > > > > Thanks in anticipation, > > > > > > > > Bob Bowman > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > [email protected] > > > > For additional commands, e-mail: > [email protected] > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [email protected] > > > For additional commands, e-mail: [email protected] > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [email protected] > > > For additional commands, e-mail: [email protected] > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

