lookup_table_memory.jmx 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Copyright 2022 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="5.0" jmeter="5.3">
  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. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  62. </ThreadGroup>
  63. <hashTree>
  64. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  65. <boolProp name="ResultCollector.error_logging">false</boolProp>
  66. <objProp>
  67. <name>saveConfig</name>
  68. <value class="SampleSaveConfiguration">
  69. <time>true</time>
  70. <latency>true</latency>
  71. <timestamp>true</timestamp>
  72. <success>true</success>
  73. <label>true</label>
  74. <code>true</code>
  75. <message>true</message>
  76. <threadName>true</threadName>
  77. <dataType>true</dataType>
  78. <encoding>false</encoding>
  79. <assertions>true</assertions>
  80. <subresults>true</subresults>
  81. <responseData>false</responseData>
  82. <samplerData>false</samplerData>
  83. <xml>false</xml>
  84. <fieldNames>true</fieldNames>
  85. <responseHeaders>false</responseHeaders>
  86. <requestHeaders>false</requestHeaders>
  87. <responseDataOnError>false</responseDataOnError>
  88. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  89. <assertionsResultsToSave>0</assertionsResultsToSave>
  90. <bytes>true</bytes>
  91. <sentBytes>true</sentBytes>
  92. <threadCounts>true</threadCounts>
  93. <idleTime>true</idleTime>
  94. <connectTime>true</connectTime>
  95. </value>
  96. </objProp>
  97. <stringProp name="filename"></stringProp>
  98. </ResultCollector>
  99. <hashTree/>
  100. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="API" enabled="true">
  101. <boolProp name="TransactionController.includeTimers">false</boolProp>
  102. <boolProp name="TransactionController.parent">false</boolProp>
  103. </TransactionController>
  104. <hashTree>
  105. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  106. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  107. <stringProp name="mqtt.port">1883</stringProp>
  108. <stringProp name="mqtt.version">3.1</stringProp>
  109. <stringProp name="mqtt.conn_timeout">10</stringProp>
  110. <boolProp name="mqtt.private_protocol">false</boolProp>
  111. <stringProp name="mqtt.listener_timeout">10</stringProp>
  112. <stringProp name="mqtt.protocol">TCP</stringProp>
  113. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  114. <stringProp name="mqtt.keystore_file_path"></stringProp>
  115. <stringProp name="mqtt.keystore_password"></stringProp>
  116. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  117. <stringProp name="mqtt.clientcert_password"></stringProp>
  118. <stringProp name="mqtt.user_name"></stringProp>
  119. <stringProp name="mqtt.password"></stringProp>
  120. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  121. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  122. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  123. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  124. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  125. <boolProp name="mqtt.conn_clean_session">true</boolProp>
  126. </net.xmeter.samplers.ConnectSampler>
  127. <hashTree/>
  128. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateAlertSettingStream" enabled="true">
  129. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  130. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  131. <collectionProp name="Arguments.arguments">
  132. <elementProp name="" elementType="HTTPArgument">
  133. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  134. <stringProp name="Argument.value">{&quot;sql&quot;:&quot;CREATE STREAM alertStream() WITH (DATASOURCE=\&quot;scene/alert\&quot;, FORMAT=\&quot;json\&quot;, TYPE=\&quot;mqtt\&quot;)&quot;}</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. <stringProp name="TestPlan.comments">Create stream for alert setting actions</stringProp>
  153. </HTTPSamplerProxy>
  154. <hashTree>
  155. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  156. <collectionProp name="Asserion.test_strings">
  157. <stringProp name="2128378328">Stream alertStream is created.</stringProp>
  158. </collectionProp>
  159. <stringProp name="Assertion.custom_message"></stringProp>
  160. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  161. <boolProp name="Assertion.assume_success">true</boolProp>
  162. <intProp name="Assertion.test_type">16</intProp>
  163. </ResponseAssertion>
  164. <hashTree/>
  165. </hashTree>
  166. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateRuleUpdateAlert" enabled="true">
  167. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  168. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  169. <collectionProp name="Arguments.arguments">
  170. <elementProp name="" elementType="HTTPArgument">
  171. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  172. <stringProp name="Argument.value">{&#xd;
  173. &quot;id&quot;: &quot;ruleUpdateAlert&quot;,&#xd;
  174. &quot;sql&quot;:&quot;SELECT * FROM alertStream&quot;,&#xd;
  175. &quot;actions&quot;:[&#xd;
  176. {&#xd;
  177. &quot;memory&quot;: {&#xd;
  178. &quot;keyField&quot;: &quot;memKey&quot;,&#xd;
  179. &quot;rowkindField&quot;: &quot;action&quot;,&#xd;
  180. &quot;topic&quot;: &quot;alertVal&quot;,&#xd;
  181. &quot;sendSingle&quot;: true&#xd;
  182. }&#xd;
  183. }&#xd;
  184. ]&#xd;
  185. }</stringProp>
  186. <stringProp name="Argument.metadata">=</stringProp>
  187. </elementProp>
  188. </collectionProp>
  189. </elementProp>
  190. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  191. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  192. <stringProp name="HTTPSampler.protocol"></stringProp>
  193. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  194. <stringProp name="HTTPSampler.path">/rules</stringProp>
  195. <stringProp name="HTTPSampler.method">POST</stringProp>
  196. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  197. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  198. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  199. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  200. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  201. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  202. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  203. </HTTPSamplerProxy>
  204. <hashTree>
  205. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  206. <collectionProp name="Asserion.test_strings">
  207. <stringProp name="-1451809660">Rule ruleUpdateAlert was created</stringProp>
  208. </collectionProp>
  209. <stringProp name="Assertion.custom_message"></stringProp>
  210. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  211. <boolProp name="Assertion.assume_success">true</boolProp>
  212. <intProp name="Assertion.test_type">16</intProp>
  213. </ResponseAssertion>
  214. <hashTree/>
  215. </hashTree>
  216. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateDataStream" enabled="true">
  217. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  218. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  219. <collectionProp name="Arguments.arguments">
  220. <elementProp name="" elementType="HTTPArgument">
  221. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  222. <stringProp name="Argument.value">{&quot;sql&quot;:&quot;CREATE STREAM demoStream() WITH (DATASOURCE=\&quot;scene/data\&quot;, FORMAT=\&quot;json\&quot;, TYPE=\&quot;mqtt\&quot;)&quot;}</stringProp>
  223. <stringProp name="Argument.metadata">=</stringProp>
  224. </elementProp>
  225. </collectionProp>
  226. </elementProp>
  227. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  228. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  229. <stringProp name="HTTPSampler.protocol"></stringProp>
  230. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  231. <stringProp name="HTTPSampler.path">/streams</stringProp>
  232. <stringProp name="HTTPSampler.method">POST</stringProp>
  233. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  234. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  235. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  236. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  237. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  238. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  239. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  240. <stringProp name="TestPlan.comments">Create stream for alert setting actions</stringProp>
  241. </HTTPSamplerProxy>
  242. <hashTree>
  243. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  244. <collectionProp name="Asserion.test_strings">
  245. <stringProp name="-894755937">Stream demoStream is created.</stringProp>
  246. </collectionProp>
  247. <stringProp name="Assertion.custom_message"></stringProp>
  248. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  249. <boolProp name="Assertion.assume_success">true</boolProp>
  250. <intProp name="Assertion.test_type">16</intProp>
  251. </ResponseAssertion>
  252. <hashTree/>
  253. </hashTree>
  254. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateMemTable" enabled="true">
  255. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  256. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  257. <collectionProp name="Arguments.arguments">
  258. <elementProp name="" elementType="HTTPArgument">
  259. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  260. <stringProp name="Argument.value">{&quot;sql&quot;:&quot;CREATE TABLE alertTable() WITH (DATASOURCE=\&quot;alertVal\&quot;, TYPE=\&quot;memory\&quot;, KIND=\&quot;lookup\&quot;, KEY=\&quot;memKey\&quot;)&quot;}</stringProp>
  261. <stringProp name="Argument.metadata">=</stringProp>
  262. </elementProp>
  263. </collectionProp>
  264. </elementProp>
  265. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  266. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  267. <stringProp name="HTTPSampler.protocol"></stringProp>
  268. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  269. <stringProp name="HTTPSampler.path">/tables</stringProp>
  270. <stringProp name="HTTPSampler.method">POST</stringProp>
  271. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  272. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  273. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  274. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  275. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  276. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  277. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  278. </HTTPSamplerProxy>
  279. <hashTree>
  280. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  281. <collectionProp name="Asserion.test_strings">
  282. <stringProp name="-1341540896">Table alertTable is created.</stringProp>
  283. </collectionProp>
  284. <stringProp name="Assertion.custom_message"></stringProp>
  285. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  286. <boolProp name="Assertion.assume_success">true</boolProp>
  287. <intProp name="Assertion.test_type">16</intProp>
  288. </ResponseAssertion>
  289. <hashTree/>
  290. </hashTree>
  291. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateRuleAlert" enabled="true">
  292. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  293. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  294. <collectionProp name="Arguments.arguments">
  295. <elementProp name="" elementType="HTTPArgument">
  296. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  297. <stringProp name="Argument.value">{&#xd;
  298. &quot;id&quot;: &quot;ruleAlert&quot;,&#xd;
  299. &quot;sql&quot;:&quot;SELECT device, value FROM demoStream INNER JOIN alertTable ON demoStream.deviceKind = alertTable.memKey WHERE demoStream.value &gt; alertTable.alarm&quot;,&#xd;
  300. &quot;actions&quot;:[&#xd;
  301. {&#xd;
  302. &quot;mqtt&quot;: {&#xd;
  303. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  304. &quot;topic&quot;: &quot;rule/alert&quot;,&#xd;
  305. &quot;sendSingle&quot;: true&#xd;
  306. }&#xd;
  307. }&#xd;
  308. ]&#xd;
  309. }</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</stringProp>
  319. <stringProp name="HTTPSampler.method">POST</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. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  330. <collectionProp name="Asserion.test_strings">
  331. <stringProp name="-2079532467">Rule ruleAlert was created</stringProp>
  332. </collectionProp>
  333. <stringProp name="Assertion.custom_message"></stringProp>
  334. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  335. <boolProp name="Assertion.assume_success">true</boolProp>
  336. <intProp name="Assertion.test_type">16</intProp>
  337. </ResponseAssertion>
  338. <hashTree/>
  339. </hashTree>
  340. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  341. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  342. <collectionProp name="Arguments.arguments"/>
  343. </elementProp>
  344. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  345. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  346. <stringProp name="HTTPSampler.protocol"></stringProp>
  347. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  348. <stringProp name="HTTPSampler.path">/rules/ruleAlert/status</stringProp>
  349. <stringProp name="HTTPSampler.method">GET</stringProp>
  350. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  351. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  352. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  353. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  354. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  355. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  356. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  357. </HTTPSamplerProxy>
  358. <hashTree>
  359. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  360. <stringProp name="JSON_PATH">$.source_demoStream_0_records_in_total</stringProp>
  361. <stringProp name="EXPECTED_VALUE">0</stringProp>
  362. <boolProp name="JSONVALIDATION">true</boolProp>
  363. <boolProp name="EXPECT_NULL">false</boolProp>
  364. <boolProp name="INVERT">false</boolProp>
  365. <boolProp name="ISREGEX">false</boolProp>
  366. </JSONPathAssertion>
  367. <hashTree/>
  368. </hashTree>
  369. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="FeedTable" enabled="true">
  370. <boolProp name="LoopController.continue_forever">true</boolProp>
  371. <stringProp name="LoopController.loops">4</stringProp>
  372. </LoopController>
  373. <hashTree>
  374. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  375. <stringProp name="delimiter">,</stringProp>
  376. <stringProp name="fileEncoding"></stringProp>
  377. <stringProp name="filename">alert_init_data.txt</stringProp>
  378. <boolProp name="ignoreFirstLine">false</boolProp>
  379. <boolProp name="quotedData">false</boolProp>
  380. <boolProp name="recycle">true</boolProp>
  381. <stringProp name="shareMode">shareMode.thread</stringProp>
  382. <boolProp name="stopThread">false</boolProp>
  383. <stringProp name="variableNames">action,memKey,alarm</stringProp>
  384. </CSVDataSet>
  385. <hashTree/>
  386. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  387. <stringProp name="mqtt.topic_name">scene/alert</stringProp>
  388. <stringProp name="mqtt.qos_level">0</stringProp>
  389. <boolProp name="mqtt.add_timestamp">false</boolProp>
  390. <stringProp name="mqtt.message_type">String</stringProp>
  391. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  392. <stringProp name="mqtt.message_to_sent">{&quot;memKey&quot;: ${memKey}, &quot;action&quot;: ${action}, &quot;alarm&quot; : ${alarm}}</stringProp>
  393. <boolProp name="mqtt.retained_message">false</boolProp>
  394. </net.xmeter.samplers.PubSampler>
  395. <hashTree/>
  396. </hashTree>
  397. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GetTableRuleStatus" enabled="true">
  398. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  399. <collectionProp name="Arguments.arguments"/>
  400. </elementProp>
  401. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  402. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  403. <stringProp name="HTTPSampler.protocol"></stringProp>
  404. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  405. <stringProp name="HTTPSampler.path">/rules/ruleUpdateAlert/status</stringProp>
  406. <stringProp name="HTTPSampler.method">GET</stringProp>
  407. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  408. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  409. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  410. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  411. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  412. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  413. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  414. </HTTPSamplerProxy>
  415. <hashTree>
  416. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  417. <stringProp name="JSON_PATH">$.source_alertStream_0_records_in_total</stringProp>
  418. <stringProp name="EXPECTED_VALUE">4</stringProp>
  419. <boolProp name="JSONVALIDATION">true</boolProp>
  420. <boolProp name="EXPECT_NULL">false</boolProp>
  421. <boolProp name="INVERT">false</boolProp>
  422. <boolProp name="ISREGEX">false</boolProp>
  423. </JSONPathAssertion>
  424. <hashTree/>
  425. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  426. <stringProp name="JSON_PATH">$.sink_memory_0_0_records_out_total</stringProp>
  427. <stringProp name="EXPECTED_VALUE">4</stringProp>
  428. <boolProp name="JSONVALIDATION">true</boolProp>
  429. <boolProp name="EXPECT_NULL">false</boolProp>
  430. <boolProp name="INVERT">false</boolProp>
  431. <boolProp name="ISREGEX">false</boolProp>
  432. </JSONPathAssertion>
  433. <hashTree/>
  434. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  435. <stringProp name="ConstantTimer.delay">5000</stringProp>
  436. </ConstantTimer>
  437. <hashTree/>
  438. </hashTree>
  439. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="SendData" enabled="true">
  440. <boolProp name="LoopController.continue_forever">true</boolProp>
  441. <stringProp name="LoopController.loops">4</stringProp>
  442. </LoopController>
  443. <hashTree>
  444. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  445. <stringProp name="delimiter">,</stringProp>
  446. <stringProp name="fileEncoding"></stringProp>
  447. <stringProp name="filename">collect_data.txt</stringProp>
  448. <boolProp name="ignoreFirstLine">false</boolProp>
  449. <boolProp name="quotedData">false</boolProp>
  450. <boolProp name="recycle">true</boolProp>
  451. <stringProp name="shareMode">shareMode.thread</stringProp>
  452. <boolProp name="stopThread">false</boolProp>
  453. <stringProp name="variableNames">device,deviceKind,value</stringProp>
  454. </CSVDataSet>
  455. <hashTree/>
  456. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  457. <stringProp name="mqtt.topic_name">scene/data</stringProp>
  458. <stringProp name="mqtt.qos_level">0</stringProp>
  459. <boolProp name="mqtt.add_timestamp">false</boolProp>
  460. <stringProp name="mqtt.message_type">String</stringProp>
  461. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  462. <stringProp name="mqtt.message_to_sent">{&quot;deviceKind&quot;: ${deviceKind}, &quot;device&quot;: ${device}, &quot;value&quot; : ${value}}</stringProp>
  463. <boolProp name="mqtt.retained_message">false</boolProp>
  464. </net.xmeter.samplers.PubSampler>
  465. <hashTree/>
  466. </hashTree>
  467. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  468. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  469. <collectionProp name="Arguments.arguments"/>
  470. </elementProp>
  471. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  472. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  473. <stringProp name="HTTPSampler.protocol"></stringProp>
  474. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  475. <stringProp name="HTTPSampler.path">/rules/ruleAlert/status</stringProp>
  476. <stringProp name="HTTPSampler.method">GET</stringProp>
  477. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  478. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  479. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  480. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  481. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  482. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  483. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  484. </HTTPSamplerProxy>
  485. <hashTree>
  486. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  487. <stringProp name="JSON_PATH">$.source_demoStream_0_records_in_total</stringProp>
  488. <stringProp name="EXPECTED_VALUE">4</stringProp>
  489. <boolProp name="JSONVALIDATION">true</boolProp>
  490. <boolProp name="EXPECT_NULL">false</boolProp>
  491. <boolProp name="INVERT">false</boolProp>
  492. <boolProp name="ISREGEX">false</boolProp>
  493. </JSONPathAssertion>
  494. <hashTree/>
  495. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  496. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_out_total</stringProp>
  497. <stringProp name="EXPECTED_VALUE">2</stringProp>
  498. <boolProp name="JSONVALIDATION">true</boolProp>
  499. <boolProp name="EXPECT_NULL">false</boolProp>
  500. <boolProp name="INVERT">false</boolProp>
  501. <boolProp name="ISREGEX">false</boolProp>
  502. </JSONPathAssertion>
  503. <hashTree/>
  504. </hashTree>
  505. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="UpdateTable" enabled="true">
  506. <boolProp name="LoopController.continue_forever">true</boolProp>
  507. <stringProp name="LoopController.loops">4</stringProp>
  508. </LoopController>
  509. <hashTree>
  510. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  511. <stringProp name="delimiter">,</stringProp>
  512. <stringProp name="fileEncoding"></stringProp>
  513. <stringProp name="filename">alert_update_data.txt</stringProp>
  514. <boolProp name="ignoreFirstLine">false</boolProp>
  515. <boolProp name="quotedData">false</boolProp>
  516. <boolProp name="recycle">true</boolProp>
  517. <stringProp name="shareMode">shareMode.thread</stringProp>
  518. <boolProp name="stopThread">false</boolProp>
  519. <stringProp name="variableNames">action,memKey,alarm</stringProp>
  520. </CSVDataSet>
  521. <hashTree/>
  522. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  523. <stringProp name="mqtt.topic_name">scene/alert</stringProp>
  524. <stringProp name="mqtt.qos_level">0</stringProp>
  525. <boolProp name="mqtt.add_timestamp">false</boolProp>
  526. <stringProp name="mqtt.message_type">String</stringProp>
  527. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  528. <stringProp name="mqtt.message_to_sent">{&quot;memKey&quot;: ${memKey}, &quot;action&quot;: ${action}, &quot;alarm&quot; : ${alarm}}</stringProp>
  529. <boolProp name="mqtt.retained_message">false</boolProp>
  530. </net.xmeter.samplers.PubSampler>
  531. <hashTree/>
  532. </hashTree>
  533. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GetTableRuleStatus" enabled="true">
  534. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  535. <collectionProp name="Arguments.arguments"/>
  536. </elementProp>
  537. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  538. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  539. <stringProp name="HTTPSampler.protocol"></stringProp>
  540. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  541. <stringProp name="HTTPSampler.path">/rules/ruleUpdateAlert/status</stringProp>
  542. <stringProp name="HTTPSampler.method">GET</stringProp>
  543. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  544. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  545. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  546. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  547. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  548. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  549. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  550. </HTTPSamplerProxy>
  551. <hashTree>
  552. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  553. <stringProp name="JSON_PATH">$.source_alertStream_0_records_in_total</stringProp>
  554. <stringProp name="EXPECTED_VALUE">8</stringProp>
  555. <boolProp name="JSONVALIDATION">true</boolProp>
  556. <boolProp name="EXPECT_NULL">false</boolProp>
  557. <boolProp name="INVERT">false</boolProp>
  558. <boolProp name="ISREGEX">false</boolProp>
  559. </JSONPathAssertion>
  560. <hashTree/>
  561. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  562. <stringProp name="JSON_PATH">$.sink_memory_0_0_records_out_total</stringProp>
  563. <stringProp name="EXPECTED_VALUE">8</stringProp>
  564. <boolProp name="JSONVALIDATION">true</boolProp>
  565. <boolProp name="EXPECT_NULL">false</boolProp>
  566. <boolProp name="INVERT">false</boolProp>
  567. <boolProp name="ISREGEX">false</boolProp>
  568. </JSONPathAssertion>
  569. <hashTree/>
  570. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  571. <stringProp name="ConstantTimer.delay">5000</stringProp>
  572. </ConstantTimer>
  573. <hashTree/>
  574. </hashTree>
  575. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="SendData" enabled="true">
  576. <boolProp name="LoopController.continue_forever">true</boolProp>
  577. <stringProp name="LoopController.loops">4</stringProp>
  578. </LoopController>
  579. <hashTree>
  580. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  581. <stringProp name="delimiter">,</stringProp>
  582. <stringProp name="fileEncoding"></stringProp>
  583. <stringProp name="filename">collect_data.txt</stringProp>
  584. <boolProp name="ignoreFirstLine">false</boolProp>
  585. <boolProp name="quotedData">false</boolProp>
  586. <boolProp name="recycle">true</boolProp>
  587. <stringProp name="shareMode">shareMode.thread</stringProp>
  588. <boolProp name="stopThread">false</boolProp>
  589. <stringProp name="variableNames">device,deviceKind,value</stringProp>
  590. </CSVDataSet>
  591. <hashTree/>
  592. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  593. <stringProp name="mqtt.topic_name">scene/data</stringProp>
  594. <stringProp name="mqtt.qos_level">0</stringProp>
  595. <boolProp name="mqtt.add_timestamp">false</boolProp>
  596. <stringProp name="mqtt.message_type">String</stringProp>
  597. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  598. <stringProp name="mqtt.message_to_sent">{&quot;deviceKind&quot;: ${deviceKind}, &quot;device&quot;: ${device}, &quot;value&quot; : ${value}}</stringProp>
  599. <boolProp name="mqtt.retained_message">false</boolProp>
  600. </net.xmeter.samplers.PubSampler>
  601. <hashTree/>
  602. </hashTree>
  603. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  604. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  605. <collectionProp name="Arguments.arguments"/>
  606. </elementProp>
  607. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  608. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  609. <stringProp name="HTTPSampler.protocol"></stringProp>
  610. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  611. <stringProp name="HTTPSampler.path">/rules/ruleAlert/status</stringProp>
  612. <stringProp name="HTTPSampler.method">GET</stringProp>
  613. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  614. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  615. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  616. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  617. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  618. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  619. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  620. </HTTPSamplerProxy>
  621. <hashTree>
  622. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  623. <stringProp name="JSON_PATH">$.source_demoStream_0_records_in_total</stringProp>
  624. <stringProp name="EXPECTED_VALUE">8</stringProp>
  625. <boolProp name="JSONVALIDATION">true</boolProp>
  626. <boolProp name="EXPECT_NULL">false</boolProp>
  627. <boolProp name="INVERT">false</boolProp>
  628. <boolProp name="ISREGEX">false</boolProp>
  629. </JSONPathAssertion>
  630. <hashTree/>
  631. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  632. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_out_total</stringProp>
  633. <stringProp name="EXPECTED_VALUE">3</stringProp>
  634. <boolProp name="JSONVALIDATION">true</boolProp>
  635. <boolProp name="EXPECT_NULL">false</boolProp>
  636. <boolProp name="INVERT">false</boolProp>
  637. <boolProp name="ISREGEX">false</boolProp>
  638. </JSONPathAssertion>
  639. <hashTree/>
  640. </hashTree>
  641. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  642. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  643. <collectionProp name="Arguments.arguments"/>
  644. </elementProp>
  645. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  646. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  647. <stringProp name="HTTPSampler.protocol"></stringProp>
  648. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  649. <stringProp name="HTTPSampler.path">/rules/ruleAlert</stringProp>
  650. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  651. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  652. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  653. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  654. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  655. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  656. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  657. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  658. </HTTPSamplerProxy>
  659. <hashTree>
  660. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  661. <collectionProp name="Asserion.test_strings">
  662. <stringProp name="659914816">Rule ruleAlert is dropped.</stringProp>
  663. </collectionProp>
  664. <stringProp name="Assertion.custom_message"></stringProp>
  665. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  666. <boolProp name="Assertion.assume_success">false</boolProp>
  667. <intProp name="Assertion.test_type">16</intProp>
  668. </ResponseAssertion>
  669. <hashTree/>
  670. </hashTree>
  671. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  672. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  673. <collectionProp name="Arguments.arguments"/>
  674. </elementProp>
  675. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  676. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  677. <stringProp name="HTTPSampler.protocol"></stringProp>
  678. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  679. <stringProp name="HTTPSampler.path">/streams/demoStream</stringProp>
  680. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  681. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  682. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  683. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  684. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  685. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  686. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  687. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  688. </HTTPSamplerProxy>
  689. <hashTree>
  690. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  691. <collectionProp name="Asserion.test_strings">
  692. <stringProp name="1148079559">Stream demoStream is dropped.</stringProp>
  693. </collectionProp>
  694. <stringProp name="Assertion.custom_message"></stringProp>
  695. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  696. <boolProp name="Assertion.assume_success">false</boolProp>
  697. <intProp name="Assertion.test_type">16</intProp>
  698. </ResponseAssertion>
  699. <hashTree/>
  700. </hashTree>
  701. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Table" enabled="true">
  702. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  703. <collectionProp name="Arguments.arguments"/>
  704. </elementProp>
  705. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  706. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  707. <stringProp name="HTTPSampler.protocol"></stringProp>
  708. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  709. <stringProp name="HTTPSampler.path">/tables/alertTable</stringProp>
  710. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  711. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  712. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  713. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  714. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  715. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  716. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  717. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  718. </HTTPSamplerProxy>
  719. <hashTree>
  720. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  721. <collectionProp name="Asserion.test_strings">
  722. <stringProp name="701294600">Table alertTable is dropped.</stringProp>
  723. </collectionProp>
  724. <stringProp name="Assertion.custom_message"></stringProp>
  725. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  726. <boolProp name="Assertion.assume_success">false</boolProp>
  727. <intProp name="Assertion.test_type">16</intProp>
  728. </ResponseAssertion>
  729. <hashTree/>
  730. </hashTree>
  731. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  732. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  733. <collectionProp name="Arguments.arguments"/>
  734. </elementProp>
  735. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  736. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  737. <stringProp name="HTTPSampler.protocol"></stringProp>
  738. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  739. <stringProp name="HTTPSampler.path">/rules/ruleUpdateAlert</stringProp>
  740. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  741. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  742. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  743. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  744. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  745. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  746. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  747. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  748. </HTTPSamplerProxy>
  749. <hashTree>
  750. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  751. <collectionProp name="Asserion.test_strings">
  752. <stringProp name="1287637623">Rule ruleUpdateAlert is dropped.</stringProp>
  753. </collectionProp>
  754. <stringProp name="Assertion.custom_message"></stringProp>
  755. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  756. <boolProp name="Assertion.assume_success">false</boolProp>
  757. <intProp name="Assertion.test_type">16</intProp>
  758. </ResponseAssertion>
  759. <hashTree/>
  760. </hashTree>
  761. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  762. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  763. <collectionProp name="Arguments.arguments"/>
  764. </elementProp>
  765. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  766. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  767. <stringProp name="HTTPSampler.protocol"></stringProp>
  768. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  769. <stringProp name="HTTPSampler.path">/streams/alertStream</stringProp>
  770. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  771. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  772. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  773. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  774. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  775. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  776. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  777. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  778. </HTTPSamplerProxy>
  779. <hashTree>
  780. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  781. <collectionProp name="Asserion.test_strings">
  782. <stringProp name="-123753472">Stream alertStream is dropped.</stringProp>
  783. </collectionProp>
  784. <stringProp name="Assertion.custom_message"></stringProp>
  785. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  786. <boolProp name="Assertion.assume_success">false</boolProp>
  787. <intProp name="Assertion.test_type">16</intProp>
  788. </ResponseAssertion>
  789. <hashTree/>
  790. </hashTree>
  791. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  792. <stringProp name="ConstantTimer.delay">500</stringProp>
  793. </ConstantTimer>
  794. <hashTree/>
  795. </hashTree>
  796. </hashTree>
  797. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  798. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  799. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  800. <boolProp name="LoopController.continue_forever">false</boolProp>
  801. <stringProp name="LoopController.loops">3</stringProp>
  802. </elementProp>
  803. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  804. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  805. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  806. <stringProp name="ThreadGroup.duration"></stringProp>
  807. <stringProp name="ThreadGroup.delay"></stringProp>
  808. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  809. </ThreadGroup>
  810. <hashTree>
  811. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  812. <boolProp name="ResultCollector.error_logging">false</boolProp>
  813. <objProp>
  814. <name>saveConfig</name>
  815. <value class="SampleSaveConfiguration">
  816. <time>true</time>
  817. <latency>true</latency>
  818. <timestamp>true</timestamp>
  819. <success>true</success>
  820. <label>true</label>
  821. <code>true</code>
  822. <message>true</message>
  823. <threadName>true</threadName>
  824. <dataType>true</dataType>
  825. <encoding>false</encoding>
  826. <assertions>true</assertions>
  827. <subresults>true</subresults>
  828. <responseData>false</responseData>
  829. <samplerData>false</samplerData>
  830. <xml>false</xml>
  831. <fieldNames>true</fieldNames>
  832. <responseHeaders>false</responseHeaders>
  833. <requestHeaders>false</requestHeaders>
  834. <responseDataOnError>false</responseDataOnError>
  835. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  836. <assertionsResultsToSave>0</assertionsResultsToSave>
  837. <bytes>true</bytes>
  838. <sentBytes>true</sentBytes>
  839. <threadCounts>true</threadCounts>
  840. <idleTime>true</idleTime>
  841. <connectTime>true</connectTime>
  842. </value>
  843. </objProp>
  844. <stringProp name="filename"></stringProp>
  845. </ResultCollector>
  846. <hashTree/>
  847. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  848. <hashTree>
  849. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  850. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  851. <stringProp name="mqtt.port">1883</stringProp>
  852. <stringProp name="mqtt.version">3.1</stringProp>
  853. <stringProp name="mqtt.conn_timeout">10</stringProp>
  854. <boolProp name="mqtt.private_protocol">false</boolProp>
  855. <stringProp name="mqtt.listener_timeout">10</stringProp>
  856. <stringProp name="mqtt.protocol">TCP</stringProp>
  857. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  858. <stringProp name="mqtt.keystore_file_path"></stringProp>
  859. <stringProp name="mqtt.keystore_password"></stringProp>
  860. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  861. <stringProp name="mqtt.clientcert_password"></stringProp>
  862. <stringProp name="mqtt.user_name"></stringProp>
  863. <stringProp name="mqtt.password"></stringProp>
  864. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  865. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  866. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  867. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  868. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  869. <boolProp name="mqtt.conn_clean_session">true</boolProp>
  870. </net.xmeter.samplers.ConnectSampler>
  871. <hashTree/>
  872. </hashTree>
  873. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  874. <stringProp name="mqtt.topic_name">rule/alert</stringProp>
  875. <stringProp name="mqtt.qos_level">0</stringProp>
  876. <boolProp name="mqtt.add_timestamp">false</boolProp>
  877. <boolProp name="mqtt.debug_response">true</boolProp>
  878. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  879. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  880. </net.xmeter.samplers.SubSampler>
  881. <hashTree>
  882. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="value Assertion" enabled="true">
  883. <stringProp name="JSON_PATH">$.value</stringProp>
  884. <stringProp name="EXPECTED_VALUE">${value}</stringProp>
  885. <boolProp name="JSONVALIDATION">true</boolProp>
  886. <boolProp name="EXPECT_NULL">false</boolProp>
  887. <boolProp name="INVERT">false</boolProp>
  888. <boolProp name="ISREGEX">false</boolProp>
  889. </JSONPathAssertion>
  890. <hashTree/>
  891. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="device Assertion" enabled="true">
  892. <stringProp name="JSON_PATH">$.device</stringProp>
  893. <stringProp name="EXPECTED_VALUE">${device}</stringProp>
  894. <boolProp name="JSONVALIDATION">true</boolProp>
  895. <boolProp name="EXPECT_NULL">false</boolProp>
  896. <boolProp name="INVERT">false</boolProp>
  897. <boolProp name="ISREGEX">false</boolProp>
  898. </JSONPathAssertion>
  899. <hashTree/>
  900. </hashTree>
  901. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  902. <stringProp name="delimiter">,</stringProp>
  903. <stringProp name="fileEncoding"></stringProp>
  904. <stringProp name="filename">lookup_table_result_data.txt</stringProp>
  905. <boolProp name="ignoreFirstLine">false</boolProp>
  906. <boolProp name="quotedData">false</boolProp>
  907. <boolProp name="recycle">true</boolProp>
  908. <stringProp name="shareMode">shareMode.thread</stringProp>
  909. <boolProp name="stopThread">false</boolProp>
  910. <stringProp name="variableNames">device,value</stringProp>
  911. </CSVDataSet>
  912. <hashTree/>
  913. </hashTree>
  914. </hashTree>
  915. </hashTree>
  916. </jmeterTestPlan>