select_condition_rule.jmx 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Copyright 2021 EMQ Technologies Co., Ltd.
  4. ~
  5. ~ Licensed under the Apache License, Version 2.0 (the "License");
  6. ~ you may not use this file except in compliance with the License.
  7. ~ You may obtain a copy of the License at
  8. ~
  9. ~ http://www.apache.org/licenses/LICENSE-2.0
  10. ~
  11. ~ Unless required by applicable law or agreed to in writing, software
  12. ~ distributed under the License is distributed on an "AS IS" BASIS,
  13. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ~ See the License for the specific language governing permissions and
  15. ~ limitations under the License.
  16. -->
  17. <jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414">
  18. <hashTree>
  19. <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
  20. <stringProp name="TestPlan.comments"></stringProp>
  21. <boolProp name="TestPlan.functional_mode">false</boolProp>
  22. <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
  23. <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
  24. <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  25. <collectionProp name="Arguments.arguments"/>
  26. </elementProp>
  27. <stringProp name="TestPlan.user_define_classpath"></stringProp>
  28. </TestPlan>
  29. <hashTree>
  30. <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  31. <collectionProp name="Arguments.arguments">
  32. <elementProp name="srv" elementType="Argument">
  33. <stringProp name="Argument.name">srv</stringProp>
  34. <stringProp name="Argument.value">127.0.0.1</stringProp>
  35. <stringProp name="Argument.metadata">=</stringProp>
  36. </elementProp>
  37. <elementProp name="rest_port" elementType="Argument">
  38. <stringProp name="Argument.name">rest_port</stringProp>
  39. <stringProp name="Argument.value">9081</stringProp>
  40. <stringProp name="Argument.metadata">=</stringProp>
  41. </elementProp>
  42. <elementProp name="mqtt_srv" elementType="Argument">
  43. <stringProp name="Argument.name">mqtt_srv</stringProp>
  44. <stringProp name="Argument.value">127.0.0.1</stringProp>
  45. <stringProp name="Argument.metadata">=</stringProp>
  46. </elementProp>
  47. </collectionProp>
  48. </Arguments>
  49. <hashTree/>
  50. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Rules" enabled="true">
  51. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  52. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  53. <boolProp name="LoopController.continue_forever">false</boolProp>
  54. <stringProp name="LoopController.loops">1</stringProp>
  55. </elementProp>
  56. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  57. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  58. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  59. <stringProp name="ThreadGroup.duration"></stringProp>
  60. <stringProp name="ThreadGroup.delay"></stringProp>
  61. </ThreadGroup>
  62. <hashTree>
  63. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  64. <boolProp name="ResultCollector.error_logging">false</boolProp>
  65. <objProp>
  66. <name>saveConfig</name>
  67. <value class="SampleSaveConfiguration">
  68. <time>true</time>
  69. <latency>true</latency>
  70. <timestamp>true</timestamp>
  71. <success>true</success>
  72. <label>true</label>
  73. <code>true</code>
  74. <message>true</message>
  75. <threadName>true</threadName>
  76. <dataType>true</dataType>
  77. <encoding>false</encoding>
  78. <assertions>true</assertions>
  79. <subresults>true</subresults>
  80. <responseData>false</responseData>
  81. <samplerData>false</samplerData>
  82. <xml>false</xml>
  83. <fieldNames>true</fieldNames>
  84. <responseHeaders>false</responseHeaders>
  85. <requestHeaders>false</requestHeaders>
  86. <responseDataOnError>false</responseDataOnError>
  87. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  88. <assertionsResultsToSave>0</assertionsResultsToSave>
  89. <bytes>true</bytes>
  90. <sentBytes>true</sentBytes>
  91. <threadCounts>true</threadCounts>
  92. <idleTime>true</idleTime>
  93. <connectTime>true</connectTime>
  94. </value>
  95. </objProp>
  96. <stringProp name="filename"></stringProp>
  97. </ResultCollector>
  98. <hashTree/>
  99. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="API" enabled="true">
  100. <boolProp name="TransactionController.includeTimers">false</boolProp>
  101. <boolProp name="TransactionController.parent">false</boolProp>
  102. </TransactionController>
  103. <hashTree>
  104. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  105. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  106. <stringProp name="mqtt.port">1883</stringProp>
  107. <stringProp name="mqtt.version">3.1</stringProp>
  108. <stringProp name="mqtt.conn_timeout">10</stringProp>
  109. <boolProp name="mqtt.private_protocol">false</boolProp>
  110. <stringProp name="mqtt.listener_timeout">10</stringProp>
  111. <stringProp name="mqtt.protocol">TCP</stringProp>
  112. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  113. <stringProp name="mqtt.keystore_file_path"></stringProp>
  114. <stringProp name="mqtt.keystore_password"></stringProp>
  115. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  116. <stringProp name="mqtt.clientcert_password"></stringProp>
  117. <stringProp name="mqtt.user_name"></stringProp>
  118. <stringProp name="mqtt.password"></stringProp>
  119. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  120. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  121. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  122. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  123. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  124. </net.xmeter.samplers.ConnectSampler>
  125. <hashTree/>
  126. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStream" enabled="true">
  127. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  128. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  129. <collectionProp name="Arguments.arguments">
  130. <elementProp name="" elementType="HTTPArgument">
  131. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  132. <stringProp name="Argument.value">{&#xd;
  133. &quot;sql&quot; : &quot;create stream demo (temperature float, humidity bigint) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;devices/+/messages\&quot; )&quot;&#xd;
  134. }</stringProp>
  135. <stringProp name="Argument.metadata">=</stringProp>
  136. </elementProp>
  137. </collectionProp>
  138. </elementProp>
  139. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  140. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  141. <stringProp name="HTTPSampler.protocol"></stringProp>
  142. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  143. <stringProp name="HTTPSampler.path">/streams</stringProp>
  144. <stringProp name="HTTPSampler.method">POST</stringProp>
  145. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  146. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  147. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  148. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  149. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  150. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  151. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  152. </HTTPSamplerProxy>
  153. <hashTree>
  154. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  155. <collectionProp name="Asserion.test_strings">
  156. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  157. </collectionProp>
  158. <stringProp name="Assertion.custom_message"></stringProp>
  159. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  160. <boolProp name="Assertion.assume_success">true</boolProp>
  161. <intProp name="Assertion.test_type">16</intProp>
  162. </ResponseAssertion>
  163. <hashTree/>
  164. </hashTree>
  165. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule" enabled="true">
  166. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  167. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  168. <collectionProp name="Arguments.arguments">
  169. <elementProp name="" elementType="HTTPArgument">
  170. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  171. <stringProp name="Argument.value">{&#xd;
  172. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  173. &quot;sql&quot;: &quot;SELECT * FROM demo WHERE temperature &gt; 30&quot;,&#xd;
  174. &quot;actions&quot;: [&#xd;
  175. {&#xd;
  176. &quot;mqtt&quot;: {&#xd;
  177. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  178. &quot;topic&quot;: &quot;devices/result&quot;,&#xd;
  179. &quot;qos&quot;: 1,&#xd;
  180. &quot;clientId&quot;: &quot;demo_001&quot;&#xd;
  181. }&#xd;
  182. }&#xd;
  183. ]&#xd;
  184. }</stringProp>
  185. <stringProp name="Argument.metadata">=</stringProp>
  186. </elementProp>
  187. </collectionProp>
  188. </elementProp>
  189. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  190. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  191. <stringProp name="HTTPSampler.protocol"></stringProp>
  192. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  193. <stringProp name="HTTPSampler.path">/rules</stringProp>
  194. <stringProp name="HTTPSampler.method">POST</stringProp>
  195. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  196. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  197. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  198. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  199. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  200. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  201. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  202. </HTTPSamplerProxy>
  203. <hashTree>
  204. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  205. <collectionProp name="Asserion.test_strings">
  206. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  207. </collectionProp>
  208. <stringProp name="Assertion.custom_message"></stringProp>
  209. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  210. <boolProp name="Assertion.assume_success">true</boolProp>
  211. <intProp name="Assertion.test_type">16</intProp>
  212. </ResponseAssertion>
  213. <hashTree/>
  214. </hashTree>
  215. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  216. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  217. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  218. <collectionProp name="Arguments.arguments">
  219. <elementProp name="" elementType="HTTPArgument">
  220. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  221. <stringProp name="Argument.value"></stringProp>
  222. <stringProp name="Argument.metadata">=</stringProp>
  223. </elementProp>
  224. </collectionProp>
  225. </elementProp>
  226. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  227. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  228. <stringProp name="HTTPSampler.protocol"></stringProp>
  229. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  230. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  231. <stringProp name="HTTPSampler.method">GET</stringProp>
  232. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  233. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  234. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  235. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  236. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  237. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  238. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  239. </HTTPSamplerProxy>
  240. <hashTree>
  241. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  242. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  243. <stringProp name="EXPECTED_VALUE">0</stringProp>
  244. <boolProp name="JSONVALIDATION">true</boolProp>
  245. <boolProp name="EXPECT_NULL">false</boolProp>
  246. <boolProp name="INVERT">false</boolProp>
  247. <boolProp name="ISREGEX">false</boolProp>
  248. </JSONPathAssertion>
  249. <hashTree/>
  250. </hashTree>
  251. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="loop_controller" enabled="true">
  252. <boolProp name="LoopController.continue_forever">true</boolProp>
  253. <stringProp name="LoopController.loops">10</stringProp>
  254. </LoopController>
  255. <hashTree>
  256. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  257. <stringProp name="delimiter">,</stringProp>
  258. <stringProp name="fileEncoding"></stringProp>
  259. <stringProp name="filename">iot_data.txt</stringProp>
  260. <boolProp name="ignoreFirstLine">false</boolProp>
  261. <boolProp name="quotedData">false</boolProp>
  262. <boolProp name="recycle">true</boolProp>
  263. <stringProp name="shareMode">shareMode.thread</stringProp>
  264. <boolProp name="stopThread">false</boolProp>
  265. <stringProp name="variableNames">device_id,temperature,humidity</stringProp>
  266. </CSVDataSet>
  267. <hashTree/>
  268. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  269. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  270. <stringProp name="mqtt.qos_level">0</stringProp>
  271. <boolProp name="mqtt.add_timestamp">false</boolProp>
  272. <stringProp name="mqtt.message_type">String</stringProp>
  273. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  274. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${temperature}, &quot;humidity&quot; : ${humidity}}</stringProp>
  275. </net.xmeter.samplers.PubSampler>
  276. <hashTree/>
  277. </hashTree>
  278. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  279. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  280. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  281. <collectionProp name="Arguments.arguments">
  282. <elementProp name="" elementType="HTTPArgument">
  283. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  284. <stringProp name="Argument.value"></stringProp>
  285. <stringProp name="Argument.metadata">=</stringProp>
  286. </elementProp>
  287. </collectionProp>
  288. </elementProp>
  289. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  290. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  291. <stringProp name="HTTPSampler.protocol"></stringProp>
  292. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  293. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  294. <stringProp name="HTTPSampler.method">GET</stringProp>
  295. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  296. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  297. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  298. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  299. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  300. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  301. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  302. </HTTPSamplerProxy>
  303. <hashTree>
  304. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  305. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  306. <stringProp name="EXPECTED_VALUE">10</stringProp>
  307. <boolProp name="JSONVALIDATION">true</boolProp>
  308. <boolProp name="EXPECT_NULL">false</boolProp>
  309. <boolProp name="INVERT">false</boolProp>
  310. <boolProp name="ISREGEX">false</boolProp>
  311. </JSONPathAssertion>
  312. <hashTree/>
  313. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  314. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  315. <stringProp name="EXPECTED_VALUE">6</stringProp>
  316. <boolProp name="JSONVALIDATION">true</boolProp>
  317. <boolProp name="EXPECT_NULL">false</boolProp>
  318. <boolProp name="INVERT">false</boolProp>
  319. <boolProp name="ISREGEX">false</boolProp>
  320. </JSONPathAssertion>
  321. <hashTree/>
  322. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  323. <stringProp name="ConstantTimer.delay">5000</stringProp>
  324. </ConstantTimer>
  325. <hashTree/>
  326. </hashTree>
  327. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  328. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  329. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  330. <collectionProp name="Arguments.arguments">
  331. <elementProp name="" elementType="HTTPArgument">
  332. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  333. <stringProp name="Argument.value"></stringProp>
  334. <stringProp name="Argument.metadata">=</stringProp>
  335. </elementProp>
  336. </collectionProp>
  337. </elementProp>
  338. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  339. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  340. <stringProp name="HTTPSampler.protocol"></stringProp>
  341. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  342. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  343. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  344. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  345. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  346. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  347. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  348. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  349. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  350. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  351. </HTTPSamplerProxy>
  352. <hashTree>
  353. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  354. <collectionProp name="Asserion.test_strings">
  355. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  356. </collectionProp>
  357. <stringProp name="Assertion.custom_message"></stringProp>
  358. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  359. <boolProp name="Assertion.assume_success">false</boolProp>
  360. <intProp name="Assertion.test_type">16</intProp>
  361. </ResponseAssertion>
  362. <hashTree/>
  363. </hashTree>
  364. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  365. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  366. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  367. <collectionProp name="Arguments.arguments">
  368. <elementProp name="" elementType="HTTPArgument">
  369. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  370. <stringProp name="Argument.value"></stringProp>
  371. <stringProp name="Argument.metadata">=</stringProp>
  372. </elementProp>
  373. </collectionProp>
  374. </elementProp>
  375. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  376. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  377. <stringProp name="HTTPSampler.protocol"></stringProp>
  378. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  379. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  380. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  381. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  382. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  383. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  384. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  385. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  386. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  387. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  388. </HTTPSamplerProxy>
  389. <hashTree>
  390. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  391. <collectionProp name="Asserion.test_strings">
  392. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  393. </collectionProp>
  394. <stringProp name="Assertion.custom_message"></stringProp>
  395. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  396. <boolProp name="Assertion.assume_success">false</boolProp>
  397. <intProp name="Assertion.test_type">16</intProp>
  398. </ResponseAssertion>
  399. <hashTree/>
  400. </hashTree>
  401. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  402. <stringProp name="ConstantTimer.delay">500</stringProp>
  403. </ConstantTimer>
  404. <hashTree/>
  405. </hashTree>
  406. </hashTree>
  407. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  408. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  409. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  410. <boolProp name="LoopController.continue_forever">false</boolProp>
  411. <stringProp name="LoopController.loops">6</stringProp>
  412. </elementProp>
  413. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  414. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  415. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  416. <stringProp name="ThreadGroup.duration"></stringProp>
  417. <stringProp name="ThreadGroup.delay"></stringProp>
  418. </ThreadGroup>
  419. <hashTree>
  420. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  421. <boolProp name="ResultCollector.error_logging">false</boolProp>
  422. <objProp>
  423. <name>saveConfig</name>
  424. <value class="SampleSaveConfiguration">
  425. <time>true</time>
  426. <latency>true</latency>
  427. <timestamp>true</timestamp>
  428. <success>true</success>
  429. <label>true</label>
  430. <code>true</code>
  431. <message>true</message>
  432. <threadName>true</threadName>
  433. <dataType>true</dataType>
  434. <encoding>false</encoding>
  435. <assertions>true</assertions>
  436. <subresults>true</subresults>
  437. <responseData>false</responseData>
  438. <samplerData>false</samplerData>
  439. <xml>false</xml>
  440. <fieldNames>true</fieldNames>
  441. <responseHeaders>false</responseHeaders>
  442. <requestHeaders>false</requestHeaders>
  443. <responseDataOnError>false</responseDataOnError>
  444. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  445. <assertionsResultsToSave>0</assertionsResultsToSave>
  446. <bytes>true</bytes>
  447. <sentBytes>true</sentBytes>
  448. <threadCounts>true</threadCounts>
  449. <idleTime>true</idleTime>
  450. <connectTime>true</connectTime>
  451. </value>
  452. </objProp>
  453. <stringProp name="filename"></stringProp>
  454. </ResultCollector>
  455. <hashTree/>
  456. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  457. <hashTree>
  458. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  459. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  460. <stringProp name="mqtt.port">1883</stringProp>
  461. <stringProp name="mqtt.version">3.1</stringProp>
  462. <stringProp name="mqtt.conn_timeout">10</stringProp>
  463. <boolProp name="mqtt.private_protocol">false</boolProp>
  464. <stringProp name="mqtt.listener_timeout">10</stringProp>
  465. <stringProp name="mqtt.protocol">TCP</stringProp>
  466. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  467. <stringProp name="mqtt.keystore_file_path"></stringProp>
  468. <stringProp name="mqtt.keystore_password"></stringProp>
  469. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  470. <stringProp name="mqtt.clientcert_password"></stringProp>
  471. <stringProp name="mqtt.user_name"></stringProp>
  472. <stringProp name="mqtt.password"></stringProp>
  473. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  474. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  475. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  476. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  477. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  478. </net.xmeter.samplers.ConnectSampler>
  479. <hashTree/>
  480. </hashTree>
  481. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  482. <stringProp name="mqtt.topic_name">devices/result</stringProp>
  483. <stringProp name="mqtt.qos_level">0</stringProp>
  484. <boolProp name="mqtt.add_timestamp">false</boolProp>
  485. <boolProp name="mqtt.debug_response">true</boolProp>
  486. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  487. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  488. </net.xmeter.samplers.SubSampler>
  489. <hashTree>
  490. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="temperature Assertion" enabled="true">
  491. <stringProp name="JSON_PATH">$[0].temperature</stringProp>
  492. <stringProp name="EXPECTED_VALUE">${temperature}</stringProp>
  493. <boolProp name="JSONVALIDATION">true</boolProp>
  494. <boolProp name="EXPECT_NULL">false</boolProp>
  495. <boolProp name="INVERT">false</boolProp>
  496. <boolProp name="ISREGEX">false</boolProp>
  497. </JSONPathAssertion>
  498. <hashTree/>
  499. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="humidity Assertion" enabled="true">
  500. <stringProp name="JSON_PATH">$[0].humidity</stringProp>
  501. <stringProp name="EXPECTED_VALUE">${humidity}</stringProp>
  502. <boolProp name="JSONVALIDATION">true</boolProp>
  503. <boolProp name="EXPECT_NULL">false</boolProp>
  504. <boolProp name="INVERT">false</boolProp>
  505. <boolProp name="ISREGEX">false</boolProp>
  506. </JSONPathAssertion>
  507. <hashTree/>
  508. </hashTree>
  509. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  510. <stringProp name="delimiter">,</stringProp>
  511. <stringProp name="fileEncoding"></stringProp>
  512. <stringProp name="filename">select_condition_iot_data.txt</stringProp>
  513. <boolProp name="ignoreFirstLine">false</boolProp>
  514. <boolProp name="quotedData">false</boolProp>
  515. <boolProp name="recycle">true</boolProp>
  516. <stringProp name="shareMode">shareMode.thread</stringProp>
  517. <boolProp name="stopThread">false</boolProp>
  518. <stringProp name="variableNames">device_id,temperature,humidity</stringProp>
  519. </CSVDataSet>
  520. <hashTree/>
  521. </hashTree>
  522. </hashTree>
  523. </hashTree>
  524. </jmeterTestPlan>