You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/10/27 12:52:00 UTC
svn commit: r1813527 - in /jmeter/trunk/bin/testfiles: FTP_TESTS.jmx
JMS_TESTS.jmx TCP_TESTS.csv TCP_TESTS.jmx TCP_TESTS.xml
Author: pmouawad
Date: Fri Oct 27 12:52:00 2017
New Revision: 1813527
URL: http://svn.apache.org/viewvc?rev=1813527&view=rev
Log:
Drop Beanshell (I am stupid, forgot props can store Objects )
Modified:
jmeter/trunk/bin/testfiles/FTP_TESTS.jmx
jmeter/trunk/bin/testfiles/JMS_TESTS.jmx
jmeter/trunk/bin/testfiles/TCP_TESTS.csv
jmeter/trunk/bin/testfiles/TCP_TESTS.jmx
jmeter/trunk/bin/testfiles/TCP_TESTS.xml
Modified: jmeter/trunk/bin/testfiles/FTP_TESTS.jmx
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/FTP_TESTS.jmx?rev=1813527&r1=1813526&r2=1813527&view=diff
==============================================================================
--- jmeter/trunk/bin/testfiles/FTP_TESTS.jmx (original)
+++ jmeter/trunk/bin/testfiles/FTP_TESTS.jmx Fri Oct 27 12:52:00 2017
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jmeterTestPlan version="1.2" properties="3.4" jmeter="3.4-SNAPSHOT.20171023">
+<jmeterTestPlan version="1.2" properties="3.4" jmeter="3.4-SNAPSHOT.20171027">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
@@ -61,8 +61,12 @@
<stringProp name="ThreadGroup.delay"></stringProp>
</SetupThreadGroup>
<hashTree>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BSS_startFtpServer" enabled="true">
- <stringProp name="BeanShellSampler.query">import org.apache.ftpserver.FtpServer;
+ <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="BSS_startFtpServer" enabled="true">
+ <stringProp name="scriptLanguage">groovy</stringProp>
+ <stringProp name="parameters"></stringProp>
+ <stringProp name="filename"></stringProp>
+ <stringProp name="cacheKey">92d044f3-7b32-4797-a3a8-49d07a78b01f</stringProp>
+ <stringProp name="script">import org.apache.ftpserver.FtpServer;
import org.apache.ftpserver.FtpServerFactory;
import org.apache.ftpserver.ftplet.FtpException;
import org.apache.ftpserver.ftplet.UserManager;
@@ -107,13 +111,9 @@ factory.addListener("default",
FtpServer server = factory.createServer();
server.start();
-bsh.shared.myMap = new HashMap();
-bsh.shared.myMap.put("FTP_SERVER", server);
+props.put("FTP_SERVER", server);
</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">true</boolProp>
- </BeanShellSampler>
+ </JSR223Sampler>
<hashTree/>
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Think Time" enabled="true">
<intProp name="ActionProcessor.action">1</intProp>
@@ -237,8 +237,12 @@ bsh.shared.myMap.put("FTP_SERVER&qu
<stringProp name="ThreadGroup.delay"></stringProp>
</PostThreadGroup>
<hashTree>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BSS_stopFtpServer" enabled="true">
- <stringProp name="BeanShellSampler.query">import org.apache.ftpserver.FtpServer;
+ <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="BSS_stopFtpServer" enabled="true">
+ <stringProp name="scriptLanguage">groovy</stringProp>
+ <stringProp name="parameters"></stringProp>
+ <stringProp name="filename"></stringProp>
+ <stringProp name="cacheKey">d09f6f8d-0f86-4cae-b88c-0ad9bd587d31</stringProp>
+ <stringProp name="script">import org.apache.ftpserver.FtpServer;
import org.apache.jmeter.util.JMeterUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FileUtils;
@@ -246,7 +250,7 @@ import org.apache.commons.io.FileUtils;
FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), "bin/ftp_test"));
-FtpServer server = bsh.shared.myMap.get("FTP_SERVER");
+FtpServer server = (FtpServer) props.get("FTP_SERVER");
try {
server.stop();
} catch (Exception ex) {
@@ -254,10 +258,7 @@ try {
}
</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">true</boolProp>
- </BeanShellSampler>
+ </JSR223Sampler>
<hashTree/>
</hashTree>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
Modified: jmeter/trunk/bin/testfiles/JMS_TESTS.jmx
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/JMS_TESTS.jmx?rev=1813527&r1=1813526&r2=1813527&view=diff
==============================================================================
--- jmeter/trunk/bin/testfiles/JMS_TESTS.jmx (original)
+++ jmeter/trunk/bin/testfiles/JMS_TESTS.jmx Fri Oct 27 12:52:00 2017
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jmeterTestPlan version="1.2" properties="3.4" jmeter="3.4-SNAPSHOT.20171024">
+<jmeterTestPlan version="1.2" properties="3.4" jmeter="3.4-SNAPSHOT.20171027">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
@@ -25,8 +25,12 @@
<stringProp name="ThreadGroup.delay"></stringProp>
</SetupThreadGroup>
<hashTree>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BSS_startActiveMQ" enabled="true">
- <stringProp name="BeanShellSampler.query">import org.apache.activemq.broker.BrokerService;
+ <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="BSS_startActiveMQ" enabled="true">
+ <stringProp name="scriptLanguage">groovy</stringProp>
+ <stringProp name="parameters"></stringProp>
+ <stringProp name="filename"></stringProp>
+ <stringProp name="cacheKey">12bd6db8-b5be-4825-a7ce-b7f4ba5ba84e</stringProp>
+ <stringProp name="script">import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.BrokerFactory;
import org.apache.jmeter.util.JMeterUtils;
import org.apache.commons.io.FileUtils;
@@ -41,16 +45,12 @@ try {
path = path.replace('\\', '/');
path = path.replaceAll(" ", "%20");
BrokerService broker = BrokerFactory.createBroker("xbean:file:"+path, true);
- bsh.shared.myMap = new HashMap();
- bsh.shared.myMap.put("ACTIVEMQ_BROKER", broker);
+ props.put("ACTIVEMQ_BROKER", broker);
} catch(Exception ex) {
log.error("Error configuring ActiveMQ", ex);
}
</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">true</boolProp>
- </BeanShellSampler>
+ </JSR223Sampler>
<hashTree/>
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Think Time" enabled="true">
<intProp name="ActionProcessor.action">1</intProp>
@@ -1132,20 +1132,21 @@ propFloat 1.2</stringProp>
<stringProp name="ConstantTimer.delay">5100</stringProp>
</ConstantTimer>
<hashTree/>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BSS_stopActiveMQ" enabled="true">
- <stringProp name="BeanShellSampler.query">import org.apache.activemq.broker.BrokerService;
+ <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="BSS_stopActiveMQ" enabled="true">
+ <stringProp name="scriptLanguage">groovy</stringProp>
+ <stringProp name="parameters"></stringProp>
+ <stringProp name="filename"></stringProp>
+ <stringProp name="cacheKey">d47bf508-8239-4927-913f-238941a3e887</stringProp>
+ <stringProp name="script">import org.apache.activemq.broker.BrokerService;
import org.apache.jmeter.util.JMeterUtils;
import org.apache.commons.io.FileUtils;
-BrokerService broker = bsh.shared.myMap.get("ACTIVEMQ_BROKER");
+BrokerService broker = props.get("ACTIVEMQ_BROKER");
broker.stop();
FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), "bin/activemq-data"));
</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">true</boolProp>
- </BeanShellSampler>
+ </JSR223Sampler>
<hashTree/>
</hashTree>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
Modified: jmeter/trunk/bin/testfiles/TCP_TESTS.csv
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/TCP_TESTS.csv?rev=1813527&r1=1813526&r2=1813527&view=diff
==============================================================================
--- jmeter/trunk/bin/testfiles/TCP_TESTS.csv (original)
+++ jmeter/trunk/bin/testfiles/TCP_TESTS.csv Fri Oct 27 12:52:00 2017
@@ -1,6 +1,5 @@
label,responseCode,responseMessage,threadName,dataType,success,grpThreads,allThreads,SampleCount,ErrorCount
MinaTcpServerInitializer,200,OK,setUp Thread Group 1-1,text,true,1,1,1,0
-BSS_startTcpServer,200,OK,setUp Thread Group 1-1,text,true,1,1,1,0
TCP Sampler-Hello,200,OK,TG-TCPClientImpl 1-1,text,true,1,1,1,0
TCP Sampler-Timeout,500,"org.apache.jmeter.protocol.tcp.sampler.ReadException: Error reading from server, bytes read: 0",TG-TCPClientImpl 1-1,text,true,1,1,1,0
TCP Sampler-Quit,200,OK,TG-TCPClientImpl 1-1,text,true,1,1,1,0
@@ -10,4 +9,4 @@ TCP Sampler-Binary-Quit,200,OK,TG-Binary
TCP Sampler-ConnectError,500,java.net.ConnectException: Connection refused,TG-TCPClientImpl-Errors 3-1,,true,1,1,1,0
TCP Sampler-HostUnknown,500,java.net.UnknownHostException: localhostXXXX,TG-TCPClientImpl-Errors 3-1,,true,1,1,1,0
TCP Sampler-ClassNotFoundException,500,Protocol handler not found,TG-TCPClientImpl-Errors 3-1,,true,1,1,1,0
-BSS_stopTcpServer,200,OK,tearDown Thread Group 1-1,text,true,1,1,1,0
+JSR223S_stopTcpServer,200,OK,tearDown Thread Group 1-1,text,true,1,1,1,0
Modified: jmeter/trunk/bin/testfiles/TCP_TESTS.jmx
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/TCP_TESTS.jmx?rev=1813527&r1=1813526&r2=1813527&view=diff
==============================================================================
--- jmeter/trunk/bin/testfiles/TCP_TESTS.jmx (original)
+++ jmeter/trunk/bin/testfiles/TCP_TESTS.jmx Fri Oct 27 12:52:00 2017
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jmeterTestPlan version="1.2" properties="3.4" jmeter="3.4-SNAPSHOT.20171024">
+<jmeterTestPlan version="1.2" properties="3.4" jmeter="3.4-SNAPSHOT.20171027">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments">https://stackoverflow.com/questions/8403462/jmeter-execute-command-over-telnet-using-beanshell
@@ -116,7 +116,7 @@ acceptor.setHandler( new TimeServerHandl
acceptor.setReuseAddress(true);
acceptor.getSessionConfig().setReadBufferSize( 2048 );
acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10 );
-vars.putObject("TCP_SERVER", acceptor);
+props.put("TCP_SERVER", acceptor);
def thread = Thread.start {
acceptor.bind( new InetSocketAddress(Integer.parseInt(vars.get("port"))));
};
@@ -125,16 +125,6 @@ SampleResult.setResponseMessageOK();
SampleResult.setResponseData("Starting TCP Server", "UTF-8");</stringProp>
</JSR223Sampler>
<hashTree/>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BSS_startTcpServer" enabled="true">
- <stringProp name="BeanShellSampler.query">Object o = vars.getObject("TCP_SERVER");
-bsh.shared.myMap = new HashMap();
-bsh.shared.myMap.put("TCP_SERVER", o);
-</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">true</boolProp>
- </BeanShellSampler>
- <hashTree/>
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Think Time" enabled="true">
<intProp name="ActionProcessor.action">1</intProp>
<intProp name="ActionProcessor.target">0</intProp>
@@ -554,21 +544,23 @@ vars.put("result_decoded", new
<stringProp name="ThreadGroup.delay"></stringProp>
</PostThreadGroup>
<hashTree>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BSS_stopTcpServer" enabled="true">
- <stringProp name="BeanShellSampler.query">import org.apache.jmeter.util.JMeterUtils;
+ <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="JSR223S_stopTcpServer" enabled="true">
+ <stringProp name="scriptLanguage">groovy</stringProp>
+ <stringProp name="parameters"></stringProp>
+ <stringProp name="filename"></stringProp>
+ <stringProp name="cacheKey">81a419ad-5207-446a-b0a0-2bfe2cd776ed</stringProp>
+ <stringProp name="script">import org.apache.jmeter.util.JMeterUtils;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.core.service.IoAcceptor;
-IoAcceptor acceptor = bsh.shared.myMap.get("TCP_SERVER");
+
+IoAcceptor acceptor = props.get("TCP_SERVER");
acceptor.setCloseOnDeactivation(true);
for (IoSession ss : acceptor.getManagedSessions().values()) {
ss.close(true);
}
acceptor.unbind();
acceptor.dispose();</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">true</boolProp>
- </BeanShellSampler>
+ </JSR223Sampler>
<hashTree/>
</hashTree>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
Modified: jmeter/trunk/bin/testfiles/TCP_TESTS.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/TCP_TESTS.xml?rev=1813527&r1=1813526&r2=1813527&view=diff
==============================================================================
--- jmeter/trunk/bin/testfiles/TCP_TESTS.xml (original)
+++ jmeter/trunk/bin/testfiles/TCP_TESTS.xml Fri Oct 27 12:52:00 2017
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<testResults version="1.2">
<sample s="true" lb="MinaTcpServerInitializer" rc="200" rm="OK" tn="setUp Thread Group 1-1" dt="text" sc="1" ec="0" ng="1" na="1"/>
-<sample s="true" lb="BSS_startTcpServer" rc="200" rm="OK" tn="setUp Thread Group 1-1" dt="text" sc="1" ec="0" ng="1" na="1"/>
<sample s="true" lb="TCP Sampler-Hello" rc="200" rm="OK" tn="TG-TCPClientImpl 1-1" dt="text" sc="1" ec="0" ng="1" na="1">
<assertionResult>
<name>RA_time</name>
@@ -78,6 +77,6 @@
<error>false</error>
</assertionResult>
</sample>
-<sample s="true" lb="BSS_stopTcpServer" rc="200" rm="OK" tn="tearDown Thread Group 1-1" dt="text" sc="1" ec="0" ng="1" na="1"/>
+<sample s="true" lb="JSR223S_stopTcpServer" rc="200" rm="OK" tn="tearDown Thread Group 1-1" dt="text" sc="1" ec="0" ng="1" na="1"/>
</testResults>