lookup_table_redis.jmx 57 KB

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