2008/4/27 sebb <[EMAIL PROTECTED]>:
> 2008/4/25 Tim Kaltenbrunner <[EMAIL PROTECTED]>:
>
> >
>  >  To set the user.classpath works fine as long as my tests are in a jar 
> file in
>  >  lib/junit.
>
>  No need to set user.classpath if the jar is in lib/junit (or lib)
>
>
>  > But I wrote an extension which should be able to load junit test
>  >  cases from a specified directory ( In our application we have a very big
>  >  workspace and it is very time consuming to jar this every time we want to
>  >  run a performance tests).
>  >  The problem (as far as I can tell) is that the classes in JMeter are 
> loaded
>  >  dynamically via class loader and therefore the class path needs to be set
>  >  before JMeter is started (by the ant task).The user.classpath property is
>  >  added to the java.class.path flag after JMeter started.
>
>  Yes, but that is done at the very start, before the main processing gets 
> going.
>
>
>  > I tried to use my
>  >  own class loader but it didn't work.
>
>  No, it won't; JMeter uses its own classloader.
>
>
>  >  I think it is a very good thing to be able too set the class path of 
> JMeters
>  >  class loader via ant task. Do you have any idea of how to do it or when it
>  >  is possible?
>
>  It is already possible.
>
>  search_paths and user.classpath both work fine for loading additional
>  jars (or even zip files containing classes).
>
>  They also work for classfile directories - however, I've just
>  discovered that the examples in the properties file are wrong ;-)
>
>  In order to use a classfile directory, it seems one must use a
>  trailing /, for example search_paths=/app1/lib/ NOT
>  search_paths=/app1/lib as shown in jmeter.properties.
>

Actually, it looks like the problem was in the way the class directory
entries were handled.

This has been fixed in SVN, and will be in the next version of JMeter.

In the mean-time, class directories need the trailing /.

>  There is another problem which is that the JUnit GUI only looks for
>  jars in the lib/junit directory.

This also needs fixing.

>  So at present to create the test plan the jar has to be in the
>  lib/junit directory.
>  Once the plan has been created it can be run in non-GUI mode with the
>  jar or classes defined as above.
>
>  Or you can create a test plan using the sample JUnit tests, and edit
>  the JMX file and change the names to your class names.
>
>
>
>  >
>  >
>  >
>  >
>  >  sebb-2-2 wrote:
>  >  >
>  >  > 2008/4/21 Tim Kaltenbrunner <[EMAIL PROTECTED]>:
>  >  >>
>  >  >>  Hi,
>  >  >>  I'm using ant-jmeter-1.0.9.jar to start JMeter tests via ant task. My
>  >  >>  problem is, that my tests need further jars which I need to define in
>  >  >> the
>  >  >>  classpath.
>  >  >>  The tests I like to run are using a JUnit Request sampler. I managed 
> to
>  >  >> run
>  >  >>  the tests from the GUI by editing the jmeter.bat (by adding the "-cp
>  >  >> ..." to
>  >  >>  the set ARGS=... line).
>  >  >>  I already tried to set the classpath in my antscipt by using <jvmarg
>  >  >>  value="-cp ..."/>. I also tried to set the search_paths flag in
>  >  >>  user.properties and the user.classpath flag in jmeter.properties.
>  >  >>  Is there another way to set the classpath?
>  >  >>
>  >  >
>  >  > Yes, on the Test Plan.
>  >  >
>  >  > However, some of the above methods should have worked...
>  >  >
>  >  > Try running a GUI test using user.classpath in jmeter.properties.
>  >  > Then run this non-GUI as a double-check.
>  >  >
>  >  > That should then work with Ant.
>  >  >
>  >  >
>  >  >>  --
>  >  >>  View this message in context:
>  >  >> 
> http://www.nabble.com/Set-Classpath-for-Ant-task-tp16806113p16806113.html
>  >  >>  Sent from the JMeter - User mailing list archive at Nabble.com.
>  >  >>
>  >  >>
>  >  >>  ---------------------------------------------------------------------
>  >  >>  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]
>  >  >
>  >  >
>  >  >
>  >
>  >  --
>  >  View this message in context: 
> http://www.nabble.com/Set-Classpath-for-Ant-task-tp16806113p16892836.html
>  >
>  >
>  > Sent from the JMeter - User mailing list archive at Nabble.com.
>  >
>  >
>  >  ---------------------------------------------------------------------
>  >  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]

Reply via email to