select_all_rule.jmx 30 KB

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