Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
261 lines (259 sloc) 13.5 KB
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.tearDown_on_shutdown">true</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>
<stringProp name="TestPlan.user_define_classpath">/opt/apache-jmeter-4.0/lib</stringProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="JDBC users" 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">10</stringProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</ThreadGroup>
<hashTree>
<JDBCDataSource guiclass="TestBeanGUI" testclass="JDBCDataSource" testname="MySQL Configuration" enabled="true">
<boolProp name="autocommit">true</boolProp>
<stringProp name="checkQuery">select 1</stringProp>
<stringProp name="connectionAge">5000</stringProp>
<stringProp name="dataSource">myDatabase</stringProp>
<stringProp name="dbUrl">jdbc:mysql://172.17.0.2:3306/employees</stringProp>
<stringProp name="driver">com.mysql.jdbc.Driver</stringProp>
<boolProp name="keepAlive">true</boolProp>
<stringProp name="password">password</stringProp>
<stringProp name="poolMax">10</stringProp>
<stringProp name="timeout">10000</stringProp>
<stringProp name="transactionIsolation">DEFAULT</stringProp>
<stringProp name="trimInterval">60000</stringProp>
<stringProp name="username">root</stringProp>
</JDBCDataSource>
<hashTree/>
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Get 2 random employees" enabled="true">
<stringProp name="dataSource">myDatabase</stringProp>
<stringProp name="queryType">Select Statement</stringProp>
<stringProp name="query">SELECT
last_name,
first_name,
gender,
hire_date,
birth_date
FROM employees
WHERE RAND() &lt; 0.0001 LIMIT 0,2;</stringProp>
<stringProp name="queryArguments"></stringProp>
<stringProp name="queryArgumentsTypes"></stringProp>
<stringProp name="variableNames">last_name, first_name, gender, hire_date, birth_date</stringProp>
<stringProp name="resultVariable">result</stringProp>
<stringProp name="queryTimeout"></stringProp>
<stringProp name="resultSetHandler">Store as String</stringProp>
</JDBCSampler>
<hashTree/>
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Get a random deparment" enabled="true">
<stringProp name="dataSource">myDatabase</stringProp>
<stringProp name="queryType">Select Statement</stringProp>
<stringProp name="query">SELECT
dept_no
FROM departments
ORDER BY RAND() LIMIT 0,1;</stringProp>
<stringProp name="queryArguments"></stringProp>
<stringProp name="queryArgumentsTypes"></stringProp>
<stringProp name="variableNames">dept_no</stringProp>
<stringProp name="resultVariable">department</stringProp>
<stringProp name="queryTimeout"></stringProp>
<stringProp name="resultSetHandler">Store as String</stringProp>
</JDBCSampler>
<hashTree/>
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Get a random title" enabled="true">
<stringProp name="dataSource">myDatabase</stringProp>
<stringProp name="queryType">Select Statement</stringProp>
<stringProp name="query">SELECT
title,
from_date,
to_date
FROM titles
WHERE RAND() &lt; 0.0001 LIMIT 0,2;</stringProp>
<stringProp name="queryArguments"></stringProp>
<stringProp name="queryArgumentsTypes"></stringProp>
<stringProp name="variableNames">title, from_date, to_date</stringProp>
<stringProp name="resultVariable">titledata</stringProp>
<stringProp name="queryTimeout"></stringProp>
<stringProp name="resultSetHandler">Store as String</stringProp>
</JDBCSampler>
<hashTree/>
<RandomVariableConfig guiclass="TestBeanGUI" testclass="RandomVariableConfig" testname="random_emp_no" enabled="true">
<stringProp name="maximumValue">1000000000</stringProp>
<stringProp name="minimumValue">10000000</stringProp>
<stringProp name="outputFormat"></stringProp>
<boolProp name="perThread">false</boolProp>
<stringProp name="randomSeed"></stringProp>
<stringProp name="variableName">random_emp_no</stringProp>
</RandomVariableConfig>
<hashTree/>
<RandomVariableConfig guiclass="TestBeanGUI" testclass="RandomVariableConfig" testname="random_salary" enabled="true">
<stringProp name="variableName">random_salary</stringProp>
<stringProp name="outputFormat"></stringProp>
<stringProp name="minimumValue">25000</stringProp>
<stringProp name="maximumValue">300000</stringProp>
<stringProp name="randomSeed"></stringProp>
<boolProp name="perThread">false</boolProp>
</RandomVariableConfig>
<hashTree/>
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Insert employee" enabled="true">
<stringProp name="dataSource">myDatabase</stringProp>
<stringProp name="queryType">Update Statement</stringProp>
<stringProp name="query">INSERT INTO employees (emp_no,birth_date,first_name,last_name,gender,hire_date)
VALUES
(${random_emp_no}, STR_TO_DATE(&apos;${birth_date_2}&apos;,&apos;%Y-%m-%d&apos;),&apos;${first_name_2}&apos;,&apos;${last_name_1}&apos;, &apos;${gender_2}&apos;,STR_TO_DATE(&apos;${hire_date_1}&apos;,&apos;%Y-%m-%d&apos;))
</stringProp>
<stringProp name="queryArguments"></stringProp>
<stringProp name="queryArgumentsTypes"></stringProp>
<stringProp name="variableNames"></stringProp>
<stringProp name="resultVariable"></stringProp>
<stringProp name="queryTimeout"></stringProp>
<stringProp name="resultSetHandler">Store as String</stringProp>
</JDBCSampler>
<hashTree/>
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Insert salary" enabled="true">
<stringProp name="dataSource">myDatabase</stringProp>
<stringProp name="queryType">Update Statement</stringProp>
<stringProp name="query">INSERT INTO salaries (emp_no,salary,from_date,to_date)
VALUES
(${random_emp_no}, ${random_salary},
STR_TO_DATE(&apos;${hire_date_1}&apos;,&apos;%Y-%m-%d&apos;),
STR_TO_DATE(&apos;${to_date_2}&apos;,&apos;%Y-%m-%d&apos;))
</stringProp>
<stringProp name="queryArguments"></stringProp>
<stringProp name="queryArgumentsTypes"></stringProp>
<stringProp name="variableNames"></stringProp>
<stringProp name="resultVariable"></stringProp>
<stringProp name="queryTimeout"></stringProp>
<stringProp name="resultSetHandler">Store as String</stringProp>
</JDBCSampler>
<hashTree/>
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Insert title" enabled="true">
<stringProp name="dataSource">myDatabase</stringProp>
<stringProp name="queryType">Update Statement</stringProp>
<stringProp name="query">INSERT INTO titles (emp_no,title,from_date,to_date)
VALUES
(${random_emp_no}, &apos;${title_2}&apos;,
STR_TO_DATE(&apos;${hire_date_1}&apos;,&apos;%Y-%m-%d&apos;),
STR_TO_DATE(&apos;${to_date_2}&apos;,&apos;%Y-%m-%d&apos;))</stringProp>
<stringProp name="queryArguments"></stringProp>
<stringProp name="queryArgumentsTypes"></stringProp>
<stringProp name="variableNames"></stringProp>
<stringProp name="resultVariable"></stringProp>
<stringProp name="queryTimeout"></stringProp>
<stringProp name="resultSetHandler">Store as String</stringProp>
</JDBCSampler>
<hashTree/>
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Insert dept_emp" enabled="true">
<stringProp name="dataSource">myDatabase</stringProp>
<stringProp name="queryType">Update Statement</stringProp>
<stringProp name="query">INSERT INTO dept_emp (emp_no,dept_no,from_date,to_date)
VALUES
(${random_emp_no}, &apos;${dept_no_1}&apos;,
STR_TO_DATE(&apos;${hire_date_1}&apos;,&apos;%Y-%m-%d&apos;),
STR_TO_DATE(&apos;${to_date_2}&apos;,&apos;%Y-%m-%d&apos;))
</stringProp>
<stringProp name="queryArguments"></stringProp>
<stringProp name="queryArgumentsTypes"></stringProp>
<stringProp name="variableNames"></stringProp>
<stringProp name="resultVariable"></stringProp>
<stringProp name="queryTimeout"></stringProp>
<stringProp name="resultSetHandler">Store as String</stringProp>
</JDBCSampler>
<hashTree/>
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Query report" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename">/tmp/outputdata/jmeter/myhost/query_reports.${__time(yyyy-MM-dd&apos;T&apos;hh_mm_ssZ)}.csv</stringProp>
</ResultCollector>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
<DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="Debug Sampler" enabled="false">
<boolProp name="displayJMeterProperties">false</boolProp>
<boolProp name="displayJMeterVariables">true</boolProp>
<boolProp name="displaySystemProperties">false</boolProp>
</DebugSampler>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>