You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Vi...@icw-global.com on 2007/08/09 13:49:47 UTC

JUnit and JMeter

Hallo,
I am relatively new to JMeter. Have started usign it since one week. I 
want to call some jUnit tests from JMeter. I have succeeded in doing that 
but I am having some other problems.
In order to determine what the problem is I want to perform a simple test 
using JMeter. I have written the classic HelloWorld java class as below 
and want to call this from JMeter.

 
public class HelloWorld {

      // Display "Hello World!"
      public static void main(String args[]) {
         System.out.println("Hello World!");
      }
   }

I tried calling this class from JMeter using the sampler Java Request but 
I do not know what exactly the parameters etc are. Is it possible to do 
this and if yes could you kindly let me know how. I am not a java 
programmer and am just using JMeter as a tool to perform some tests.
Warm Regards
Vinay Mathew


Re: JUnit and JMeter

Posted by sebb <se...@gmail.com>.
You cannot call arbitrary Java classes directly from JMeter.

Either use the Junit sampler, or you'll need to implement your own JavaSampler.

Or you can use BeanShell.

On 09/08/07, Vinay.Mathew@icw-global.com <Vi...@icw-global.com> wrote:
> Hallo,
> I am relatively new to JMeter. Have started usign it since one week. I
> want to call some jUnit tests from JMeter. I have succeeded in doing that
> but I am having some other problems.
> In order to determine what the problem is I want to perform a simple test
> using JMeter. I have written the classic HelloWorld java class as below
> and want to call this from JMeter.
>
>
> public class HelloWorld {
>
>      // Display "Hello World!"
>      public static void main(String args[]) {
>         System.out.println("Hello World!");
>      }
>   }
>
> I tried calling this class from JMeter using the sampler Java Request but
> I do not know what exactly the parameters etc are. Is it possible to do
> this and if yes could you kindly let me know how. I am not a java
> programmer and am just using JMeter as a tool to perform some tests.
> Warm Regards
> Vinay Mathew
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org