The ability to search and replace when creating new variables would be very useful. Essentially what I do at the moment is create the variable, close the testplan and then use sed to find some string, say 'mysername.com', and replace it with '${server}'. This process works but it's slow and it would be a substantial enhancement if this were possible in the GUI - maybe via the Seach menu. It would be an even greater enhancement if there were a button available on the User Defined Variables form that would allow me to directly: "Find any occurrences of the [MYVALUE] string and replace with '${[MYVARNAME]}'". The added benefit here is saving the time, risk and effort of having to go through the plan and complete this process manually. It's worth noting that in pretty much every single case where a var is created then this find and replace action is required, so it may as well be made easier. Relates to https://issues.apache.org/bugzilla/show_bug.cgi?id=22076.
Created attachment 34541 [details] Patch implementing the replace for Samplers Hello, This is a first step to replace feature. Current patch has one bug for now that I didn't resolve yet (ideas welcome). Bug is : If a sampler that contains a value to be replaced, the replacement does not occur although the underlying sampler has been. But value is not changed in JSyntaxtTextArea which leads it to be then reset to non replaced value. Otherwise replacement works fine for all other elements.
Author: pmouawad Date: Thu Dec 22 20:38:50 2016 New Revision: 1775729 URL: http://svn.apache.org/viewvc?rev=1775729&view=rev Log: Bug 54525 - Search Feature : Enhance it with ability to replace Implement feature for Sampler subclasses Bugzilla Id: 54525 Added: jmeter/trunk/src/core/org/apache/jmeter/gui/Replaceable.java (with props) Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java jmeter/trunk/src/core/org/apache/jmeter/gui/action/SearchTreeDialog.java 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/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
Author: pmouawad Date: Thu Feb 2 22:10:45 2017 New Revision: 1781476 URL: http://svn.apache.org/viewvc?rev=1781476&view=rev Log: Bug 54525 Search Feature : Enhance it with ability to replace Bugzilla Id: 54525 Added: jmeter/trunk/test/src/org/apache/jmeter/testelement/TestHeaderManager.java (with props) Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HeaderManager.java
Author: pmouawad Date: Tue Feb 7 12:11:25 2017 New Revision: 1781992 URL: http://svn.apache.org/viewvc?rev=1781992&view=rev Log: Bug 54525 Search Feature : Enhance it with ability to replace Improve rendering and add i18n for message Bugzilla Id: 54525 Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/SearchTreeDialog.java jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
Author: pmouawad Date: Thu Feb 23 12:16:30 2017 New Revision: 1784115 URL: http://svn.apache.org/viewvc?rev=1784115&view=rev Log: Bug 54525 Search Feature : Enhance it with ability to replace Bugzilla Id: 54525 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3052