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/03/01 22:49:18 UTC
svn commit: r1785060 - in /jmeter/trunk/bin/testfiles:
TestSchedulerWithTimer.csv TestSchedulerWithTimer.jmx
TestSchedulerWithTimer.xml
Author: pmouawad
Date: Wed Mar 1 22:49:18 2017
New Revision: 1785060
URL: http://svn.apache.org/viewvc?rev=1785060&view=rev
Log:
Bug 60797 - TestAction in pause mode can last beyond configured duration of test
Add Tests for Bugs 60797 and 60049
Bugzilla Id: 60797
Added:
jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.csv
jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.jmx (with props)
jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.xml (with props)
Added: jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.csv
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.csv?rev=1785060&view=auto
==============================================================================
--- jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.csv (added)
+++ jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.csv Wed Mar 1 22:49:18 2017
@@ -0,0 +1 @@
+JSRCheckDuration,200,tearDown Thread Group 1-1,text,true,null,null,null,null,null,null,null,null,null,null
Added: jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.jmx
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.jmx?rev=1785060&view=auto
==============================================================================
--- jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.jmx (added)
+++ jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.jmx Wed Mar 1 22:49:18 2017
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jmeterTestPlan version="1.2" properties="3.2" jmeter="3.2-SNAPSHOT.20170301">
+ <hashTree>
+ <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
+ <stringProp name="TestPlan.comments">Each Thread Group should initially end after 20s but since scheduler is set to 5s, we check it ends within 5.5s</stringProp>
+ <boolProp name="TestPlan.functional_mode">false</boolProp>
+ <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
+ <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+ <collectionProp name="Arguments.arguments">
+ <elementProp name="MaxDuration" elementType="Argument">
+ <stringProp name="Argument.name">MaxDuration</stringProp>
+ <stringProp name="Argument.value">5</stringProp>
+ <stringProp name="Argument.metadata">=</stringProp>
+ </elementProp>
+ </collectionProp>
+ </elementProp>
+ <stringProp name="TestPlan.user_define_classpath"></stringProp>
+ <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
+ </TestPlan>
+ <hashTree>
+ <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="TG_TestActionPause" enabled="true">
+ <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+ <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+ <boolProp name="LoopController.continue_forever">false</boolProp>
+ <intProp name="LoopController.loops">-1</intProp>
+ </elementProp>
+ <stringProp name="ThreadGroup.num_threads">1</stringProp>
+ <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+ <longProp name="ThreadGroup.start_time">1488404546000</longProp>
+ <longProp name="ThreadGroup.end_time">1488404546000</longProp>
+ <boolProp name="ThreadGroup.scheduler">true</boolProp>
+ <stringProp name="ThreadGroup.duration">${MaxDuration}</stringProp>
+ <stringProp name="ThreadGroup.delay"></stringProp>
+ </ThreadGroup>
+ <hashTree>
+ <DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="DS1" enabled="true">
+ <boolProp name="displayJMeterProperties">false</boolProp>
+ <boolProp name="displayJMeterVariables">true</boolProp>
+ <boolProp name="displaySystemProperties">false</boolProp>
+ </DebugSampler>
+ <hashTree/>
+ <TestAction guiclass="TestActionGui" testclass="TestAction" testname="TA_20s" enabled="true">
+ <intProp name="ActionProcessor.action">1</intProp>
+ <intProp name="ActionProcessor.target">0</intProp>
+ <stringProp name="ActionProcessor.duration">20000</stringProp>
+ </TestAction>
+ <hashTree/>
+ <DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="DS2" enabled="true">
+ <boolProp name="displayJMeterProperties">false</boolProp>
+ <boolProp name="displayJMeterVariables">true</boolProp>
+ <boolProp name="displaySystemProperties">false</boolProp>
+ </DebugSampler>
+ <hashTree/>
+ </hashTree>
+ <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="TG_ThinkTime" enabled="true">
+ <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+ <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+ <boolProp name="LoopController.continue_forever">false</boolProp>
+ <intProp name="LoopController.loops">-1</intProp>
+ </elementProp>
+ <stringProp name="ThreadGroup.num_threads">1</stringProp>
+ <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+ <longProp name="ThreadGroup.start_time">1488404546000</longProp>
+ <longProp name="ThreadGroup.end_time">1488404546000</longProp>
+ <boolProp name="ThreadGroup.scheduler">true</boolProp>
+ <stringProp name="ThreadGroup.duration">${MaxDuration}</stringProp>
+ <stringProp name="ThreadGroup.delay"></stringProp>
+ </ThreadGroup>
+ <hashTree>
+ <DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="DS1" enabled="true">
+ <boolProp name="displayJMeterProperties">false</boolProp>
+ <boolProp name="displayJMeterVariables">true</boolProp>
+ <boolProp name="displaySystemProperties">false</boolProp>
+ </DebugSampler>
+ <hashTree/>
+ <TestAction guiclass="TestActionGui" testclass="TestAction" testname="ThinkTime20s" enabled="true">
+ <intProp name="ActionProcessor.action">1</intProp>
+ <intProp name="ActionProcessor.target">0</intProp>
+ <stringProp name="ActionProcessor.duration">0</stringProp>
+ </TestAction>
+ <hashTree>
+ <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
+ <stringProp name="ConstantTimer.delay">20000</stringProp>
+ </ConstantTimer>
+ <hashTree/>
+ </hashTree>
+ <DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="DS2" enabled="true">
+ <boolProp name="displayJMeterProperties">false</boolProp>
+ <boolProp name="displayJMeterVariables">true</boolProp>
+ <boolProp name="displaySystemProperties">false</boolProp>
+ </DebugSampler>
+ <hashTree/>
+ </hashTree>
+ <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="TG_Timer" enabled="true">
+ <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+ <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+ <boolProp name="LoopController.continue_forever">false</boolProp>
+ <intProp name="LoopController.loops">-1</intProp>
+ </elementProp>
+ <stringProp name="ThreadGroup.num_threads">1</stringProp>
+ <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+ <longProp name="ThreadGroup.start_time">1488404546000</longProp>
+ <longProp name="ThreadGroup.end_time">1488404546000</longProp>
+ <boolProp name="ThreadGroup.scheduler">true</boolProp>
+ <stringProp name="ThreadGroup.duration">${MaxDuration}</stringProp>
+ <stringProp name="ThreadGroup.delay"></stringProp>
+ </ThreadGroup>
+ <hashTree>
+ <DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="DS1" enabled="true">
+ <boolProp name="displayJMeterProperties">false</boolProp>
+ <boolProp name="displayJMeterVariables">true</boolProp>
+ <boolProp name="displaySystemProperties">false</boolProp>
+ </DebugSampler>
+ <hashTree/>
+ <DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="DS2" enabled="true">
+ <boolProp name="displayJMeterProperties">false</boolProp>
+ <boolProp name="displayJMeterVariables">true</boolProp>
+ <boolProp name="displaySystemProperties">false</boolProp>
+ </DebugSampler>
+ <hashTree>
+ <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Pause20s" enabled="true">
+ <stringProp name="ConstantTimer.delay">20000</stringProp>
+ </ConstantTimer>
+ <hashTree/>
+ </hashTree>
+ </hashTree>
+ <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="setUp Thread Group" enabled="true">
+ <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+ <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+ <boolProp name="LoopController.continue_forever">false</boolProp>
+ <stringProp name="LoopController.loops">1</stringProp>
+ </elementProp>
+ <stringProp name="ThreadGroup.num_threads">1</stringProp>
+ <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+ <longProp name="ThreadGroup.start_time">1488407009000</longProp>
+ <longProp name="ThreadGroup.end_time">1488407009000</longProp>
+ <boolProp name="ThreadGroup.scheduler">false</boolProp>
+ <stringProp name="ThreadGroup.duration"></stringProp>
+ <stringProp name="ThreadGroup.delay"></stringProp>
+ </SetupThreadGroup>
+ <hashTree>
+ <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="JSPP_StartTime" enabled="true">
+ <stringProp name="cacheKey">c430f36f-ade7-439d-ac9f-7cc0a9cb5a38</stringProp>
+ <stringProp name="filename"></stringProp>
+ <stringProp name="parameters"></stringProp>
+ <stringProp name="script">props.put("TEST_START", System.currentTimeMillis().toString());</stringProp>
+ <stringProp name="scriptLanguage">groovy</stringProp>
+ </JSR223Sampler>
+ <hashTree/>
+ </hashTree>
+ <PostThreadGroup guiclass="PostThreadGroupGui" testclass="PostThreadGroup" testname="tearDown Thread Group" enabled="true">
+ <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+ <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+ <boolProp name="LoopController.continue_forever">false</boolProp>
+ <stringProp name="LoopController.loops">1</stringProp>
+ </elementProp>
+ <stringProp name="ThreadGroup.num_threads">1</stringProp>
+ <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+ <longProp name="ThreadGroup.start_time">1488407012000</longProp>
+ <longProp name="ThreadGroup.end_time">1488407012000</longProp>
+ <boolProp name="ThreadGroup.scheduler">false</boolProp>
+ <stringProp name="ThreadGroup.duration"></stringProp>
+ <stringProp name="ThreadGroup.delay"></stringProp>
+ </PostThreadGroup>
+ <hashTree>
+ <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="JSRCheckDuration" enabled="true">
+ <stringProp name="scriptLanguage">groovy</stringProp>
+ <stringProp name="parameters"></stringProp>
+ <stringProp name="filename"></stringProp>
+ <stringProp name="cacheKey">7b043ed3-cbc5-4b9c-8427-8c70e6791c07</stringProp>
+ <stringProp name="script">long start = Long.parseLong(props.get("TEST_START"));
+long duration = System.currentTimeMillis() - start;
+long maxDurationPlusMargin = vars["MaxDuration"].toInteger()*1000+500;
+if(duration> maxDurationPlusMargin) {
+ SampleResult.setSuccessful(false);
+ SampleResult.setResponseData("Duration "+duration+" exceeded expected duration of "+maxDurationPlusMargin);
+} else {
+ SampleResult.setSuccessful(true);
+ SampleResult.setResponseData("Duration is in expected range:"+maxDurationPlusMargin);
+}
+</stringProp>
+ </JSR223Sampler>
+ <hashTree/>
+ <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
+ <objProp>
+ <name>saveConfig</name>
+ <value class="SampleSaveConfiguration">
+ <time>false</time>
+ <latency>false</latency>
+ <timestamp>false</timestamp>
+ <success>true</success>
+ <label>true</label>
+ <code>true</code>
+ <message>false</message>
+ <threadName>true</threadName>
+ <dataType>true</dataType>
+ <encoding>false</encoding>
+ <assertions>false</assertions>
+ <subresults>false</subresults>
+ <responseData>false</responseData>
+ <samplerData>false</samplerData>
+ <xml>false</xml>
+ <fieldNames>false</fieldNames>
+ <responseHeaders>false</responseHeaders>
+ <requestHeaders>false</requestHeaders>
+ <responseDataOnError>false</responseDataOnError>
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+ <assertionsResultsToSave>0</assertionsResultsToSave>
+ </value>
+ </objProp>
+ <stringProp name="filename">TestSchedulerWithTimer.csv</stringProp>
+ </ResultCollector>
+ <hashTree/>
+ <ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple Data Writer" enabled="true">
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
+ <objProp>
+ <name>saveConfig</name>
+ <value class="SampleSaveConfiguration">
+ <time>false</time>
+ <latency>false</latency>
+ <timestamp>false</timestamp>
+ <success>true</success>
+ <label>true</label>
+ <code>true</code>
+ <message>false</message>
+ <threadName>false</threadName>
+ <dataType>true</dataType>
+ <encoding>false</encoding>
+ <assertions>true</assertions>
+ <subresults>true</subresults>
+ <responseData>false</responseData>
+ <samplerData>false</samplerData>
+ <xml>true</xml>
+ <fieldNames>false</fieldNames>
+ <responseHeaders>false</responseHeaders>
+ <requestHeaders>false</requestHeaders>
+ <responseDataOnError>false</responseDataOnError>
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+ <assertionsResultsToSave>0</assertionsResultsToSave>
+ </value>
+ </objProp>
+ <stringProp name="filename">TestSchedulerWithTimer.xml</stringProp>
+ </ResultCollector>
+ <hashTree/>
+ </hashTree>
+ </hashTree>
+ <WorkBench guiclass="WorkBenchGui" testclass="WorkBench" testname="WorkBench" enabled="true">
+ <boolProp name="WorkBench.save">true</boolProp>
+ </WorkBench>
+ <hashTree/>
+ </hashTree>
+</jmeterTestPlan>
Propchange: jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.jmx
------------------------------------------------------------------------------
svn:eol-style = LF
Added: jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.xml?rev=1785060&view=auto
==============================================================================
--- jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.xml (added)
+++ jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.xml Wed Mar 1 22:49:18 2017
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<testResults version="1.2">
+<sample s="true" lb="JSRCheckDuration" rc="200" dt="text" context="" user="" lmreference="" description="" globalNodeId="" rootNodeId="" directionId="" categorieId="" rayonId="" modelId=""/>
+
+</testResults>
Propchange: jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jmeter/trunk/bin/testfiles/TestSchedulerWithTimer.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain