change_stream_rule.jmx 43 KB

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