DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41446>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41446 Summary: JUnit - protected setUp() method not called Product: JMeter Version: 2.2.1 Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Main AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] Several JUnit tutorials (inclusive the sample at http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html) 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 - jmeter.protocol.java.sampler.JUnitSampler: unittest.UnitTestClientImpl.setUp() 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. At least the tutorial should warn against protected setUp() methods. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
