2926 lines
198 KiB
XML
2926 lines
198 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.3">
|
|
<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"></stringProp>
|
|
</TestPlan>
|
|
<hashTree>
|
|
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="xmeter_ip" elementType="Argument">
|
|
<stringProp name="Argument.name">xmeter_ip</stringProp>
|
|
<stringProp name="Argument.value">${__property(xmeter_ip,,)}</stringProp>
|
|
<stringProp name="Argument.desc">xmeter server ip</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="port" elementType="Argument">
|
|
<stringProp name="Argument.name">port</stringProp>
|
|
<stringProp name="Argument.value">${__property(port,,)}</stringProp>
|
|
<stringProp name="Argument.desc">xmeter service port</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="xmeter_user" elementType="Argument">
|
|
<stringProp name="Argument.name">xmeter_user</stringProp>
|
|
<stringProp name="Argument.value">${__property(xmeter_user,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="xmeter_pwd" elementType="Argument">
|
|
<stringProp name="Argument.name">xmeter_pwd</stringProp>
|
|
<stringProp name="Argument.value">${__property(xmeter_pwd,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="emqx_ip" elementType="Argument">
|
|
<stringProp name="Argument.name">emqx_ip</stringProp>
|
|
<stringProp name="Argument.value">${__property(emqx_ip,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="emqx_private_ip1" elementType="Argument">
|
|
<stringProp name="Argument.name">emqx_private_ip1</stringProp>
|
|
<stringProp name="Argument.value">${__property(emqx_private_ip1,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="emqx_private_ip2" elementType="Argument">
|
|
<stringProp name="Argument.name">emqx_private_ip2</stringProp>
|
|
<stringProp name="Argument.value">${__property(emqx_private_ip2,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="emqx_private_ip3" elementType="Argument">
|
|
<stringProp name="Argument.name">emqx_private_ip3</stringProp>
|
|
<stringProp name="Argument.value">${__property(emqx_private_ip3,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="api_version" elementType="Argument">
|
|
<stringProp name="Argument.name">api_version</stringProp>
|
|
<stringProp name="Argument.value">${__property(api_version,,/api/v5)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="scripts_path" elementType="Argument">
|
|
<stringProp name="Argument.name">scripts_path</stringProp>
|
|
<stringProp name="Argument.value">${__property(scripts_path,,)}</stringProp>
|
|
<stringProp name="Argument.desc">performance scripts path</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="plugins_path" elementType="Argument">
|
|
<stringProp name="Argument.name">plugins_path</stringProp>
|
|
<stringProp name="Argument.value">${__property(plugins_path,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="report_file" elementType="Argument">
|
|
<stringProp name="Argument.name">report_file</stringProp>
|
|
<stringProp name="Argument.value">${__property(report_file,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="mysql_ip" elementType="Argument">
|
|
<stringProp name="Argument.name">mysql_ip</stringProp>
|
|
<stringProp name="Argument.value">${__property(mysql_ip,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="pgsql_ip" elementType="Argument">
|
|
<stringProp name="Argument.name">pgsql_ip</stringProp>
|
|
<stringProp name="Argument.value">${__property(pgsql_ip,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="redis_ip" elementType="Argument">
|
|
<stringProp name="Argument.name">redis_ip</stringProp>
|
|
<stringProp name="Argument.value">${__property(redis_ip,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="mongo_ip" elementType="Argument">
|
|
<stringProp name="Argument.name">mongo_ip</stringProp>
|
|
<stringProp name="Argument.value">${__property(mongo_ip,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="http_ip" elementType="Argument">
|
|
<stringProp name="Argument.name">http_ip</stringProp>
|
|
<stringProp name="Argument.value">${__property(http_ip,,)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="users_number" elementType="Argument">
|
|
<stringProp name="Argument.name">users_number</stringProp>
|
|
<stringProp name="Argument.value">${__property(users_number,,80000)}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</Arguments>
|
|
<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>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>
|
|
<url>true</url>
|
|
<threadCounts>true</threadCounts>
|
|
<idleTime>true</idleTime>
|
|
<connectTime>true</connectTime>
|
|
</value>
|
|
</objProp>
|
|
<stringProp name="filename"></stringProp>
|
|
</ResultCollector>
|
|
<hashTree/>
|
|
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="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>
|
|
<boolProp name="ThreadGroup.scheduler">false</boolProp>
|
|
<stringProp name="ThreadGroup.duration"></stringProp>
|
|
<stringProp name="ThreadGroup.delay"></stringProp>
|
|
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
|
</ThreadGroup>
|
|
<hashTree>
|
|
<AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
|
|
<collectionProp name="AuthManager.auth_list">
|
|
<elementProp name="" elementType="Authorization">
|
|
<stringProp name="Authorization.url">http://${emqx_ip}</stringProp>
|
|
<stringProp name="Authorization.username">admin</stringProp>
|
|
<stringProp name="Authorization.password">public</stringProp>
|
|
<stringProp name="Authorization.domain"></stringProp>
|
|
<stringProp name="Authorization.realm"></stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
<boolProp name="AuthManager.controlledByThreadGroup">false</boolProp>
|
|
</AuthManager>
|
|
<hashTree/>
|
|
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${xmeter_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">${port}</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">https</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path"></stringProp>
|
|
<stringProp name="HTTPSampler.concurrentPool">6</stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</ConfigTestElement>
|
|
<hashTree/>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Login" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"password":"${xmeter_pwd}","email":"${xmeter_user}"}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/account/login/</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">userid</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_userid</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BoundaryExtractor guiclass="BoundaryExtractorGui" testclass="BoundaryExtractor" testname="Boundary Extractor" enabled="true">
|
|
<stringProp name="BoundaryExtractor.useHeaders">true</stringProp>
|
|
<stringProp name="BoundaryExtractor.refname">token</stringProp>
|
|
<stringProp name="BoundaryExtractor.lboundary">jwt: </stringProp>
|
|
<stringProp name="BoundaryExtractor.rboundary">Con</stringProp>
|
|
<stringProp name="BoundaryExtractor.default">1</stringProp>
|
|
<boolProp name="BoundaryExtractor.default_empty_value">false</boolProp>
|
|
<stringProp name="BoundaryExtractor.match_number">0</stringProp>
|
|
</BoundaryExtractor>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get API_Key" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/account/${userid}/api_key</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">api_key</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..apiKey</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_api_key</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Add Application" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"name":"dailytest-${__time(yyMMdd,)}","description":"","hostIps":["${emqx_private_ip1}","${emqx_private_ip2}","${emqx_private_ip3}"]}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/applications/${userid}</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">applicationId</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="Get ApplicationId If Add Application Failed " enabled="true">
|
|
<stringProp name="IfController.condition">${__jexl3("${applicationId}"=="err_id",)}</stringProp>
|
|
<boolProp name="IfController.evaluateAll">false</boolProp>
|
|
<boolProp name="IfController.useExpression">true</boolProp>
|
|
</IfController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Add Application" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"name":"dailytest-${__time(yyMMdd,)}-${__Random(100,999,)}","description":"","hostIps":["${emqx_private_ip1}","${emqx_private_ip2}","${emqx_private_ip3}"]}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/applications/${userid}</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">applicationId</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="upload plugins" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">false</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Upload MQTT Plugin" enabled="true">
|
|
<elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
|
|
<collectionProp name="HTTPFileArgs.files">
|
|
<elementProp name="${plugins_path}/mqtt-xmeter-fuse-2.0.2-jar-with-dependencies.jar" elementType="HTTPFileArg">
|
|
<stringProp name="File.path">${plugins_path}/mqtt-xmeter-fuse-2.0.2-jar-with-dependencies.jar</stringProp>
|
|
<stringProp name="File.paramname">0</stringProp>
|
|
<stringProp name="File.mimetype">application/java-archive</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="overwrite" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">true</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
|
<stringProp name="Argument.name">overwrite</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/dependency/plugins/upload</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">true</boolProp>
|
|
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Attestation redis" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment set up" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Insert Mqtt_user In Redis" enabled="true">
|
|
<stringProp name="BeanShellSampler.query">import redis.clients.jedis.Jedis;
|
|
|
|
Jedis jedis = new Jedis("${redis_ip}",6379);
|
|
|
|
//jedis.auth("");
|
|
jedis.select(0);
|
|
jedis.flushDB();
|
|
jedis.hset("mqtt_user:emqx","password_hash","public");
|
|
jedis.close();
|
|
|
|
|
|
</stringProp>
|
|
<stringProp name="BeanShellSampler.filename"></stringProp>
|
|
<stringProp name="BeanShellSampler.parameters"></stringProp>
|
|
<boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
|
|
</BeanShellSampler>
|
|
<hashTree/>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Script Upload" enabled="true">
|
|
<elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
|
|
<collectionProp name="HTTPFileArgs.files">
|
|
<elementProp name="${scripts_path}/broker_connect.jmx" elementType="HTTPFileArg">
|
|
<stringProp name="File.path">${scripts_path}/broker_connect.jmx</stringProp>
|
|
<stringProp name="File.paramname">test_case</stringProp>
|
|
<stringProp name="File.mimetype">application/octet-stream</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="overwrite" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">true</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
|
<stringProp name="Argument.name">overwrite</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/api/fileupload</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">true</boolProp>
|
|
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..testId</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-api-key</stringProp>
|
|
<stringProp name="Header.value">${api_key}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Add Redis Attestation" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"server":"${redis_ip}:6379","salt_position":"prefix","redis_type":"single","database":0,"auto_reconnect":true,"password":"","password_hash_algorithm":"plain","pool_size":8,"cmd":"HMGET mqtt_user:${username} password_hash","ssl":{"enable":false},"backend":"redis","mechanism":"password-based"}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/authentication</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49586">200</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">2</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Rampup" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/${test_id}/script_info</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">ramp_up</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.threadGroups[0].rampup</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_rampup</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">300</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="test run" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Start The Test" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"testId":"${test_id}","vuNumber":${users_number},"executionDuration":-1,"loopCount":1,"rampupPeriod":${ramp_up},"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":${users_number},"tgUsers":[{"id":0,"number":${users_number},"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/request</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">report_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_report_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
|
|
<stringProp name="TestPlan.comments">https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}</stringProp>
|
|
<stringProp name="filename"></stringProp>
|
|
<stringProp name="parameters"></stringProp>
|
|
<boolProp name="resetInterpreter">false</boolProp>
|
|
<stringProp name="script">import java.io.File;
|
|
import java.io.FileWriter;
|
|
|
|
FileWriter writer = new FileWriter("${report_file}", true);
|
|
String content = "redis persist" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n";
|
|
writer.write(content);
|
|
writer.flush();
|
|
writer.close();</stringProp>
|
|
</BeanShellPostProcessor>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">3000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment reset" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Connect" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/nodes</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">count1;count2;count3</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.[0].connections;$.[1].connections;$.[2].connections</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1;1;1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err;0;0</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell Assertion" enabled="true">
|
|
<stringProp name="BeanShellAssertion.query"> int count = ${count1}+${count2}+${count3};
|
|
System.out.println(count);
|
|
if(count!=400000) {
|
|
Failure = true;
|
|
FailureMessage = "failed";
|
|
}else{
|
|
FailureMessage = "true";
|
|
}</stringProp>
|
|
<stringProp name="BeanShellAssertion.filename"></stringProp>
|
|
<stringProp name="BeanShellAssertion.parameters"></stringProp>
|
|
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
|
|
</BeanShellAssertion>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">490000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Remove Redis Attestaion" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/authentication/password-based%3Aredis</stringProp>
|
|
<stringProp name="HTTPSampler.method">DELETE</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49590">204</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">2</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">100000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Running Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/runningtests</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_status</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..status</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_status</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true">
|
|
<stringProp name="IfController.condition">${__jexl3("${test_status}"=="RUNNING",)}</stringProp>
|
|
<boolProp name="IfController.evaluateAll">false</boolProp>
|
|
<boolProp name="IfController.useExpression">true</boolProp>
|
|
</IfController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Stop Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/testrun/stop/${test_id}</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Flow Control Action" enabled="true">
|
|
<intProp name="ActionProcessor.action">1</intProp>
|
|
<intProp name="ActionProcessor.target">0</intProp>
|
|
<stringProp name="ActionProcessor.duration">200000</stringProp>
|
|
</TestAction>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Attestation mysql" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment set up" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<JDBCDataSource guiclass="TestBeanGUI" testclass="JDBCDataSource" testname="JDBC Connection Configuration" enabled="true">
|
|
<boolProp name="autocommit">true</boolProp>
|
|
<stringProp name="checkQuery"></stringProp>
|
|
<stringProp name="connectionAge">5000</stringProp>
|
|
<stringProp name="connectionProperties"></stringProp>
|
|
<stringProp name="dataSource">mysql8</stringProp>
|
|
<stringProp name="dbUrl">jdbc:mysql://${mysql_ip}:3306/mqtt</stringProp>
|
|
<stringProp name="driver">com.mysql.jdbc.Driver</stringProp>
|
|
<stringProp name="initQuery"></stringProp>
|
|
<boolProp name="keepAlive">true</boolProp>
|
|
<stringProp name="password">public123</stringProp>
|
|
<stringProp name="poolMax">0</stringProp>
|
|
<boolProp name="preinit">false</boolProp>
|
|
<stringProp name="timeout">10000</stringProp>
|
|
<stringProp name="transactionIsolation">DEFAULT</stringProp>
|
|
<stringProp name="trimInterval">60000</stringProp>
|
|
<stringProp name="username">test</stringProp>
|
|
</JDBCDataSource>
|
|
<hashTree/>
|
|
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Create Table "mqtt_user"" enabled="true">
|
|
<stringProp name="dataSource">mysql8</stringProp>
|
|
<stringProp name="queryType">Update Statement</stringProp>
|
|
<stringProp name="query">CREATE TABLE IF NOT EXISTS `mqtt_user` (
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
`username` varchar(100) DEFAULT NULL,
|
|
`password_hash` varchar(100) DEFAULT NULL,
|
|
`salt` varchar(35) DEFAULT NULL,
|
|
`is_superuser` tinyint(1) DEFAULT 0,
|
|
`created` datetime DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `mqtt_username` (`username`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;</stringProp>
|
|
<stringProp name="queryArguments"></stringProp>
|
|
<stringProp name="queryArgumentsTypes"></stringProp>
|
|
<stringProp name="variableNames"></stringProp>
|
|
<stringProp name="resultVariable"></stringProp>
|
|
<stringProp name="queryTimeout"></stringProp>
|
|
<stringProp name="resultSetMaxRows"></stringProp>
|
|
<stringProp name="resultSetHandler">Store as String</stringProp>
|
|
</JDBCSampler>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="-234430262">updates</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">16</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Insert "mqtt_user"" enabled="true">
|
|
<stringProp name="dataSource">mysql8</stringProp>
|
|
<stringProp name="queryType">Update Statement</stringProp>
|
|
<stringProp name="query">INSERT INTO `mqtt_user` ( `username`, `password_hash`, `salt`)
|
|
VALUES
|
|
('emqx', 'public', NULL);
|
|
|
|
</stringProp>
|
|
<stringProp name="queryArguments"></stringProp>
|
|
<stringProp name="queryArgumentsTypes"></stringProp>
|
|
<stringProp name="variableNames"></stringProp>
|
|
<stringProp name="resultVariable"></stringProp>
|
|
<stringProp name="queryTimeout"></stringProp>
|
|
<stringProp name="resultSetMaxRows"></stringProp>
|
|
<stringProp name="resultSetHandler">Store as String</stringProp>
|
|
</JDBCSampler>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="-234430262">updates</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">16</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Script Upload" enabled="true">
|
|
<elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
|
|
<collectionProp name="HTTPFileArgs.files">
|
|
<elementProp name="${scripts_path}/broker_connect.jmx" elementType="HTTPFileArg">
|
|
<stringProp name="File.path">${scripts_path}/broker_connect.jmx</stringProp>
|
|
<stringProp name="File.paramname">test_case</stringProp>
|
|
<stringProp name="File.mimetype">application/octet-stream</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="overwrite" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">true</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
|
<stringProp name="Argument.name">overwrite</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/api/fileupload</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">true</boolProp>
|
|
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..testId</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-api-key</stringProp>
|
|
<stringProp name="Header.value">${api_key}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Add Mysql Attestation" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"server":"${mysql_ip}:3306","username":"test","password":"public123","database":"mqtt","pool_size":8,"auto_reconnect":true,"ssl":{"enable":false},"query":"SELECT password_hash FROM mqtt_user where username = ${username} LIMIT 1","password_hash_algorithm":"plain","salt_position":"prefix","query_timeout":"5s","backend":"mysql","mechanism":"password-based"}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/authentication</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49586">200</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">2</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Rampup" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/${test_id}/script_info</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">ramp_up</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.threadGroups[0].rampup</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_rampup</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">300</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="test run" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Start The Test" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"testId":"${test_id}","vuNumber":${users_number},"executionDuration":-1,"loopCount":1,"rampupPeriod":${ramp_up},"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":${users_number},"tgUsers":[{"id":0,"number":${users_number},"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/request</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">report_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_report_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
|
|
<stringProp name="TestPlan.comments">https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}</stringProp>
|
|
<stringProp name="filename"></stringProp>
|
|
<stringProp name="parameters"></stringProp>
|
|
<boolProp name="resetInterpreter">false</boolProp>
|
|
<stringProp name="script">import java.io.File;
|
|
import java.io.FileWriter;
|
|
|
|
FileWriter writer = new FileWriter("${report_file}", true);
|
|
String content = "mysql connect" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n";
|
|
writer.write(content);
|
|
writer.flush();
|
|
writer.close();</stringProp>
|
|
</BeanShellPostProcessor>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">3000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment reset" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Connect" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/nodes</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">count1;count2;count3</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.[0].connections;$.[1].connections;$.[2].connections</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1;1;1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err;0;0</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell Assertion" enabled="true">
|
|
<stringProp name="BeanShellAssertion.query"> int count = ${count1}+${count2}+${count3};
|
|
System.out.println(count);
|
|
if(count!=400000) {
|
|
Failure = true;
|
|
FailureMessage = "failed";
|
|
}else{
|
|
FailureMessage = "true";
|
|
}</stringProp>
|
|
<stringProp name="BeanShellAssertion.filename"></stringProp>
|
|
<stringProp name="BeanShellAssertion.parameters"></stringProp>
|
|
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
|
|
</BeanShellAssertion>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">490000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Remove Mysql Attestation" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/authentication/password-based%3Amysql</stringProp>
|
|
<stringProp name="HTTPSampler.method">DELETE</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49590">204</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">2</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">100000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Delete Username In Mysql" enabled="true">
|
|
<stringProp name="dataSource">mysql8</stringProp>
|
|
<stringProp name="queryType">Update Statement</stringProp>
|
|
<stringProp name="query">DELETE FROM mqtt_user WHERE username = "emqx";</stringProp>
|
|
<stringProp name="queryArguments"></stringProp>
|
|
<stringProp name="queryArgumentsTypes"></stringProp>
|
|
<stringProp name="variableNames"></stringProp>
|
|
<stringProp name="resultVariable"></stringProp>
|
|
<stringProp name="queryTimeout"></stringProp>
|
|
<stringProp name="resultSetMaxRows"></stringProp>
|
|
<stringProp name="resultSetHandler">Store as String</stringProp>
|
|
</JDBCSampler>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49">1</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">16</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Running Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/runningtests</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_status</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..status</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_status</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true">
|
|
<stringProp name="IfController.condition">${__jexl3("${test_status}"=="RUNNING",)}</stringProp>
|
|
<boolProp name="IfController.evaluateAll">false</boolProp>
|
|
<boolProp name="IfController.useExpression">true</boolProp>
|
|
</IfController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Stop Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/testrun/stop/${test_id}</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Flow Control Action" enabled="true">
|
|
<intProp name="ActionProcessor.action">1</intProp>
|
|
<intProp name="ActionProcessor.target">0</intProp>
|
|
<stringProp name="ActionProcessor.duration">200000</stringProp>
|
|
</TestAction>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Attestation mongo" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment set up" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Connect Mongo & Insert "mqtt_user"" enabled="true">
|
|
<stringProp name="scriptLanguage">groovy</stringProp>
|
|
<stringProp name="parameters"></stringProp>
|
|
<stringProp name="filename"></stringProp>
|
|
<stringProp name="cacheKey">true</stringProp>
|
|
<stringProp name="script">import com.mongodb.*
|
|
import com.gmongo.GMongoClient
|
|
import com.mongodb.MongoCredential
|
|
import com.mongodb.ServerAddress
|
|
|
|
// disable user and pwd connect
|
|
GMongoClient client = new GMongoClient(new ServerAddress("${mongo_ip}",27017))
|
|
|
|
def DB=client.getDB("mqtt")
|
|
//insert data
|
|
def dataDB=DB.getCollection("mqtt_user").insert(["username" : "emqx", "password_hash" : "public", "is_superuser" : false, "salt": ""])
|
|
String ReData=dataDB
|
|
|
|
SampleResult.setResponseData(ReData)</stringProp>
|
|
<stringProp name="TestPlan.comments">disable account password connection</stringProp>
|
|
</JSR223Sampler>
|
|
<hashTree/>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Script Upload" enabled="true">
|
|
<elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
|
|
<collectionProp name="HTTPFileArgs.files">
|
|
<elementProp name="${scripts_path}/broker_connect.jmx" elementType="HTTPFileArg">
|
|
<stringProp name="File.path">${scripts_path}/broker_connect.jmx</stringProp>
|
|
<stringProp name="File.paramname">test_case</stringProp>
|
|
<stringProp name="File.mimetype">application/octet-stream</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="overwrite" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">true</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
|
<stringProp name="Argument.name">overwrite</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/api/fileupload</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">true</boolProp>
|
|
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..testId</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-api-key</stringProp>
|
|
<stringProp name="Header.value">${api_key}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Add Mongo Attestation" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"mongo_type":"single","server":"${mongo_ip}:27017","database":"mqtt","collection":"mqtt_user","selector":{"username":"${username}"},"password_hash_field":"password_hash","salt_field":"","password_hash_algorithm":"plain","salt_position":"prefix","pool_size":8,"ssl":{"enable":false},"topology":{"connect_timeout_ms":20000},"backend":"mongodb","mechanism":"password-based"}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/authentication</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49586">200</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">2</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Rampup" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/${test_id}/script_info</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">ramp_up</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.threadGroups[0].rampup</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_rampup</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">300</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="test run" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Start The Test" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"testId":"${test_id}","vuNumber":${users_number},"executionDuration":-1,"loopCount":1,"rampupPeriod":${ramp_up},"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":${users_number},"tgUsers":[{"id":0,"number":${users_number},"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/request</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">report_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_report_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
|
|
<stringProp name="TestPlan.comments">https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}</stringProp>
|
|
<stringProp name="filename"></stringProp>
|
|
<stringProp name="parameters"></stringProp>
|
|
<boolProp name="resetInterpreter">false</boolProp>
|
|
<stringProp name="script">import java.io.File;
|
|
import java.io.FileWriter;
|
|
|
|
FileWriter writer = new FileWriter("${report_file}", true);
|
|
String content = "mongo connect" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n";
|
|
writer.write(content);
|
|
writer.flush();
|
|
writer.close();</stringProp>
|
|
</BeanShellPostProcessor>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">3000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment reset" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Connect" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/nodes</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">count1;count2;count3</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.[0].connections;$.[1].connections;$.[2].connections</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1;1;1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err;0;0</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell Assertion" enabled="true">
|
|
<stringProp name="BeanShellAssertion.query"> int count = ${count1}+${count2}+${count3};
|
|
System.out.println(count);
|
|
if(count!=400000) {
|
|
Failure = true;
|
|
FailureMessage = "failed";
|
|
}else{
|
|
FailureMessage = "true";
|
|
}</stringProp>
|
|
<stringProp name="BeanShellAssertion.filename"></stringProp>
|
|
<stringProp name="BeanShellAssertion.parameters"></stringProp>
|
|
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
|
|
</BeanShellAssertion>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">490000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Remove Mongo Attestation" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/authentication/password-based%3Amongodb</stringProp>
|
|
<stringProp name="HTTPSampler.method">DELETE</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49590">204</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">2</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">100000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Remove "mqtt_user"" enabled="true">
|
|
<stringProp name="scriptLanguage">groovy</stringProp>
|
|
<stringProp name="parameters"></stringProp>
|
|
<stringProp name="filename"></stringProp>
|
|
<stringProp name="cacheKey">true</stringProp>
|
|
<stringProp name="script">import com.mongodb.*
|
|
import com.gmongo.GMongoClient
|
|
import com.mongodb.MongoCredential
|
|
import com.mongodb.ServerAddress
|
|
|
|
// disable user and pwd connect
|
|
GMongoClient client = new GMongoClient(new ServerAddress("${mongo_ip}",27017))
|
|
|
|
def DB=client.getDB("mqtt")
|
|
//remove data
|
|
def dataDB=DB.getCollection("mqtt_user").remove(["username" : "emqx", "password_hash" : "public", "is_superuser" : false, "salt": ""])
|
|
String ReData=dataDB
|
|
|
|
SampleResult.setResponseData(ReData)</stringProp>
|
|
<stringProp name="TestPlan.comments">disable account password connection</stringProp>
|
|
</JSR223Sampler>
|
|
<hashTree/>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Running Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/runningtests</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_status</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..status</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_status</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true">
|
|
<stringProp name="IfController.condition">${__jexl3("${test_status}"=="RUNNING",)}</stringProp>
|
|
<boolProp name="IfController.evaluateAll">false</boolProp>
|
|
<boolProp name="IfController.useExpression">true</boolProp>
|
|
</IfController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Stop Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/testrun/stop/${test_id}</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Flow Control Action" enabled="true">
|
|
<intProp name="ActionProcessor.action">1</intProp>
|
|
<intProp name="ActionProcessor.target">0</intProp>
|
|
<stringProp name="ActionProcessor.duration">200000</stringProp>
|
|
</TestAction>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Attestation pgsql" enabled="false">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment set up" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<JDBCDataSource guiclass="TestBeanGUI" testclass="JDBCDataSource" testname="JDBC Connection Configuration" enabled="true">
|
|
<boolProp name="autocommit">true</boolProp>
|
|
<stringProp name="checkQuery"></stringProp>
|
|
<stringProp name="connectionAge">5000</stringProp>
|
|
<stringProp name="connectionProperties"></stringProp>
|
|
<stringProp name="dataSource">pgsql</stringProp>
|
|
<stringProp name="dbUrl">jdbc:postgresql://${pgsql_ip}:5432/mqtt</stringProp>
|
|
<stringProp name="driver">org.postgresql.Driver</stringProp>
|
|
<stringProp name="initQuery"></stringProp>
|
|
<boolProp name="keepAlive">true</boolProp>
|
|
<stringProp name="password">public123</stringProp>
|
|
<stringProp name="poolMax">0</stringProp>
|
|
<boolProp name="preinit">false</boolProp>
|
|
<stringProp name="timeout">10000</stringProp>
|
|
<stringProp name="transactionIsolation">DEFAULT</stringProp>
|
|
<stringProp name="trimInterval">60000</stringProp>
|
|
<stringProp name="username">test</stringProp>
|
|
</JDBCDataSource>
|
|
<hashTree/>
|
|
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Create Table "mqtt_user"" enabled="true">
|
|
<stringProp name="dataSource">pgsql</stringProp>
|
|
<stringProp name="queryType">Update Statement</stringProp>
|
|
<stringProp name="query">CREATE TABLE IF NOT EXISTS mqtt_user (
|
|
id SERIAL primary key,
|
|
is_superuser boolean,
|
|
username character varying(100),
|
|
password_hash character varying(100),
|
|
salt character varying(40)
|
|
);
|
|
</stringProp>
|
|
<stringProp name="queryArguments"></stringProp>
|
|
<stringProp name="queryArgumentsTypes"></stringProp>
|
|
<stringProp name="variableNames"></stringProp>
|
|
<stringProp name="resultVariable"></stringProp>
|
|
<stringProp name="queryTimeout"></stringProp>
|
|
<stringProp name="resultSetMaxRows"></stringProp>
|
|
<stringProp name="resultSetHandler">Store as String</stringProp>
|
|
</JDBCSampler>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="-234430262">updates</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">16</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Insert "mqtt_user"" enabled="true">
|
|
<stringProp name="dataSource">pgsql</stringProp>
|
|
<stringProp name="queryType">Update Statement</stringProp>
|
|
<stringProp name="query">INSERT INTO mqtt_user (username, password_hash, salt, is_superuser)
|
|
VALUES
|
|
('emqx', 'public', NULL, false);
|
|
</stringProp>
|
|
<stringProp name="queryArguments"></stringProp>
|
|
<stringProp name="queryArgumentsTypes"></stringProp>
|
|
<stringProp name="variableNames"></stringProp>
|
|
<stringProp name="resultVariable"></stringProp>
|
|
<stringProp name="queryTimeout"></stringProp>
|
|
<stringProp name="resultSetMaxRows"></stringProp>
|
|
<stringProp name="resultSetHandler">Store as String</stringProp>
|
|
</JDBCSampler>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="-234430262">updates</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">16</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Script Upload" enabled="true">
|
|
<elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
|
|
<collectionProp name="HTTPFileArgs.files">
|
|
<elementProp name="${scripts_path}/pgsql_broker_connect.jmx" elementType="HTTPFileArg">
|
|
<stringProp name="File.path">${scripts_path}/pgsql_broker_connect.jmx</stringProp>
|
|
<stringProp name="File.paramname">test_case</stringProp>
|
|
<stringProp name="File.mimetype">application/octet-stream</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="overwrite" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">true</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
|
<stringProp name="Argument.name">overwrite</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/api/fileupload</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">true</boolProp>
|
|
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..testId</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-api-key</stringProp>
|
|
<stringProp name="Header.value">${api_key}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Add Pgsql Attestation" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"server":"${pgsql_ip}:5432","username":"test","password":"public123","database":"mqtt","pool_size":8,"auto_reconnect":true,"ssl":{"enable":false},"query":"SELECT password_hash FROM mqtt_user where username = ${username} LIMIT 1","password_hash_algorithm":"plain","salt_position":"prefix","backend":"postgresql","mechanism":"password-based"}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/authentication</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49586">200</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">2</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="test run" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Start The Test" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"testId":"${test_id}","vuNumber":10000,"executionDuration":-1,"loopCount":1,"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":10000,"tgUsers":[{"id":0,"number":10000,"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/request</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">report_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_report_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
|
|
<stringProp name="TestPlan.comments">https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}</stringProp>
|
|
<stringProp name="filename"></stringProp>
|
|
<stringProp name="parameters"></stringProp>
|
|
<boolProp name="resetInterpreter">false</boolProp>
|
|
<stringProp name="script">import java.io.File;
|
|
import java.io.FileWriter;
|
|
|
|
FileWriter writer = new FileWriter("${report_file}", true);
|
|
String content = "pgsql connect" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n";
|
|
writer.write(content);
|
|
writer.flush();
|
|
writer.close();</stringProp>
|
|
</BeanShellPostProcessor>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">3000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment reset" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Connect" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/nodes</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">count1;count2;count3</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.[0].connections;$.[1].connections;$.[2].connections</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1;1;1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err;0;0</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell Assertion" enabled="true">
|
|
<stringProp name="BeanShellAssertion.query"> int count = ${count1}+${count2}+${count3};
|
|
System.out.println(count);
|
|
if(count!=250000) {
|
|
Failure = true;
|
|
FailureMessage = "failed";
|
|
}else{
|
|
FailureMessage = "true";
|
|
}</stringProp>
|
|
<stringProp name="BeanShellAssertion.filename"></stringProp>
|
|
<stringProp name="BeanShellAssertion.parameters"></stringProp>
|
|
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
|
|
</BeanShellAssertion>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">260000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor-node" enabled="false">
|
|
<stringProp name="JSONPostProcessor.referenceNames">count1</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..connections</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell Assertion" enabled="false">
|
|
<stringProp name="BeanShellAssertion.query"> int count = ${count1};
|
|
System.out.println(count);
|
|
if(count!=50000) {
|
|
Failure = true;
|
|
FailureMessage = "failed";
|
|
}else{
|
|
FailureMessage = "true";
|
|
}</stringProp>
|
|
<stringProp name="BeanShellAssertion.filename"></stringProp>
|
|
<stringProp name="BeanShellAssertion.parameters"></stringProp>
|
|
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
|
|
</BeanShellAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Remove Pgsql Attestaion" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/authentication/password-based%3Apostgresql</stringProp>
|
|
<stringProp name="HTTPSampler.method">DELETE</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49590">204</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">2</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">60000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Delete Username In Pgsql" enabled="true">
|
|
<stringProp name="dataSource">pgsql</stringProp>
|
|
<stringProp name="queryType">Update Statement</stringProp>
|
|
<stringProp name="query">DELETE FROM mqtt_user WHERE username = 'emqx';</stringProp>
|
|
<stringProp name="queryArguments"></stringProp>
|
|
<stringProp name="queryArgumentsTypes"></stringProp>
|
|
<stringProp name="variableNames"></stringProp>
|
|
<stringProp name="resultVariable"></stringProp>
|
|
<stringProp name="queryTimeout"></stringProp>
|
|
<stringProp name="resultSetMaxRows"></stringProp>
|
|
<stringProp name="resultSetHandler">Store as String</stringProp>
|
|
</JDBCSampler>
|
|
<hashTree>
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49586">200</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">16</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Running Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/runningtests</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_status</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..status</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_status</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true">
|
|
<stringProp name="IfController.condition">${__jexl3("${test_status}"=="RUNNING",)}</stringProp>
|
|
<boolProp name="IfController.evaluateAll">false</boolProp>
|
|
<boolProp name="IfController.useExpression">true</boolProp>
|
|
</IfController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Stop Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/testrun/stop/${test_id}</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Flow Control Action" enabled="true">
|
|
<intProp name="ActionProcessor.action">1</intProp>
|
|
<intProp name="ActionProcessor.target">0</intProp>
|
|
<stringProp name="ActionProcessor.duration">200000</stringProp>
|
|
</TestAction>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Connect test" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment set up" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Script Upload" enabled="true">
|
|
<elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
|
|
<collectionProp name="HTTPFileArgs.files">
|
|
<elementProp name="${scripts_path}/broker_mqtt_connect.jmx" elementType="HTTPFileArg">
|
|
<stringProp name="File.path">${scripts_path}/broker_mqtt_connect.jmx</stringProp>
|
|
<stringProp name="File.paramname">test_case</stringProp>
|
|
<stringProp name="File.mimetype">application/octet-stream</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="overwrite" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">true</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
|
<stringProp name="Argument.name">overwrite</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/api/fileupload</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">true</boolProp>
|
|
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..testId</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-api-key</stringProp>
|
|
<stringProp name="Header.value">${api_key}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="test run" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Start The Test" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"testId":"${test_id}","vuNumber":80000,"executionDuration":-1,"loopCount":1,"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":80000,"tgUsers":[{"id":0,"number":80000,"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/request</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">report_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_report_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
|
|
<stringProp name="TestPlan.comments">https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}</stringProp>
|
|
<stringProp name="filename"></stringProp>
|
|
<stringProp name="parameters"></stringProp>
|
|
<boolProp name="resetInterpreter">false</boolProp>
|
|
<stringProp name="script">import java.io.File;
|
|
import java.io.FileWriter;
|
|
|
|
FileWriter writer = new FileWriter("${report_file}", true);
|
|
String content = "connect mqtt test" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n";
|
|
writer.write(content);
|
|
writer.flush();
|
|
writer.close();</stringProp>
|
|
</BeanShellPostProcessor>
|
|
<hashTree/>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">3000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment reset" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Connect" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${emqx_ip}</stringProp>
|
|
<stringProp name="HTTPSampler.port">18083</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">${api_version}/nodes</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
<stringProp name="ConstantTimer.delay">260000</stringProp>
|
|
</ConstantTimer>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor-cluster" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">count1;count2;count3</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.[0].connections;$.[1].connections;$.[2].connections</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1;1;1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err;0;0</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell Assertion" enabled="true">
|
|
<stringProp name="BeanShellAssertion.query"> int count = ${count1}+${count2}+${count3};
|
|
System.out.println(count);
|
|
if(count!=400000) {
|
|
Failure = true;
|
|
FailureMessage = "failed";
|
|
}else{
|
|
FailureMessage = "true";
|
|
}</stringProp>
|
|
<stringProp name="BeanShellAssertion.filename"></stringProp>
|
|
<stringProp name="BeanShellAssertion.parameters"></stringProp>
|
|
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
|
|
</BeanShellAssertion>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor-node" enabled="false">
|
|
<stringProp name="JSONPostProcessor.referenceNames">count1</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..connections</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell Assertion" enabled="false">
|
|
<stringProp name="BeanShellAssertion.query"> int count = ${count1};
|
|
System.out.println(count);
|
|
if(count!=250000) {
|
|
Failure = true;
|
|
FailureMessage = "failed";
|
|
}else{
|
|
FailureMessage = "true";
|
|
}</stringProp>
|
|
<stringProp name="BeanShellAssertion.filename"></stringProp>
|
|
<stringProp name="BeanShellAssertion.parameters"></stringProp>
|
|
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
|
|
</BeanShellAssertion>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Flow Control Action" enabled="true">
|
|
<intProp name="ActionProcessor.action">1</intProp>
|
|
<intProp name="ActionProcessor.target">0</intProp>
|
|
<stringProp name="ActionProcessor.duration">60000</stringProp>
|
|
</TestAction>
|
|
<hashTree/>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Running Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/runningtests</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_status</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..status</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_status</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true">
|
|
<stringProp name="IfController.condition">${__jexl3("${test_status}"=="RUNNING",)}</stringProp>
|
|
<boolProp name="IfController.evaluateAll">false</boolProp>
|
|
<boolProp name="IfController.useExpression">true</boolProp>
|
|
</IfController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Stop Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/testrun/stop/${test_id}</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Flow Control Action" enabled="true">
|
|
<intProp name="ActionProcessor.action">1</intProp>
|
|
<intProp name="ActionProcessor.target">0</intProp>
|
|
<stringProp name="ActionProcessor.duration">200000</stringProp>
|
|
</TestAction>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Mqtt pub&sub" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment set up" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Script Upload" enabled="true">
|
|
<elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
|
|
<collectionProp name="HTTPFileArgs.files">
|
|
<elementProp name="${scripts_path}/broker_pub_sub.jmx" elementType="HTTPFileArg">
|
|
<stringProp name="File.path">${scripts_path}/broker_pub_sub.jmx</stringProp>
|
|
<stringProp name="File.paramname">test_case</stringProp>
|
|
<stringProp name="File.mimetype">application/octet-stream</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ser_defined_variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="overwrite" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">true</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
|
<stringProp name="Argument.name">overwrite</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/api/fileupload</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">true</boolProp>
|
|
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..testId</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-api-key</stringProp>
|
|
<stringProp name="Header.value">${api_key}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="test run" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Start The Test" enabled="true">
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{"testId":"${test_id}","vuNumber":80000,"executionDuration":-1,"loopCount":1,"replaceLoopToInfinite":false,"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":80000,"tgUsers":[{"id":0,"number":40000,"threadGroupName":"Sub","throughputs":[]},{"id":1,"number":40000,"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/request</stringProp>
|
|
<stringProp name="HTTPSampler.method">POST</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">report_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_report_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
|
|
<stringProp name="TestPlan.comments">https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}</stringProp>
|
|
<stringProp name="filename"></stringProp>
|
|
<stringProp name="parameters"></stringProp>
|
|
<boolProp name="resetInterpreter">false</boolProp>
|
|
<stringProp name="script">import java.io.File;
|
|
import java.io.FileWriter;
|
|
|
|
FileWriter writer = new FileWriter("${report_file}", true);
|
|
String content = "mqtt pub&sub" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n";
|
|
writer.write(content);
|
|
writer.flush();
|
|
writer.close();</stringProp>
|
|
</BeanShellPostProcessor>
|
|
<hashTree/>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Flow Control Action" enabled="true">
|
|
<intProp name="ActionProcessor.action">1</intProp>
|
|
<intProp name="ActionProcessor.target">0</intProp>
|
|
<stringProp name="ActionProcessor.duration">500000</stringProp>
|
|
</TestAction>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="environment reset" enabled="true">
|
|
<boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
<boolProp name="TransactionController.parent">true</boolProp>
|
|
</TransactionController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Running Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/${userid}/runningtests</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_status</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..status</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_status</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">test_id</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..id</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues">err_test_id</stringProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true">
|
|
<stringProp name="IfController.condition">${__jexl3("${test_status}"=="RUNNING",)}</stringProp>
|
|
<boolProp name="IfController.evaluateAll">false</boolProp>
|
|
<boolProp name="IfController.useExpression">true</boolProp>
|
|
</IfController>
|
|
<hashTree>
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Stop Test" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/commercial_service/rest/testcase/testrun/stop/${test_id}</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</stringProp>
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
</HTTPSamplerProxy>
|
|
<hashTree>
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">xmeter-authorization</stringProp>
|
|
<stringProp name="Header.value">${token}</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">content-type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=utf-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">X-Requested-With</stringProp>
|
|
<stringProp name="Header.value">XMLHttpRequest</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
</hashTree>
|
|
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Flow Control Action" enabled="true">
|
|
<intProp name="ActionProcessor.action">1</intProp>
|
|
<intProp name="ActionProcessor.target">0</intProp>
|
|
<stringProp name="ActionProcessor.duration">200000</stringProp>
|
|
</TestAction>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
</hashTree>
|
|
</hashTree>
|
|
</hashTree>
|
|
</hashTree>
|
|
</jmeterTestPlan>
|