Summary: | JavaSampler silently resets classname if class can not be found | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Rainer Jung <rainer.jung> |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | p.mouawad |
Priority: | P2 | ||
Version: | Nightly (Please specify date) | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Rainer Jung
2013-10-13 15:59:18 UTC
I think the problem happens in JavaConfigGui: 223 public void configure(TestElement config) { 224 super.configure(config); 225 226 argsPanel.configure((Arguments) config.getProperty(JavaSampler.ARGUMENTS).getObjectValue()); 227 228 classnameCombo.setSelectedItem(config.getPropertyAsString(JavaSampler.CLASSNAME)); 229 } Since the combo box is not editable, the setSelectedItem() call for a claqss name that wasn't found during load will not change the selected value which by default simply is the first enty in the values list of the combo box. Date: Mon Oct 14 21:50:26 2013 New Revision: 1532114 URL: http://svn.apache.org/r1532114 Log: Bug 55652 - JavaSampler silently resets classname if class can not be found Add as a minimum an error log Bugzilla Id: 55652 Modified: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java We could also add an empty item in combo and default to it when not found (In reply to Philippe Mouawad from comment #3) > We could also add an empty item in combo and default to it when not found I think it would be better to show the desired classname, even if it is not present. Otherwise testplans will potentially be changed if they are run from an environment where the class is missing. However this might be tricky to implement whilst still allowing selection of available classes. Ideally if the class name is specified in the test plan, it should be shown in the drop-down regardless of whether it exists or not. Maybe the entry could be shown in a different colour if it is missing? The rest of the drop-down would be populated as normal. We'll have to see how that affects behaviour if the selection is changed as this will depend on when the stored value is updated. If it proves too difficult to implement without being confusing, I agree that using an empty item - or possibly a special 'Missing' item? - would be better than changing to another class name. Author: pmouawad Date: Tue Jan 24 22:18:10 2017 New Revision: 1780121 URL: http://svn.apache.org/viewvc?rev=1780121&view=rev Log: Bug 55652 - JavaSampler silently resets classname if class can not be found Bugzilla Id: 55652 Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java jmeter/trunk/xdocs/changes.xml Reopening due to regression: When Element is added parameters are not set Author: pmouawad Date: Tue Feb 7 21:33:49 2017 New Revision: 1782083 URL: http://svn.apache.org/viewvc?rev=1782083&view=rev Log: Bug 55652 - JavaSampler silently resets classname if class can not be found Fix regression: When Element is added parameters are not set and improve warning Bugzilla Id: 55652 Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3252 |