Bug 54896 - JUnit sampler gives only “failed to create an instance of the class” message with constructor problems
JUnit sampler gives only “failed to create an instance of the class” message ...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.9
All All
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-04-26 16:20 UTC by Raymond Georg Snatzke
Modified: 2013-05-12 14:10 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raymond Georg Snatzke 2013-04-26 16:20:02 UTC
JMeter seems to expect a lot of the constructors of the JUnit test class, e.g. the standard constructor, a constructor with just a String argument and all libraries that are used within the constructor (e.g. someone uses jlog inside the constructor, the jlog-library has to be provided).

While all these requirements are reasonable, the error message is not. In all those cases the only message is “failed to create an instance of the class”, which gives no hint or help what is wrong or missing. If an error occurrs in the Java code outside of the constructor, the messages are very expressive, so it would be nice to get the same detail also with problems that occur in the constructor of the JUnit test class.
Comment 1 Philippe Mouawad 2013-04-28 13:56:30 UTC
Date: Sun Apr 28 13:55:43 2013
New Revision: 1476768

URL: http://svn.apache.org/r1476768
Log:
Bug 54896 - JUnit sampler gives only “failed to create an instance of the class” message with constructor problems
Bugzilla Id: 54896

Modified:
    jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 Philippe Mouawad 2013-04-28 14:35:19 UTC
We clarified failure.
Feel free to download nightly build and give us some feedback.