change_rule_status.jmx 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Copyright 2021 EMQ Technologies Co., Ltd.
  4. ~
  5. ~ Licensed under the Apache License, Version 2.0 (the "License");
  6. ~ you may not use this file except in compliance with the License.
  7. ~ You may obtain a copy of the License at
  8. ~
  9. ~ http://www.apache.org/licenses/LICENSE-2.0
  10. ~
  11. ~ Unless required by applicable law or agreed to in writing, software
  12. ~ distributed under the License is distributed on an "AS IS" BASIS,
  13. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ~ See the License for the specific language governing permissions and
  15. ~ limitations under the License.
  16. -->
  17. <jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414">
  18. <hashTree>
  19. <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
  20. <stringProp name="TestPlan.comments"></stringProp>
  21. <boolProp name="TestPlan.functional_mode">false</boolProp>
  22. <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
  23. <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
  24. <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  25. <collectionProp name="Arguments.arguments"/>
  26. </elementProp>
  27. <stringProp name="TestPlan.user_define_classpath"></stringProp>
  28. </TestPlan>
  29. <hashTree>
  30. <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  31. <collectionProp name="Arguments.arguments">
  32. <elementProp name="srv" elementType="Argument">
  33. <stringProp name="Argument.name">srv</stringProp>
  34. <stringProp name="Argument.value">127.0.0.1</stringProp>
  35. <stringProp name="Argument.metadata">=</stringProp>
  36. </elementProp>
  37. <elementProp name="rest_port" elementType="Argument">
  38. <stringProp name="Argument.name">rest_port</stringProp>
  39. <stringProp name="Argument.value">9081</stringProp>
  40. <stringProp name="Argument.metadata">=</stringProp>
  41. </elementProp>
  42. <elementProp name="mqtt_srv" elementType="Argument">
  43. <stringProp name="Argument.name">mqtt_srv</stringProp>
  44. <stringProp name="Argument.value">127.0.0.1</stringProp>
  45. <stringProp name="Argument.metadata">=</stringProp>
  46. </elementProp>
  47. </collectionProp>
  48. </Arguments>
  49. <hashTree/>
  50. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Rules" enabled="true">
  51. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  52. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  53. <boolProp name="LoopController.continue_forever">false</boolProp>
  54. <stringProp name="LoopController.loops">1</stringProp>
  55. </elementProp>
  56. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  57. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  58. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  59. <stringProp name="ThreadGroup.duration"></stringProp>
  60. <stringProp name="ThreadGroup.delay"></stringProp>
  61. </ThreadGroup>
  62. <hashTree>
  63. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  64. <boolProp name="ResultCollector.error_logging">false</boolProp>
  65. <objProp>
  66. <name>saveConfig</name>
  67. <value class="SampleSaveConfiguration">
  68. <time>true</time>
  69. <latency>true</latency>
  70. <timestamp>true</timestamp>
  71. <success>true</success>
  72. <label>true</label>
  73. <code>true</code>
  74. <message>true</message>
  75. <threadName>true</threadName>
  76. <dataType>true</dataType>
  77. <encoding>false</encoding>
  78. <assertions>true</assertions>
  79. <subresults>true</subresults>
  80. <responseData>false</responseData>
  81. <samplerData>false</samplerData>
  82. <xml>false</xml>
  83. <fieldNames>true</fieldNames>
  84. <responseHeaders>false</responseHeaders>
  85. <requestHeaders>false</requestHeaders>
  86. <responseDataOnError>false</responseDataOnError>
  87. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  88. <assertionsResultsToSave>0</assertionsResultsToSave>
  89. <bytes>true</bytes>
  90. <sentBytes>true</sentBytes>
  91. <threadCounts>true</threadCounts>
  92. <idleTime>true</idleTime>
  93. <connectTime>true</connectTime>
  94. </value>
  95. </objProp>
  96. <stringProp name="filename"></stringProp>
  97. </ResultCollector>
  98. <hashTree/>
  99. <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. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="CreateStreamAndRule" enabled="true">
  122. <boolProp name="TransactionController.includeTimers">false</boolProp>
  123. <boolProp name="TransactionController.parent">false</boolProp>
  124. </TransactionController>
  125. <hashTree>
  126. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStream" enabled="true">
  127. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  128. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  129. <collectionProp name="Arguments.arguments">
  130. <elementProp name="" elementType="HTTPArgument">
  131. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  132. <stringProp name="Argument.value">{&#xd;
  133. &quot;sql&quot; : &quot;create stream demo (temperature float, humidity bigint) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;devices/+/messages\&quot; )&quot;&#xd;
  134. }</stringProp>
  135. <stringProp name="Argument.metadata">=</stringProp>
  136. </elementProp>
  137. </collectionProp>
  138. </elementProp>
  139. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  140. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  141. <stringProp name="HTTPSampler.protocol"></stringProp>
  142. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  143. <stringProp name="HTTPSampler.path">/streams</stringProp>
  144. <stringProp name="HTTPSampler.method">POST</stringProp>
  145. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  146. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  147. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  148. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  149. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  150. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  151. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  152. </HTTPSamplerProxy>
  153. <hashTree>
  154. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  155. <collectionProp name="Asserion.test_strings">
  156. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  157. </collectionProp>
  158. <stringProp name="Assertion.custom_message"></stringProp>
  159. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  160. <boolProp name="Assertion.assume_success">true</boolProp>
  161. <intProp name="Assertion.test_type">16</intProp>
  162. </ResponseAssertion>
  163. <hashTree/>
  164. </hashTree>
  165. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule" enabled="true">
  166. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  167. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  168. <collectionProp name="Arguments.arguments">
  169. <elementProp name="" elementType="HTTPArgument">
  170. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  171. <stringProp name="Argument.value">{&#xd;
  172. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  173. &quot;sql&quot;: &quot;SELECT * FROM demo&quot;,&#xd;
  174. &quot;actions&quot;: [&#xd;
  175. {&#xd;
  176. &quot;mqtt&quot;: {&#xd;
  177. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  178. &quot;topic&quot;: &quot;devices/result&quot;,&#xd;
  179. &quot;qos&quot;: 1,&#xd;
  180. &quot;clientId&quot;: &quot;demo_001&quot;&#xd;
  181. }&#xd;
  182. }&#xd;
  183. ]&#xd;
  184. }</stringProp>
  185. <stringProp name="Argument.metadata">=</stringProp>
  186. </elementProp>
  187. </collectionProp>
  188. </elementProp>
  189. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  190. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  191. <stringProp name="HTTPSampler.protocol"></stringProp>
  192. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  193. <stringProp name="HTTPSampler.path">/rules</stringProp>
  194. <stringProp name="HTTPSampler.method">POST</stringProp>
  195. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  196. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  197. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  198. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  199. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  200. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  201. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  202. </HTTPSamplerProxy>
  203. <hashTree>
  204. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  205. <collectionProp name="Asserion.test_strings">
  206. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  207. </collectionProp>
  208. <stringProp name="Assertion.custom_message"></stringProp>
  209. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  210. <boolProp name="Assertion.assume_success">true</boolProp>
  211. <intProp name="Assertion.test_type">16</intProp>
  212. </ResponseAssertion>
  213. <hashTree/>
  214. </hashTree>
  215. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StartRuleAlreadyStarted" enabled="true">
  216. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  217. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  218. <collectionProp name="Arguments.arguments">
  219. <elementProp name="" elementType="HTTPArgument">
  220. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  221. <stringProp name="Argument.value"></stringProp>
  222. <stringProp name="Argument.metadata">=</stringProp>
  223. </elementProp>
  224. </collectionProp>
  225. </elementProp>
  226. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  227. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  228. <stringProp name="HTTPSampler.protocol"></stringProp>
  229. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  230. <stringProp name="HTTPSampler.path">/rules/rule1/start</stringProp>
  231. <stringProp name="HTTPSampler.method">POST</stringProp>
  232. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  233. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  234. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  235. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  236. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  237. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  238. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  239. </HTTPSamplerProxy>
  240. <hashTree>
  241. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  242. <collectionProp name="Asserion.test_strings">
  243. <stringProp name="-652969125">Rule rule1 was started</stringProp>
  244. </collectionProp>
  245. <stringProp name="Assertion.custom_message"></stringProp>
  246. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  247. <boolProp name="Assertion.assume_success">true</boolProp>
  248. <intProp name="Assertion.test_type">16</intProp>
  249. </ResponseAssertion>
  250. <hashTree/>
  251. </hashTree>
  252. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  253. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  254. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  255. <collectionProp name="Arguments.arguments">
  256. <elementProp name="" elementType="HTTPArgument">
  257. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  258. <stringProp name="Argument.value"></stringProp>
  259. <stringProp name="Argument.metadata">=</stringProp>
  260. </elementProp>
  261. </collectionProp>
  262. </elementProp>
  263. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  264. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  265. <stringProp name="HTTPSampler.protocol"></stringProp>
  266. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  267. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  268. <stringProp name="HTTPSampler.method">GET</stringProp>
  269. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  270. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  271. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  272. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  273. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  274. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  275. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  276. </HTTPSamplerProxy>
  277. <hashTree>
  278. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  279. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  280. <stringProp name="EXPECTED_VALUE">0</stringProp>
  281. <boolProp name="JSONVALIDATION">true</boolProp>
  282. <boolProp name="EXPECT_NULL">false</boolProp>
  283. <boolProp name="INVERT">false</boolProp>
  284. <boolProp name="ISREGEX">false</boolProp>
  285. </JSONPathAssertion>
  286. <hashTree/>
  287. </hashTree>
  288. </hashTree>
  289. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="RunPubStopRule" enabled="true">
  290. <boolProp name="TransactionController.includeTimers">false</boolProp>
  291. <boolProp name="TransactionController.parent">false</boolProp>
  292. </TransactionController>
  293. <hashTree>
  294. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_1" enabled="true">
  295. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  296. <stringProp name="mqtt.qos_level">0</stringProp>
  297. <boolProp name="mqtt.add_timestamp">false</boolProp>
  298. <stringProp name="mqtt.message_type">String</stringProp>
  299. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  300. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,50,)}, &quot;humidity&quot; : ${__Random(1,80,)}}</stringProp>
  301. </net.xmeter.samplers.PubSampler>
  302. <hashTree/>
  303. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  304. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  305. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  306. <collectionProp name="Arguments.arguments">
  307. <elementProp name="" elementType="HTTPArgument">
  308. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  309. <stringProp name="Argument.value"></stringProp>
  310. <stringProp name="Argument.metadata">=</stringProp>
  311. </elementProp>
  312. </collectionProp>
  313. </elementProp>
  314. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  315. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  316. <stringProp name="HTTPSampler.protocol"></stringProp>
  317. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  318. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  319. <stringProp name="HTTPSampler.method">GET</stringProp>
  320. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  321. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  322. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  323. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  324. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  325. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  326. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  327. </HTTPSamplerProxy>
  328. <hashTree>
  329. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  330. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  331. <stringProp name="EXPECTED_VALUE">1</stringProp>
  332. <boolProp name="JSONVALIDATION">true</boolProp>
  333. <boolProp name="EXPECT_NULL">false</boolProp>
  334. <boolProp name="INVERT">false</boolProp>
  335. <boolProp name="ISREGEX">false</boolProp>
  336. </JSONPathAssertion>
  337. <hashTree/>
  338. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  339. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  340. <stringProp name="EXPECTED_VALUE">1</stringProp>
  341. <boolProp name="JSONVALIDATION">true</boolProp>
  342. <boolProp name="EXPECT_NULL">false</boolProp>
  343. <boolProp name="INVERT">false</boolProp>
  344. <boolProp name="ISREGEX">false</boolProp>
  345. </JSONPathAssertion>
  346. <hashTree/>
  347. </hashTree>
  348. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StopRule" enabled="true">
  349. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  350. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  351. <collectionProp name="Arguments.arguments">
  352. <elementProp name="" elementType="HTTPArgument">
  353. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  354. <stringProp name="Argument.value"></stringProp>
  355. <stringProp name="Argument.metadata">=</stringProp>
  356. </elementProp>
  357. </collectionProp>
  358. </elementProp>
  359. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  360. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  361. <stringProp name="HTTPSampler.protocol"></stringProp>
  362. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  363. <stringProp name="HTTPSampler.path">/rules/rule1/stop</stringProp>
  364. <stringProp name="HTTPSampler.method">POST</stringProp>
  365. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  366. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  367. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  368. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  369. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  370. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  371. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  372. </HTTPSamplerProxy>
  373. <hashTree>
  374. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  375. <collectionProp name="Asserion.test_strings">
  376. <stringProp name="1631635559">Rule rule1 was stopped.</stringProp>
  377. </collectionProp>
  378. <stringProp name="Assertion.custom_message"></stringProp>
  379. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  380. <boolProp name="Assertion.assume_success">true</boolProp>
  381. <intProp name="Assertion.test_type">16</intProp>
  382. </ResponseAssertion>
  383. <hashTree/>
  384. </hashTree>
  385. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  386. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  387. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  388. <collectionProp name="Arguments.arguments">
  389. <elementProp name="" elementType="HTTPArgument">
  390. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  391. <stringProp name="Argument.value"></stringProp>
  392. <stringProp name="Argument.metadata">=</stringProp>
  393. </elementProp>
  394. </collectionProp>
  395. </elementProp>
  396. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  397. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  398. <stringProp name="HTTPSampler.protocol"></stringProp>
  399. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  400. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  401. <stringProp name="HTTPSampler.method">GET</stringProp>
  402. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  403. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  404. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  405. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  406. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  407. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  408. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  409. </HTTPSamplerProxy>
  410. <hashTree>
  411. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  412. <collectionProp name="Asserion.test_strings">
  413. <stringProp name="1607612103">Stopped: canceled manually or by error.</stringProp>
  414. </collectionProp>
  415. <stringProp name="Assertion.custom_message"></stringProp>
  416. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  417. <boolProp name="Assertion.assume_success">false</boolProp>
  418. <intProp name="Assertion.test_type">16</intProp>
  419. </ResponseAssertion>
  420. <hashTree/>
  421. </hashTree>
  422. </hashTree>
  423. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="StartAndRun" enabled="true">
  424. <boolProp name="TransactionController.includeTimers">false</boolProp>
  425. <boolProp name="TransactionController.parent">false</boolProp>
  426. </TransactionController>
  427. <hashTree>
  428. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StartRule" enabled="true">
  429. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  430. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  431. <collectionProp name="Arguments.arguments">
  432. <elementProp name="" elementType="HTTPArgument">
  433. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  434. <stringProp name="Argument.value"></stringProp>
  435. <stringProp name="Argument.metadata">=</stringProp>
  436. </elementProp>
  437. </collectionProp>
  438. </elementProp>
  439. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  440. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  441. <stringProp name="HTTPSampler.protocol"></stringProp>
  442. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  443. <stringProp name="HTTPSampler.path">/rules/rule1/start</stringProp>
  444. <stringProp name="HTTPSampler.method">POST</stringProp>
  445. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  446. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  447. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  448. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  449. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  450. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  451. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  452. </HTTPSamplerProxy>
  453. <hashTree>
  454. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  455. <collectionProp name="Asserion.test_strings">
  456. <stringProp name="-652969125">Rule rule1 was started</stringProp>
  457. </collectionProp>
  458. <stringProp name="Assertion.custom_message"></stringProp>
  459. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  460. <boolProp name="Assertion.assume_success">true</boolProp>
  461. <intProp name="Assertion.test_type">16</intProp>
  462. </ResponseAssertion>
  463. <hashTree/>
  464. </hashTree>
  465. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_2" enabled="true">
  466. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  467. <stringProp name="mqtt.qos_level">0</stringProp>
  468. <boolProp name="mqtt.add_timestamp">false</boolProp>
  469. <stringProp name="mqtt.message_type">String</stringProp>
  470. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  471. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,50,)}, &quot;humidity&quot; : ${__Random(1,80,)}}</stringProp>
  472. </net.xmeter.samplers.PubSampler>
  473. <hashTree/>
  474. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_3" enabled="true">
  475. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  476. <stringProp name="mqtt.qos_level">0</stringProp>
  477. <boolProp name="mqtt.add_timestamp">false</boolProp>
  478. <stringProp name="mqtt.message_type">String</stringProp>
  479. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  480. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,50,)}, &quot;humidity&quot; : ${__Random(1,80,)}}</stringProp>
  481. </net.xmeter.samplers.PubSampler>
  482. <hashTree/>
  483. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  484. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  485. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  486. <collectionProp name="Arguments.arguments">
  487. <elementProp name="" elementType="HTTPArgument">
  488. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  489. <stringProp name="Argument.value"></stringProp>
  490. <stringProp name="Argument.metadata">=</stringProp>
  491. </elementProp>
  492. </collectionProp>
  493. </elementProp>
  494. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  495. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  496. <stringProp name="HTTPSampler.protocol"></stringProp>
  497. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  498. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  499. <stringProp name="HTTPSampler.method">GET</stringProp>
  500. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  501. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  502. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  503. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  504. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  505. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  506. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  507. </HTTPSamplerProxy>
  508. <hashTree>
  509. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  510. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  511. <stringProp name="EXPECTED_VALUE">2</stringProp>
  512. <boolProp name="JSONVALIDATION">true</boolProp>
  513. <boolProp name="EXPECT_NULL">false</boolProp>
  514. <boolProp name="INVERT">false</boolProp>
  515. <boolProp name="ISREGEX">false</boolProp>
  516. </JSONPathAssertion>
  517. <hashTree/>
  518. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  519. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  520. <stringProp name="EXPECTED_VALUE">2</stringProp>
  521. <boolProp name="JSONVALIDATION">true</boolProp>
  522. <boolProp name="EXPECT_NULL">false</boolProp>
  523. <boolProp name="INVERT">false</boolProp>
  524. <boolProp name="ISREGEX">false</boolProp>
  525. </JSONPathAssertion>
  526. <hashTree/>
  527. </hashTree>
  528. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StopRule" enabled="true">
  529. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  530. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  531. <collectionProp name="Arguments.arguments">
  532. <elementProp name="" elementType="HTTPArgument">
  533. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  534. <stringProp name="Argument.value"></stringProp>
  535. <stringProp name="Argument.metadata">=</stringProp>
  536. </elementProp>
  537. </collectionProp>
  538. </elementProp>
  539. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  540. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  541. <stringProp name="HTTPSampler.protocol"></stringProp>
  542. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  543. <stringProp name="HTTPSampler.path">/rules/rule1/stop</stringProp>
  544. <stringProp name="HTTPSampler.method">POST</stringProp>
  545. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  546. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  547. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  548. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  549. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  550. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  551. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  552. </HTTPSamplerProxy>
  553. <hashTree>
  554. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  555. <collectionProp name="Asserion.test_strings">
  556. <stringProp name="1631635559">Rule rule1 was stopped.</stringProp>
  557. </collectionProp>
  558. <stringProp name="Assertion.custom_message"></stringProp>
  559. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  560. <boolProp name="Assertion.assume_success">true</boolProp>
  561. <intProp name="Assertion.test_type">16</intProp>
  562. </ResponseAssertion>
  563. <hashTree/>
  564. </hashTree>
  565. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  566. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  567. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  568. <collectionProp name="Arguments.arguments">
  569. <elementProp name="" elementType="HTTPArgument">
  570. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  571. <stringProp name="Argument.value"></stringProp>
  572. <stringProp name="Argument.metadata">=</stringProp>
  573. </elementProp>
  574. </collectionProp>
  575. </elementProp>
  576. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  577. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  578. <stringProp name="HTTPSampler.protocol"></stringProp>
  579. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  580. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  581. <stringProp name="HTTPSampler.method">GET</stringProp>
  582. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  583. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  584. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  585. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  586. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  587. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  588. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  589. </HTTPSamplerProxy>
  590. <hashTree>
  591. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  592. <collectionProp name="Asserion.test_strings">
  593. <stringProp name="1607612103">Stopped: canceled manually or by error.</stringProp>
  594. </collectionProp>
  595. <stringProp name="Assertion.custom_message"></stringProp>
  596. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  597. <boolProp name="Assertion.assume_success">false</boolProp>
  598. <intProp name="Assertion.test_type">16</intProp>
  599. </ResponseAssertion>
  600. <hashTree/>
  601. </hashTree>
  602. </hashTree>
  603. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="RestartAndRun" enabled="true">
  604. <boolProp name="TransactionController.includeTimers">false</boolProp>
  605. <boolProp name="TransactionController.parent">false</boolProp>
  606. </TransactionController>
  607. <hashTree>
  608. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StartRule" enabled="true">
  609. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  610. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  611. <collectionProp name="Arguments.arguments">
  612. <elementProp name="" elementType="HTTPArgument">
  613. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  614. <stringProp name="Argument.value"></stringProp>
  615. <stringProp name="Argument.metadata">=</stringProp>
  616. </elementProp>
  617. </collectionProp>
  618. </elementProp>
  619. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  620. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  621. <stringProp name="HTTPSampler.protocol"></stringProp>
  622. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  623. <stringProp name="HTTPSampler.path">/rules/rule1/start</stringProp>
  624. <stringProp name="HTTPSampler.method">POST</stringProp>
  625. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  626. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  627. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  628. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  629. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  630. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  631. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  632. </HTTPSamplerProxy>
  633. <hashTree>
  634. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  635. <collectionProp name="Asserion.test_strings">
  636. <stringProp name="-652969125">Rule rule1 was started</stringProp>
  637. </collectionProp>
  638. <stringProp name="Assertion.custom_message"></stringProp>
  639. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  640. <boolProp name="Assertion.assume_success">true</boolProp>
  641. <intProp name="Assertion.test_type">16</intProp>
  642. </ResponseAssertion>
  643. <hashTree/>
  644. </hashTree>
  645. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_RestartRule" enabled="true">
  646. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  647. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  648. <collectionProp name="Arguments.arguments">
  649. <elementProp name="" elementType="HTTPArgument">
  650. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  651. <stringProp name="Argument.value"></stringProp>
  652. <stringProp name="Argument.metadata">=</stringProp>
  653. </elementProp>
  654. </collectionProp>
  655. </elementProp>
  656. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  657. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  658. <stringProp name="HTTPSampler.protocol"></stringProp>
  659. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  660. <stringProp name="HTTPSampler.path">/rules/rule1/restart</stringProp>
  661. <stringProp name="HTTPSampler.method">POST</stringProp>
  662. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  663. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  664. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  665. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  666. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  667. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  668. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  669. </HTTPSamplerProxy>
  670. <hashTree>
  671. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  672. <collectionProp name="Asserion.test_strings">
  673. <stringProp name="-167686328">Rule rule1 was restarted</stringProp>
  674. </collectionProp>
  675. <stringProp name="Assertion.custom_message"></stringProp>
  676. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  677. <boolProp name="Assertion.assume_success">true</boolProp>
  678. <intProp name="Assertion.test_type">16</intProp>
  679. </ResponseAssertion>
  680. <hashTree/>
  681. </hashTree>
  682. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  683. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  684. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  685. <collectionProp name="Arguments.arguments">
  686. <elementProp name="" elementType="HTTPArgument">
  687. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  688. <stringProp name="Argument.value"></stringProp>
  689. <stringProp name="Argument.metadata">=</stringProp>
  690. </elementProp>
  691. </collectionProp>
  692. </elementProp>
  693. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  694. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  695. <stringProp name="HTTPSampler.protocol"></stringProp>
  696. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  697. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  698. <stringProp name="HTTPSampler.method">GET</stringProp>
  699. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  700. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  701. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  702. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  703. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  704. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  705. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  706. </HTTPSamplerProxy>
  707. <hashTree>
  708. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  709. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  710. <stringProp name="EXPECTED_VALUE">0</stringProp>
  711. <boolProp name="JSONVALIDATION">true</boolProp>
  712. <boolProp name="EXPECT_NULL">false</boolProp>
  713. <boolProp name="INVERT">false</boolProp>
  714. <boolProp name="ISREGEX">false</boolProp>
  715. </JSONPathAssertion>
  716. <hashTree/>
  717. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  718. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  719. <stringProp name="EXPECTED_VALUE">0</stringProp>
  720. <boolProp name="JSONVALIDATION">true</boolProp>
  721. <boolProp name="EXPECT_NULL">false</boolProp>
  722. <boolProp name="INVERT">false</boolProp>
  723. <boolProp name="ISREGEX">false</boolProp>
  724. </JSONPathAssertion>
  725. <hashTree/>
  726. </hashTree>
  727. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_4" enabled="true">
  728. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  729. <stringProp name="mqtt.qos_level">0</stringProp>
  730. <boolProp name="mqtt.add_timestamp">false</boolProp>
  731. <stringProp name="mqtt.message_type">String</stringProp>
  732. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  733. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,50,)}, &quot;humidity&quot; : ${__Random(1,80,)}}</stringProp>
  734. </net.xmeter.samplers.PubSampler>
  735. <hashTree/>
  736. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  737. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  738. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  739. <collectionProp name="Arguments.arguments">
  740. <elementProp name="" elementType="HTTPArgument">
  741. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  742. <stringProp name="Argument.value"></stringProp>
  743. <stringProp name="Argument.metadata">=</stringProp>
  744. </elementProp>
  745. </collectionProp>
  746. </elementProp>
  747. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  748. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  749. <stringProp name="HTTPSampler.protocol"></stringProp>
  750. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  751. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  752. <stringProp name="HTTPSampler.method">GET</stringProp>
  753. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  754. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  755. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  756. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  757. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  758. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  759. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  760. </HTTPSamplerProxy>
  761. <hashTree>
  762. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  763. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  764. <stringProp name="EXPECTED_VALUE">1</stringProp>
  765. <boolProp name="JSONVALIDATION">true</boolProp>
  766. <boolProp name="EXPECT_NULL">false</boolProp>
  767. <boolProp name="INVERT">false</boolProp>
  768. <boolProp name="ISREGEX">false</boolProp>
  769. </JSONPathAssertion>
  770. <hashTree/>
  771. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  772. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  773. <stringProp name="EXPECTED_VALUE">1</stringProp>
  774. <boolProp name="JSONVALIDATION">true</boolProp>
  775. <boolProp name="EXPECT_NULL">false</boolProp>
  776. <boolProp name="INVERT">false</boolProp>
  777. <boolProp name="ISREGEX">false</boolProp>
  778. </JSONPathAssertion>
  779. <hashTree/>
  780. </hashTree>
  781. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StopRule" enabled="true">
  782. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  783. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  784. <collectionProp name="Arguments.arguments">
  785. <elementProp name="" elementType="HTTPArgument">
  786. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  787. <stringProp name="Argument.value"></stringProp>
  788. <stringProp name="Argument.metadata">=</stringProp>
  789. </elementProp>
  790. </collectionProp>
  791. </elementProp>
  792. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  793. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  794. <stringProp name="HTTPSampler.protocol"></stringProp>
  795. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  796. <stringProp name="HTTPSampler.path">/rules/rule1/stop</stringProp>
  797. <stringProp name="HTTPSampler.method">POST</stringProp>
  798. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  799. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  800. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  801. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  802. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  803. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  804. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  805. </HTTPSamplerProxy>
  806. <hashTree>
  807. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  808. <collectionProp name="Asserion.test_strings">
  809. <stringProp name="1631635559">Rule rule1 was stopped.</stringProp>
  810. </collectionProp>
  811. <stringProp name="Assertion.custom_message"></stringProp>
  812. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  813. <boolProp name="Assertion.assume_success">true</boolProp>
  814. <intProp name="Assertion.test_type">16</intProp>
  815. </ResponseAssertion>
  816. <hashTree/>
  817. </hashTree>
  818. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  819. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  820. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  821. <collectionProp name="Arguments.arguments">
  822. <elementProp name="" elementType="HTTPArgument">
  823. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  824. <stringProp name="Argument.value"></stringProp>
  825. <stringProp name="Argument.metadata">=</stringProp>
  826. </elementProp>
  827. </collectionProp>
  828. </elementProp>
  829. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  830. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  831. <stringProp name="HTTPSampler.protocol"></stringProp>
  832. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  833. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  834. <stringProp name="HTTPSampler.method">GET</stringProp>
  835. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  836. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  837. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  838. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  839. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  840. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  841. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  842. </HTTPSamplerProxy>
  843. <hashTree>
  844. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  845. <collectionProp name="Asserion.test_strings">
  846. <stringProp name="1607612103">Stopped: canceled manually or by error.</stringProp>
  847. </collectionProp>
  848. <stringProp name="Assertion.custom_message"></stringProp>
  849. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  850. <boolProp name="Assertion.assume_success">false</boolProp>
  851. <intProp name="Assertion.test_type">16</intProp>
  852. </ResponseAssertion>
  853. <hashTree/>
  854. </hashTree>
  855. </hashTree>
  856. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Drop" enabled="true">
  857. <boolProp name="TransactionController.includeTimers">false</boolProp>
  858. <boolProp name="TransactionController.parent">false</boolProp>
  859. </TransactionController>
  860. <hashTree>
  861. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  862. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  863. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  864. <collectionProp name="Arguments.arguments">
  865. <elementProp name="" elementType="HTTPArgument">
  866. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  867. <stringProp name="Argument.value"></stringProp>
  868. <stringProp name="Argument.metadata">=</stringProp>
  869. </elementProp>
  870. </collectionProp>
  871. </elementProp>
  872. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  873. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  874. <stringProp name="HTTPSampler.protocol"></stringProp>
  875. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  876. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  877. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  878. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  879. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  880. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  881. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  882. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  883. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  884. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  885. </HTTPSamplerProxy>
  886. <hashTree>
  887. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  888. <collectionProp name="Asserion.test_strings">
  889. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  890. </collectionProp>
  891. <stringProp name="Assertion.custom_message"></stringProp>
  892. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  893. <boolProp name="Assertion.assume_success">false</boolProp>
  894. <intProp name="Assertion.test_type">16</intProp>
  895. </ResponseAssertion>
  896. <hashTree/>
  897. </hashTree>
  898. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  899. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  900. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  901. <collectionProp name="Arguments.arguments">
  902. <elementProp name="" elementType="HTTPArgument">
  903. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  904. <stringProp name="Argument.value"></stringProp>
  905. <stringProp name="Argument.metadata">=</stringProp>
  906. </elementProp>
  907. </collectionProp>
  908. </elementProp>
  909. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  910. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  911. <stringProp name="HTTPSampler.protocol"></stringProp>
  912. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  913. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  914. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  915. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  916. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  917. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  918. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  919. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  920. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  921. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  922. </HTTPSamplerProxy>
  923. <hashTree>
  924. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  925. <collectionProp name="Asserion.test_strings">
  926. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  927. </collectionProp>
  928. <stringProp name="Assertion.custom_message"></stringProp>
  929. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  930. <boolProp name="Assertion.assume_success">false</boolProp>
  931. <intProp name="Assertion.test_type">16</intProp>
  932. </ResponseAssertion>
  933. <hashTree/>
  934. </hashTree>
  935. </hashTree>
  936. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  937. <stringProp name="ConstantTimer.delay">500</stringProp>
  938. </ConstantTimer>
  939. <hashTree/>
  940. </hashTree>
  941. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  942. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  943. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  944. <boolProp name="LoopController.continue_forever">false</boolProp>
  945. <stringProp name="LoopController.loops">4</stringProp>
  946. </elementProp>
  947. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  948. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  949. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  950. <stringProp name="ThreadGroup.duration"></stringProp>
  951. <stringProp name="ThreadGroup.delay"></stringProp>
  952. </ThreadGroup>
  953. <hashTree>
  954. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  955. <boolProp name="ResultCollector.error_logging">false</boolProp>
  956. <objProp>
  957. <name>saveConfig</name>
  958. <value class="SampleSaveConfiguration">
  959. <time>true</time>
  960. <latency>true</latency>
  961. <timestamp>true</timestamp>
  962. <success>true</success>
  963. <label>true</label>
  964. <code>true</code>
  965. <message>true</message>
  966. <threadName>true</threadName>
  967. <dataType>true</dataType>
  968. <encoding>false</encoding>
  969. <assertions>true</assertions>
  970. <subresults>true</subresults>
  971. <responseData>false</responseData>
  972. <samplerData>false</samplerData>
  973. <xml>false</xml>
  974. <fieldNames>true</fieldNames>
  975. <responseHeaders>false</responseHeaders>
  976. <requestHeaders>false</requestHeaders>
  977. <responseDataOnError>false</responseDataOnError>
  978. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  979. <assertionsResultsToSave>0</assertionsResultsToSave>
  980. <bytes>true</bytes>
  981. <sentBytes>true</sentBytes>
  982. <threadCounts>true</threadCounts>
  983. <idleTime>true</idleTime>
  984. <connectTime>true</connectTime>
  985. </value>
  986. </objProp>
  987. <stringProp name="filename"></stringProp>
  988. </ResultCollector>
  989. <hashTree/>
  990. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  991. <hashTree>
  992. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  993. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  994. <stringProp name="mqtt.port">1883</stringProp>
  995. <stringProp name="mqtt.version">3.1</stringProp>
  996. <stringProp name="mqtt.conn_timeout">10</stringProp>
  997. <boolProp name="mqtt.private_protocol">false</boolProp>
  998. <stringProp name="mqtt.listener_timeout">10</stringProp>
  999. <stringProp name="mqtt.protocol">TCP</stringProp>
  1000. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  1001. <stringProp name="mqtt.keystore_file_path"></stringProp>
  1002. <stringProp name="mqtt.keystore_password"></stringProp>
  1003. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  1004. <stringProp name="mqtt.clientcert_password"></stringProp>
  1005. <stringProp name="mqtt.user_name"></stringProp>
  1006. <stringProp name="mqtt.password"></stringProp>
  1007. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  1008. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  1009. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  1010. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  1011. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  1012. </net.xmeter.samplers.ConnectSampler>
  1013. <hashTree/>
  1014. </hashTree>
  1015. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  1016. <stringProp name="mqtt.topic_name">devices/result</stringProp>
  1017. <stringProp name="mqtt.qos_level">0</stringProp>
  1018. <boolProp name="mqtt.add_timestamp">false</boolProp>
  1019. <boolProp name="mqtt.debug_response">true</boolProp>
  1020. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  1021. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  1022. </net.xmeter.samplers.SubSampler>
  1023. <hashTree>
  1024. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="temperature Assertion" enabled="true">
  1025. <stringProp name="JSON_PATH">$[0].temperature</stringProp>
  1026. <stringProp name="EXPECTED_VALUE"></stringProp>
  1027. <boolProp name="JSONVALIDATION">false</boolProp>
  1028. <boolProp name="EXPECT_NULL">false</boolProp>
  1029. <boolProp name="INVERT">false</boolProp>
  1030. <boolProp name="ISREGEX">false</boolProp>
  1031. </JSONPathAssertion>
  1032. <hashTree/>
  1033. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="humidity Assertion" enabled="true">
  1034. <stringProp name="JSON_PATH">$[0].humidity</stringProp>
  1035. <stringProp name="EXPECTED_VALUE"></stringProp>
  1036. <boolProp name="JSONVALIDATION">false</boolProp>
  1037. <boolProp name="EXPECT_NULL">false</boolProp>
  1038. <boolProp name="INVERT">false</boolProp>
  1039. <boolProp name="ISREGEX">false</boolProp>
  1040. </JSONPathAssertion>
  1041. <hashTree/>
  1042. </hashTree>
  1043. </hashTree>
  1044. </hashTree>
  1045. </hashTree>
  1046. </jmeterTestPlan>