select_all_rule.jmx 30 KB

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