change_stream_rule.jmx 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707
  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">Change the stream definition for rule</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="1stRun" 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. <stringProp name="TestPlan.comments">The connections</stringProp>
  110. </net.xmeter.samplers.ConnectSampler>
  111. <hashTree/>
  112. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateStream" enabled="true">
  113. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  114. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  115. <collectionProp name="Arguments.arguments">
  116. <elementProp name="" elementType="HTTPArgument">
  117. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  118. <stringProp name="Argument.value">{&#xd;
  119. &quot;sql&quot; : &quot;create stream demo (temperature float, light string) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;devices/+/messages\&quot; )&quot;&#xd;
  120. }</stringProp>
  121. <stringProp name="Argument.metadata">=</stringProp>
  122. </elementProp>
  123. </collectionProp>
  124. </elementProp>
  125. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  126. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  127. <stringProp name="HTTPSampler.protocol"></stringProp>
  128. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  129. <stringProp name="HTTPSampler.path">/streams</stringProp>
  130. <stringProp name="HTTPSampler.method">POST</stringProp>
  131. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  132. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  133. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  134. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  135. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  136. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  137. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  138. </HTTPSamplerProxy>
  139. <hashTree>
  140. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  141. <collectionProp name="Asserion.test_strings">
  142. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  143. </collectionProp>
  144. <stringProp name="Assertion.custom_message"></stringProp>
  145. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  146. <boolProp name="Assertion.assume_success">true</boolProp>
  147. <intProp name="Assertion.test_type">16</intProp>
  148. </ResponseAssertion>
  149. <hashTree/>
  150. </hashTree>
  151. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateRule" enabled="true">
  152. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  153. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  154. <collectionProp name="Arguments.arguments">
  155. <elementProp name="" elementType="HTTPArgument">
  156. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  157. <stringProp name="Argument.value">{&#xd;
  158. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  159. &quot;sql&quot;: &quot;SELECT light FROM demo&quot;,&#xd;
  160. &quot;actions&quot;: [&#xd;
  161. {&#xd;
  162. &quot;mqtt&quot;: {&#xd;
  163. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  164. &quot;topic&quot;: &quot;devices/result&quot;,&#xd;
  165. &quot;qos&quot;: 1,&#xd;
  166. &quot;clientId&quot;: &quot;demo_001&quot;&#xd;
  167. }&#xd;
  168. }&#xd;
  169. ]&#xd;
  170. }</stringProp>
  171. <stringProp name="Argument.metadata">=</stringProp>
  172. </elementProp>
  173. </collectionProp>
  174. </elementProp>
  175. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  176. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  177. <stringProp name="HTTPSampler.protocol"></stringProp>
  178. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  179. <stringProp name="HTTPSampler.path">/rules</stringProp>
  180. <stringProp name="HTTPSampler.method">POST</stringProp>
  181. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  182. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  183. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  184. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  185. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  186. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  187. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  188. </HTTPSamplerProxy>
  189. <hashTree>
  190. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  191. <collectionProp name="Asserion.test_strings">
  192. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  193. </collectionProp>
  194. <stringProp name="Assertion.custom_message"></stringProp>
  195. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  196. <boolProp name="Assertion.assume_success">true</boolProp>
  197. <intProp name="Assertion.test_type">16</intProp>
  198. </ResponseAssertion>
  199. <hashTree/>
  200. </hashTree>
  201. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GetRuleStatus" enabled="true">
  202. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  203. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  204. <collectionProp name="Arguments.arguments">
  205. <elementProp name="" elementType="HTTPArgument">
  206. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  207. <stringProp name="Argument.value"></stringProp>
  208. <stringProp name="Argument.metadata">=</stringProp>
  209. </elementProp>
  210. </collectionProp>
  211. </elementProp>
  212. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  213. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  214. <stringProp name="HTTPSampler.protocol"></stringProp>
  215. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  216. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  217. <stringProp name="HTTPSampler.method">GET</stringProp>
  218. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  219. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  220. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  221. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  222. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  223. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  224. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  225. </HTTPSamplerProxy>
  226. <hashTree>
  227. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  228. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  229. <stringProp name="EXPECTED_VALUE">0</stringProp>
  230. <boolProp name="JSONVALIDATION">true</boolProp>
  231. <boolProp name="EXPECT_NULL">false</boolProp>
  232. <boolProp name="INVERT">false</boolProp>
  233. <boolProp name="ISREGEX">false</boolProp>
  234. </JSONPathAssertion>
  235. <hashTree/>
  236. </hashTree>
  237. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_1" enabled="true">
  238. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  239. <stringProp name="mqtt.qos_level">0</stringProp>
  240. <boolProp name="mqtt.add_timestamp">false</boolProp>
  241. <stringProp name="mqtt.message_type">String</stringProp>
  242. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  243. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,100,)}, &quot;humidity&quot; : ${__Random(1,100,)}}</stringProp>
  244. </net.xmeter.samplers.PubSampler>
  245. <hashTree/>
  246. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GetRuleStatus" enabled="true">
  247. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  248. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  249. <collectionProp name="Arguments.arguments">
  250. <elementProp name="" elementType="HTTPArgument">
  251. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  252. <stringProp name="Argument.value"></stringProp>
  253. <stringProp name="Argument.metadata">=</stringProp>
  254. </elementProp>
  255. </collectionProp>
  256. </elementProp>
  257. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  258. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  259. <stringProp name="HTTPSampler.protocol"></stringProp>
  260. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  261. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  262. <stringProp name="HTTPSampler.method">GET</stringProp>
  263. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  264. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  265. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  266. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  267. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  268. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  269. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  270. </HTTPSamplerProxy>
  271. <hashTree>
  272. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  273. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  274. <stringProp name="EXPECTED_VALUE">1</stringProp>
  275. <boolProp name="JSONVALIDATION">true</boolProp>
  276. <boolProp name="EXPECT_NULL">false</boolProp>
  277. <boolProp name="INVERT">false</boolProp>
  278. <boolProp name="ISREGEX">false</boolProp>
  279. </JSONPathAssertion>
  280. <hashTree/>
  281. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  282. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  283. <stringProp name="EXPECTED_VALUE">1</stringProp>
  284. <boolProp name="JSONVALIDATION">true</boolProp>
  285. <boolProp name="EXPECT_NULL">false</boolProp>
  286. <boolProp name="INVERT">false</boolProp>
  287. <boolProp name="ISREGEX">false</boolProp>
  288. </JSONPathAssertion>
  289. <hashTree/>
  290. </hashTree>
  291. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="DropStream" enabled="true">
  292. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  293. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  294. <collectionProp name="Arguments.arguments">
  295. <elementProp name="" elementType="HTTPArgument">
  296. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  297. <stringProp name="Argument.value"></stringProp>
  298. <stringProp name="Argument.metadata">=</stringProp>
  299. </elementProp>
  300. </collectionProp>
  301. </elementProp>
  302. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  303. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  304. <stringProp name="HTTPSampler.protocol"></stringProp>
  305. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  306. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  307. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  308. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  309. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  310. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  311. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  312. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  313. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  314. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  315. </HTTPSamplerProxy>
  316. <hashTree>
  317. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  318. <collectionProp name="Asserion.test_strings">
  319. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  320. </collectionProp>
  321. <stringProp name="Assertion.custom_message"></stringProp>
  322. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  323. <boolProp name="Assertion.assume_success">false</boolProp>
  324. <intProp name="Assertion.test_type">16</intProp>
  325. </ResponseAssertion>
  326. <hashTree/>
  327. </hashTree>
  328. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateStream" enabled="true">
  329. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  330. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  331. <collectionProp name="Arguments.arguments">
  332. <elementProp name="" elementType="HTTPArgument">
  333. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  334. <stringProp name="Argument.value">{&#xd;
  335. &quot;sql&quot; : &quot;create stream demo (temperature float, humidity bigint, light bigint) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;devices/+/messages\&quot; )&quot;&#xd;
  336. }</stringProp>
  337. <stringProp name="Argument.metadata">=</stringProp>
  338. </elementProp>
  339. </collectionProp>
  340. </elementProp>
  341. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  342. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  343. <stringProp name="HTTPSampler.protocol"></stringProp>
  344. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  345. <stringProp name="HTTPSampler.path">/streams</stringProp>
  346. <stringProp name="HTTPSampler.method">POST</stringProp>
  347. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  348. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  349. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  350. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  351. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  352. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  353. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  354. </HTTPSamplerProxy>
  355. <hashTree>
  356. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  357. <collectionProp name="Asserion.test_strings">
  358. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  359. </collectionProp>
  360. <stringProp name="Assertion.custom_message"></stringProp>
  361. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  362. <boolProp name="Assertion.assume_success">true</boolProp>
  363. <intProp name="Assertion.test_type">16</intProp>
  364. </ResponseAssertion>
  365. <hashTree/>
  366. </hashTree>
  367. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  368. <stringProp name="ConstantTimer.delay">500</stringProp>
  369. </ConstantTimer>
  370. <hashTree/>
  371. </hashTree>
  372. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="RedefineStreamAndRun" enabled="true">
  373. <boolProp name="TransactionController.includeTimers">false</boolProp>
  374. <boolProp name="TransactionController.parent">false</boolProp>
  375. </TransactionController>
  376. <hashTree>
  377. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="DropStream" enabled="true">
  378. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  379. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  380. <collectionProp name="Arguments.arguments">
  381. <elementProp name="" elementType="HTTPArgument">
  382. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  383. <stringProp name="Argument.value"></stringProp>
  384. <stringProp name="Argument.metadata">=</stringProp>
  385. </elementProp>
  386. </collectionProp>
  387. </elementProp>
  388. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  389. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  390. <stringProp name="HTTPSampler.protocol"></stringProp>
  391. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  392. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  393. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  394. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  395. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  396. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  397. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  398. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  399. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  400. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  401. </HTTPSamplerProxy>
  402. <hashTree>
  403. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  404. <collectionProp name="Asserion.test_strings">
  405. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  406. </collectionProp>
  407. <stringProp name="Assertion.custom_message"></stringProp>
  408. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  409. <boolProp name="Assertion.assume_success">false</boolProp>
  410. <intProp name="Assertion.test_type">16</intProp>
  411. </ResponseAssertion>
  412. <hashTree/>
  413. </hashTree>
  414. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateStream" enabled="true">
  415. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  416. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  417. <collectionProp name="Arguments.arguments">
  418. <elementProp name="" elementType="HTTPArgument">
  419. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  420. <stringProp name="Argument.value">{&#xd;
  421. &quot;sql&quot; : &quot;create stream demo (temperature float, humidity bigint, light bigint) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;devices/+/messages\&quot; )&quot;&#xd;
  422. }</stringProp>
  423. <stringProp name="Argument.metadata">=</stringProp>
  424. </elementProp>
  425. </collectionProp>
  426. </elementProp>
  427. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  428. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  429. <stringProp name="HTTPSampler.protocol"></stringProp>
  430. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  431. <stringProp name="HTTPSampler.path">/streams</stringProp>
  432. <stringProp name="HTTPSampler.method">POST</stringProp>
  433. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  434. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  435. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  436. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  437. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  438. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  439. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  440. </HTTPSamplerProxy>
  441. <hashTree>
  442. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  443. <collectionProp name="Asserion.test_strings">
  444. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  445. </collectionProp>
  446. <stringProp name="Assertion.custom_message"></stringProp>
  447. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  448. <boolProp name="Assertion.assume_success">true</boolProp>
  449. <intProp name="Assertion.test_type">16</intProp>
  450. </ResponseAssertion>
  451. <hashTree/>
  452. </hashTree>
  453. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_2" enabled="true">
  454. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  455. <stringProp name="mqtt.qos_level">0</stringProp>
  456. <boolProp name="mqtt.add_timestamp">false</boolProp>
  457. <stringProp name="mqtt.message_type">String</stringProp>
  458. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  459. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,100,)}, &quot;humidity&quot; : ${__Random(1,100,)}, &quot;light&quot; : ${__Random(1,100,)}}</stringProp>
  460. </net.xmeter.samplers.PubSampler>
  461. <hashTree/>
  462. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  463. <stringProp name="ConstantTimer.delay">500</stringProp>
  464. </ConstantTimer>
  465. <hashTree/>
  466. </hashTree>
  467. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="RestartRuleAndRun" enabled="true">
  468. <boolProp name="TransactionController.includeTimers">false</boolProp>
  469. <boolProp name="TransactionController.parent">false</boolProp>
  470. </TransactionController>
  471. <hashTree>
  472. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="RestartRule" enabled="true">
  473. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  474. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  475. <collectionProp name="Arguments.arguments">
  476. <elementProp name="" elementType="HTTPArgument">
  477. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  478. <stringProp name="Argument.value"></stringProp>
  479. <stringProp name="Argument.metadata">=</stringProp>
  480. </elementProp>
  481. </collectionProp>
  482. </elementProp>
  483. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  484. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  485. <stringProp name="HTTPSampler.protocol"></stringProp>
  486. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  487. <stringProp name="HTTPSampler.path">/rules/rule1/restart</stringProp>
  488. <stringProp name="HTTPSampler.method">POST</stringProp>
  489. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  490. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  491. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  492. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  493. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  494. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  495. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  496. </HTTPSamplerProxy>
  497. <hashTree>
  498. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  499. <collectionProp name="Asserion.test_strings">
  500. <stringProp name="-167686328">Rule rule1 was restarted</stringProp>
  501. </collectionProp>
  502. <stringProp name="Assertion.custom_message"></stringProp>
  503. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  504. <boolProp name="Assertion.assume_success">false</boolProp>
  505. <intProp name="Assertion.test_type">16</intProp>
  506. </ResponseAssertion>
  507. <hashTree/>
  508. </hashTree>
  509. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_3" enabled="true">
  510. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  511. <stringProp name="mqtt.qos_level">0</stringProp>
  512. <boolProp name="mqtt.add_timestamp">false</boolProp>
  513. <stringProp name="mqtt.message_type">String</stringProp>
  514. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  515. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,100,)}, &quot;humidity&quot; : ${__Random(1,100,)}, &quot;light&quot; : ${__Random(1,100,)}}</stringProp>
  516. </net.xmeter.samplers.PubSampler>
  517. <hashTree/>
  518. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  519. <stringProp name="ConstantTimer.delay">500</stringProp>
  520. </ConstantTimer>
  521. <hashTree/>
  522. </hashTree>
  523. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="DropStream" enabled="true">
  524. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  525. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  526. <collectionProp name="Arguments.arguments">
  527. <elementProp name="" elementType="HTTPArgument">
  528. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  529. <stringProp name="Argument.value"></stringProp>
  530. <stringProp name="Argument.metadata">=</stringProp>
  531. </elementProp>
  532. </collectionProp>
  533. </elementProp>
  534. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  535. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  536. <stringProp name="HTTPSampler.protocol"></stringProp>
  537. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  538. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  539. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  540. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  541. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  542. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  543. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  544. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  545. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  546. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  547. </HTTPSamplerProxy>
  548. <hashTree>
  549. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  550. <collectionProp name="Asserion.test_strings">
  551. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  552. </collectionProp>
  553. <stringProp name="Assertion.custom_message"></stringProp>
  554. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  555. <boolProp name="Assertion.assume_success">false</boolProp>
  556. <intProp name="Assertion.test_type">16</intProp>
  557. </ResponseAssertion>
  558. <hashTree/>
  559. </hashTree>
  560. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="DropRule" enabled="true">
  561. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  562. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  563. <collectionProp name="Arguments.arguments">
  564. <elementProp name="" elementType="HTTPArgument">
  565. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  566. <stringProp name="Argument.value"></stringProp>
  567. <stringProp name="Argument.metadata">=</stringProp>
  568. </elementProp>
  569. </collectionProp>
  570. </elementProp>
  571. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  572. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  573. <stringProp name="HTTPSampler.protocol"></stringProp>
  574. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  575. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  576. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  577. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  578. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  579. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  580. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  581. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  582. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  583. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  584. </HTTPSamplerProxy>
  585. <hashTree>
  586. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  587. <collectionProp name="Asserion.test_strings">
  588. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  589. </collectionProp>
  590. <stringProp name="Assertion.custom_message"></stringProp>
  591. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  592. <boolProp name="Assertion.assume_success">false</boolProp>
  593. <intProp name="Assertion.test_type">16</intProp>
  594. </ResponseAssertion>
  595. <hashTree/>
  596. </hashTree>
  597. </hashTree>
  598. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  599. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  600. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  601. <boolProp name="LoopController.continue_forever">false</boolProp>
  602. <stringProp name="LoopController.loops">3</stringProp>
  603. </elementProp>
  604. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  605. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  606. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  607. <stringProp name="ThreadGroup.duration"></stringProp>
  608. <stringProp name="ThreadGroup.delay"></stringProp>
  609. </ThreadGroup>
  610. <hashTree>
  611. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  612. <stringProp name="filename">change_stream_rule.txt</stringProp>
  613. <stringProp name="fileEncoding"></stringProp>
  614. <stringProp name="variableNames">result</stringProp>
  615. <boolProp name="ignoreFirstLine">false</boolProp>
  616. <stringProp name="delimiter">,</stringProp>
  617. <boolProp name="quotedData">false</boolProp>
  618. <boolProp name="recycle">true</boolProp>
  619. <boolProp name="stopThread">false</boolProp>
  620. <stringProp name="shareMode">shareMode.all</stringProp>
  621. </CSVDataSet>
  622. <hashTree/>
  623. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  624. <boolProp name="ResultCollector.error_logging">false</boolProp>
  625. <objProp>
  626. <name>saveConfig</name>
  627. <value class="SampleSaveConfiguration">
  628. <time>true</time>
  629. <latency>true</latency>
  630. <timestamp>true</timestamp>
  631. <success>true</success>
  632. <label>true</label>
  633. <code>true</code>
  634. <message>true</message>
  635. <threadName>true</threadName>
  636. <dataType>true</dataType>
  637. <encoding>false</encoding>
  638. <assertions>true</assertions>
  639. <subresults>true</subresults>
  640. <responseData>false</responseData>
  641. <samplerData>false</samplerData>
  642. <xml>false</xml>
  643. <fieldNames>true</fieldNames>
  644. <responseHeaders>false</responseHeaders>
  645. <requestHeaders>false</requestHeaders>
  646. <responseDataOnError>false</responseDataOnError>
  647. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  648. <assertionsResultsToSave>0</assertionsResultsToSave>
  649. <bytes>true</bytes>
  650. <sentBytes>true</sentBytes>
  651. <threadCounts>true</threadCounts>
  652. <idleTime>true</idleTime>
  653. <connectTime>true</connectTime>
  654. </value>
  655. </objProp>
  656. <stringProp name="filename"></stringProp>
  657. </ResultCollector>
  658. <hashTree/>
  659. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  660. <hashTree>
  661. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  662. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  663. <stringProp name="mqtt.port">1883</stringProp>
  664. <stringProp name="mqtt.version">3.1</stringProp>
  665. <stringProp name="mqtt.conn_timeout">10</stringProp>
  666. <boolProp name="mqtt.private_protocol">false</boolProp>
  667. <stringProp name="mqtt.listener_timeout">10</stringProp>
  668. <stringProp name="mqtt.protocol">TCP</stringProp>
  669. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  670. <stringProp name="mqtt.keystore_file_path"></stringProp>
  671. <stringProp name="mqtt.keystore_password"></stringProp>
  672. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  673. <stringProp name="mqtt.clientcert_password"></stringProp>
  674. <stringProp name="mqtt.user_name"></stringProp>
  675. <stringProp name="mqtt.password"></stringProp>
  676. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  677. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  678. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  679. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  680. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  681. </net.xmeter.samplers.ConnectSampler>
  682. <hashTree/>
  683. </hashTree>
  684. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  685. <stringProp name="mqtt.topic_name">devices/result</stringProp>
  686. <stringProp name="mqtt.qos_level">0</stringProp>
  687. <boolProp name="mqtt.add_timestamp">false</boolProp>
  688. <boolProp name="mqtt.debug_response">true</boolProp>
  689. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  690. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  691. </net.xmeter.samplers.SubSampler>
  692. <hashTree>
  693. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  694. <collectionProp name="Asserion.test_strings">
  695. <stringProp name="71001929">${result}</stringProp>
  696. </collectionProp>
  697. <stringProp name="Assertion.custom_message"></stringProp>
  698. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  699. <boolProp name="Assertion.assume_success">false</boolProp>
  700. <intProp name="Assertion.test_type">16</intProp>
  701. </ResponseAssertion>
  702. <hashTree/>
  703. </hashTree>
  704. </hashTree>
  705. </hashTree>
  706. </hashTree>
  707. </jmeterTestPlan>