thanks for checking that. I will update the docs tonight.
again, sorry about that. I just assumed people would make setUp/tearDown
public. it never occurred to me people might make it protected or private
peter
1/23/07, J Weber <jw (AT) jwi (DOT) dewrote:
Actually, the tutorial
()
does not mention that setUp() has to be public.
K, I entered
Debugging was actually a bit difficult as I could not simply run jmeter
as part of my Eclipse project as jmeter does some magic loading its
classes so I had to remote debug.
But never mind, I learned something ;-)
Thanks for a great tool,
J
Peter Lin wrote:
the tutorial on the JUnit sampler states the setup and teardown method
need
to be public. please open a bugzilla to enhance the user manual.
sorry you had to waste time debugging your test. it's generally better
to
make the setup, teardown, onetimesetup and onetimeteardown public
methods.
peter
1/23/07, J Weber <jw (AT) jwi (DOT) dewrote:
>>
>Hi,
>>
>several JUnit tutorials (inclusive the sample at
>)
>show a
>>
>protected void setUp()
>>
>method.
>>
>>
>The JUnitSampler looks for the setUp() method using getMethod() but
this
>finds only __public__ methods. So when you have a protected setUp() in
>your testcase, JUnitSampler will almost silently not call it, there is
>only a harmless log line:
>>
>2007/01/23 13:18:11 WARN -
>()
>>
>try {
>return clazz.getClass().getMethod(method,new Class[0]);
>} catch (NoSuchMethodException e) {
>log.warn(e.getMessage());
>}
>>
>I think it were better if there was a [x] call setUp() and tearDown()
on
>the gui and throw an exception if there is none or not found.
>>
>It cost me quite some time and remote debugging to find out, why my
>setUp() was not called.
>>
>J
>>
>>
>
>To unsubscribe, e-mail: jmeter-user-unsubscribe (AT) jakarta (DOT) apache.org
>For additional commands, e-mail: jmeter-user-help (AT) jakarta (DOT) apache.org
>>
>>
>
>
>
To unsubscribe, e-mail: jmeter-user-unsubscribe (AT) jakarta (DOT) apache.org
For additional commands, e-mail: jmeter-user-help (AT) jakarta (DOT) apache.org
--