You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jürgen Weber <jw...@jwi.de> on 2007/04/13 12:48:31 UTC

JUnit & Connection setup

Hi,

I want to run a JUnit-Test from Jmeter. During the test setup() should 
be called exactly once (to open a Corba connection), then the individual 
tests should be all run and then the connection be closed.

The JUnit way to do this is use TestSetup 
(http://junit.sourceforge.net/javadoc/junit/extensions/TestSetup.html) 
to wrap the actual test.

Unfortunately, JMeter does not cope with TestSetup as it assumes that 
the given unittest class is the test to run (Jmeter gets the test with 
the code cited below).

Has anybody ever gotten to run a Unittest scenario like I described?

Thanks,
Juergen

public Method getMethod(Object clazz, String method){
        if (clazz != null && method != null){
            // log.info("class " + clazz.getClass().getName() +
            //        " method name is " + method);
            try {
                return clazz.getClass().getMethod(method,new Class[0]);
            } catch (NoSuchMethodException e) {

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