Summary: | Module controller does not work in non-GUI mode | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Sebb <sebb> |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED LATER | ||
Severity: | normal | ||
Priority: | P1 | ||
Version: | 2.1.1 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | other | ||
Attachments: |
Correction
Correction patch for R2.3 |
Description
Sebb
2006-02-16 21:59:10 UTC
It seems that the ReplaceableController interface special handling is done only in the AbstractAction class - which is currently only called in GUI mode. so it sounds like we need a general solution that will work for both module and include controller peter The issue only applies to the Module Controller. Include Controller are correclty resolved resolved in non GUI mode. Has someone started to work on this issue? Created attachment 18880 [details]
Correction
This patch fixes the problem by adding a method to ReplaceableController to
help resolving the replacement subtree. Resolution takes an generic Object,
which is used by ModuleController to search for the selected test element.
Initially this resolution was kind of hacky since it looked for the root node
in the GuiPackage. This works fine in GUI mode but as mentionned in your
comments is not suitable in non GUI. In this mode, resolution is performed just
after load the TestPlan in the JMeter class.
The conversion of Test node has also been refactored in the JMeter class.
Created attachment 20749 [details]
Correction patch for R2.3
i made a new patch against release 2.3 by using your patch, as we need that for
our application. this patch may be easily applied to release 2.3 (and is only
15 kb and not 73 kb).
Excellent - thanks very much. The patch (20749) works fine. I've applied it with a minor tweak - convertSubTree() is no longer needed in AbstractAction. SVN updates: r571515 r571519 r571520 Also r571514 - update to test code to demonstrate bug. I found a problem with the code when running non-GUI on a box without a real display. Setting java.awt.headless=true fixed it, but this is not a full solution. The cause of the problem is in JMeterTreeModel, which creates various Gui objects. This is needed by ReplaceableController.resolveReplacementSubTree(). Changing the tree resolver to use the testPlan HashTree rather than JMeterTreeNode looked rather difficult, so I added a hack to create a TreeModel that does not use any GUI items. This should probably be tidied up at some point... This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1684 |