How about existing Gui Http elements is there a quick way to set all of them to use the defaults object?
For instance if I have 100 requests defined already and then I add a defaults object can I allocate these 100 requests to use the defaults object in one step? Is this already done? Jason -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, 4 March 2003 08:21 To: [EMAIL PROTECTED] Subject: cvs commit: jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy ProxyControl.java [Scanned For Viruses] kcassell 2003/03/03 13:50:49 Modified: src/protocol/http/org/apache/jmeter/protocol/http/proxy ProxyControl.java Log: New HTTPSampler elements will now no longer duplicate information from the HttpDefaultsGui object, except for the port number, which is still redundant. Revision Changes Path 1.14 +23 -10 jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy Control.java Index: ProxyControl.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/p roxy/ProxyControl.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- ProxyControl.java 14 Feb 2003 04:17:15 -0000 1.13 +++ ProxyControl.java 3 Mar 2003 21:50:49 -0000 1.14 @@ -70,11 +70,12 @@ import org.apache.jmeter.gui.GuiPackage; import org.apache.jmeter.gui.tree.JMeterTreeModel; import org.apache.jmeter.gui.tree.JMeterTreeNode; +import org.apache.jmeter.protocol.http.config.gui.HttpDefaultsGui; +import org.apache.jmeter.protocol.http.config.gui.UrlConfigGui; import org.apache.jmeter.protocol.http.control.HeaderManager; import org.apache.jmeter.protocol.http.control.RecordingController; -import org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui; -import org.apache.jmeter.protocol.http.gui.HeaderPanel; import org.apache.jmeter.protocol.http.sampler.HTTPSampler; +import org.apache.jmeter.threads.ThreadGroup; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.util.JMeterUtils; import org.apache.log.Hierarchy; @@ -310,11 +311,14 @@ else { Enumeration enum = node.children(); + String guiClassName = null; while (enum.hasMoreElements()) { JMeterTreeNode subNode = (JMeterTreeNode) enum.nextElement(); TestElement sample = (TestElement) subNode.createTestElement(); - if (sample.getPropertyAsString(TestElement.GUI_CLASS).equals("org.apache.jmeter .protocol.http.config.gui.UrlConfigGui")) + guiClassName = sample.getPropertyAsString(TestElement.GUI_CLASS); + if (guiClassName.equals(UrlConfigGui.class.getName()) + || guiClassName.equals(HttpDefaultsGui.class.getName())) { urlConfig = sample; break; @@ -348,13 +352,22 @@ } private void removeValuesFromSampler(HTTPSampler sampler, TestElement urlConfig) { - if (urlConfig != null && sampler.getDomain().equals(urlConfig.getProperty(HTTPSampler.DOMAIN))) + if (urlConfig != null) { - sampler.setDomain(""); - } - if (urlConfig != null && sampler.getPath().equals(urlConfig.getProperty(HTTPSampler.PATH))) - { - sampler.setPath(""); + if (sampler.getDomain().equals(urlConfig.getProperty(HTTPSampler.DOMAIN))) + { + sampler.setDomain(""); + } + /* Need to add some kind of "ignore-me" value + if (("" + sampler.getPort()).equals(urlConfig.getProperty(HTTPSampler.PORT))) + { + sampler.setPort(0); + } + */ + if (sampler.getPath().equals(urlConfig.getProperty(HTTPSampler.PATH))) + { + sampler.setPath(""); + } } } private boolean areMatched(HTTPSampler sampler, TestElement urlConfig) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -------------------------------------------------------------------------------------------------------------------- This e-mail (including attachments) is confidential information of Australian Submarine Corporation Pty Limited (ASC). It may also be legally privileged. Unauthorised use and disclosure is prohibited. ASC is not taken to have waived confidentiality or privilege if this e-mail was sent to you in error. If you have received it in error, please notify the sender promptly. While ASC takes steps to identify and eliminate viruses, it cannot confirm that this e-mail is free from them. You should scan this e-mail for viruses before it is used. The statements in this e-mail are those of the sender only, unless specifically stated to be those of ASC by someone with authority to do so.
