graph_lookup_rule.jmx 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Copyright 2023 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;graph&quot;: {&#xd;
  300. &quot;nodes&quot;: {&#xd;
  301. &quot;demo&quot;: {&#xd;
  302. &quot;type&quot;: &quot;source&quot;,&#xd;
  303. &quot;nodeType&quot;: &quot;mqtt&quot;,&#xd;
  304. &quot;props&quot;: {&#xd;
  305. &quot;sourceType&quot;: &quot;stream&quot;,&#xd;
  306. &quot;sourceName&quot;: &quot;demoStream&quot;&#xd;
  307. }&#xd;
  308. },&#xd;
  309. &quot;alertTable&quot;: {&#xd;
  310. &quot;type&quot;: &quot;source&quot;,&#xd;
  311. &quot;nodeType&quot;: &quot;memory&quot;,&#xd;
  312. &quot;props&quot;: {&#xd;
  313. &quot;sourceType&quot;: &quot;table&quot;,&#xd;
  314. &quot;sourceName&quot;: &quot;alertTable&quot;&#xd;
  315. }&#xd;
  316. },&#xd;
  317. &quot;joinop&quot;: {&#xd;
  318. &quot;type&quot;: &quot;operator&quot;,&#xd;
  319. &quot;nodeType&quot;: &quot;join&quot;,&#xd;
  320. &quot;props&quot;: {&#xd;
  321. &quot;from&quot;: &quot;demoStream&quot;,&#xd;
  322. &quot;joins&quot;: [&#xd;
  323. {&#xd;
  324. &quot;name&quot;: &quot;alertTable&quot;,&#xd;
  325. &quot;type&quot;: &quot;inner&quot;,&#xd;
  326. &quot;on&quot;: &quot;demoStream.deviceKind = alertTable.memKey&quot;&#xd;
  327. }&#xd;
  328. ]&#xd;
  329. }&#xd;
  330. },&#xd;
  331. &quot;filterOp&quot;: {&#xd;
  332. &quot;type&quot;: &quot;operator&quot;,&#xd;
  333. &quot;nodeType&quot;: &quot;filter&quot;,&#xd;
  334. &quot;props&quot;: {&#xd;
  335. &quot;expr&quot;: &quot;demoStream.value &gt; alertTable.alarm&quot;&#xd;
  336. }&#xd;
  337. },&#xd;
  338. &quot;pickOp&quot; : {&#xd;
  339. &quot;type&quot;: &quot;operator&quot;,&#xd;
  340. &quot;nodeType&quot;: &quot;pick&quot;,&#xd;
  341. &quot;props&quot;: {&#xd;
  342. &quot;fields&quot;: [&quot;device&quot;, &quot;value&quot;]&#xd;
  343. }&#xd;
  344. },&#xd;
  345. &quot;mqttpv&quot;: {&#xd;
  346. &quot;type&quot;: &quot;sink&quot;,&#xd;
  347. &quot;nodeType&quot;: &quot;mqtt&quot;,&#xd;
  348. &quot;props&quot;: {&#xd;
  349. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  350. &quot;topic&quot;: &quot;rule/alert&quot;,&#xd;
  351. &quot;sendSingle&quot;: true&#xd;
  352. }&#xd;
  353. }&#xd;
  354. },&#xd;
  355. &quot;topo&quot;: {&#xd;
  356. &quot;sources&quot;: [&quot;demo&quot;, &quot;alertTable&quot;],&#xd;
  357. &quot;edges&quot;: {&#xd;
  358. &quot;demo&quot;: [&quot;joinop&quot;],&#xd;
  359. &quot;alertTable&quot;: [&quot;joinop&quot;],&#xd;
  360. &quot;joinop&quot;: [&quot;filterOp&quot;],&#xd;
  361. &quot;filterOp&quot;: [&quot;pickOp&quot;],&#xd;
  362. &quot;pickOp&quot;: [&quot;mqttpv&quot;]&#xd;
  363. }&#xd;
  364. }&#xd;
  365. }&#xd;
  366. }</stringProp>
  367. <stringProp name="Argument.metadata">=</stringProp>
  368. </elementProp>
  369. </collectionProp>
  370. </elementProp>
  371. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  372. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  373. <stringProp name="HTTPSampler.protocol"></stringProp>
  374. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  375. <stringProp name="HTTPSampler.path">/rules</stringProp>
  376. <stringProp name="HTTPSampler.method">POST</stringProp>
  377. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  378. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  379. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  380. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  381. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  382. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  383. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  384. </HTTPSamplerProxy>
  385. <hashTree>
  386. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  387. <collectionProp name="Asserion.test_strings">
  388. <stringProp name="-2079532467">Rule ruleAlert was created</stringProp>
  389. </collectionProp>
  390. <stringProp name="Assertion.custom_message"></stringProp>
  391. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  392. <boolProp name="Assertion.assume_success">true</boolProp>
  393. <intProp name="Assertion.test_type">16</intProp>
  394. </ResponseAssertion>
  395. <hashTree/>
  396. </hashTree>
  397. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" 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/ruleAlert/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_demoStream_0_records_in_total</stringProp>
  418. <stringProp name="EXPECTED_VALUE">0</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. </hashTree>
  426. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="FeedTable" enabled="true">
  427. <boolProp name="LoopController.continue_forever">true</boolProp>
  428. <stringProp name="LoopController.loops">4</stringProp>
  429. </LoopController>
  430. <hashTree>
  431. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  432. <stringProp name="delimiter">,</stringProp>
  433. <stringProp name="fileEncoding"></stringProp>
  434. <stringProp name="filename">alert_init_data.txt</stringProp>
  435. <boolProp name="ignoreFirstLine">false</boolProp>
  436. <boolProp name="quotedData">false</boolProp>
  437. <boolProp name="recycle">true</boolProp>
  438. <stringProp name="shareMode">shareMode.thread</stringProp>
  439. <boolProp name="stopThread">false</boolProp>
  440. <stringProp name="variableNames">action,memKey,alarm</stringProp>
  441. </CSVDataSet>
  442. <hashTree/>
  443. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  444. <stringProp name="mqtt.topic_name">scene/alert</stringProp>
  445. <stringProp name="mqtt.qos_level">0</stringProp>
  446. <boolProp name="mqtt.add_timestamp">false</boolProp>
  447. <stringProp name="mqtt.message_type">String</stringProp>
  448. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  449. <stringProp name="mqtt.message_to_sent">{&quot;memKey&quot;: ${memKey}, &quot;action&quot;: ${action}, &quot;alarm&quot; : ${alarm}}</stringProp>
  450. <boolProp name="mqtt.retained_message">false</boolProp>
  451. </net.xmeter.samplers.PubSampler>
  452. <hashTree/>
  453. </hashTree>
  454. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GetTableRuleStatus" enabled="true">
  455. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  456. <collectionProp name="Arguments.arguments"/>
  457. </elementProp>
  458. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  459. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  460. <stringProp name="HTTPSampler.protocol"></stringProp>
  461. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  462. <stringProp name="HTTPSampler.path">/rules/ruleUpdateAlert/status</stringProp>
  463. <stringProp name="HTTPSampler.method">GET</stringProp>
  464. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  465. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  466. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  467. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  468. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  469. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  470. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  471. </HTTPSamplerProxy>
  472. <hashTree>
  473. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  474. <stringProp name="JSON_PATH">$.source_alertStream_0_records_in_total</stringProp>
  475. <stringProp name="EXPECTED_VALUE">4</stringProp>
  476. <boolProp name="JSONVALIDATION">true</boolProp>
  477. <boolProp name="EXPECT_NULL">false</boolProp>
  478. <boolProp name="INVERT">false</boolProp>
  479. <boolProp name="ISREGEX">false</boolProp>
  480. </JSONPathAssertion>
  481. <hashTree/>
  482. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  483. <stringProp name="JSON_PATH">$.sink_memory_0_0_records_out_total</stringProp>
  484. <stringProp name="EXPECTED_VALUE">4</stringProp>
  485. <boolProp name="JSONVALIDATION">true</boolProp>
  486. <boolProp name="EXPECT_NULL">false</boolProp>
  487. <boolProp name="INVERT">false</boolProp>
  488. <boolProp name="ISREGEX">false</boolProp>
  489. </JSONPathAssertion>
  490. <hashTree/>
  491. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  492. <stringProp name="ConstantTimer.delay">5000</stringProp>
  493. </ConstantTimer>
  494. <hashTree/>
  495. </hashTree>
  496. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="SendData" enabled="true">
  497. <boolProp name="LoopController.continue_forever">true</boolProp>
  498. <stringProp name="LoopController.loops">4</stringProp>
  499. </LoopController>
  500. <hashTree>
  501. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  502. <stringProp name="delimiter">,</stringProp>
  503. <stringProp name="fileEncoding"></stringProp>
  504. <stringProp name="filename">collect_data.txt</stringProp>
  505. <boolProp name="ignoreFirstLine">false</boolProp>
  506. <boolProp name="quotedData">false</boolProp>
  507. <boolProp name="recycle">true</boolProp>
  508. <stringProp name="shareMode">shareMode.thread</stringProp>
  509. <boolProp name="stopThread">false</boolProp>
  510. <stringProp name="variableNames">device,deviceKind,value</stringProp>
  511. </CSVDataSet>
  512. <hashTree/>
  513. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  514. <stringProp name="mqtt.topic_name">scene/data</stringProp>
  515. <stringProp name="mqtt.qos_level">0</stringProp>
  516. <boolProp name="mqtt.add_timestamp">false</boolProp>
  517. <stringProp name="mqtt.message_type">String</stringProp>
  518. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  519. <stringProp name="mqtt.message_to_sent">{&quot;deviceKind&quot;: ${deviceKind}, &quot;device&quot;: ${device}, &quot;value&quot; : ${value}}</stringProp>
  520. <boolProp name="mqtt.retained_message">false</boolProp>
  521. </net.xmeter.samplers.PubSampler>
  522. <hashTree/>
  523. </hashTree>
  524. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  525. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  526. <collectionProp name="Arguments.arguments"/>
  527. </elementProp>
  528. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  529. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  530. <stringProp name="HTTPSampler.protocol"></stringProp>
  531. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  532. <stringProp name="HTTPSampler.path">/rules/ruleAlert/status</stringProp>
  533. <stringProp name="HTTPSampler.method">GET</stringProp>
  534. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  535. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  536. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  537. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  538. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  539. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  540. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  541. </HTTPSamplerProxy>
  542. <hashTree>
  543. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  544. <stringProp name="JSON_PATH">$.source_demoStream_0_records_in_total</stringProp>
  545. <stringProp name="EXPECTED_VALUE">4</stringProp>
  546. <boolProp name="JSONVALIDATION">true</boolProp>
  547. <boolProp name="EXPECT_NULL">false</boolProp>
  548. <boolProp name="INVERT">false</boolProp>
  549. <boolProp name="ISREGEX">false</boolProp>
  550. </JSONPathAssertion>
  551. <hashTree/>
  552. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  553. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_out_total</stringProp>
  554. <stringProp name="EXPECTED_VALUE">2</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. </hashTree>
  562. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="UpdateTable" enabled="true">
  563. <boolProp name="LoopController.continue_forever">true</boolProp>
  564. <stringProp name="LoopController.loops">4</stringProp>
  565. </LoopController>
  566. <hashTree>
  567. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  568. <stringProp name="delimiter">,</stringProp>
  569. <stringProp name="fileEncoding"></stringProp>
  570. <stringProp name="filename">alert_update_data.txt</stringProp>
  571. <boolProp name="ignoreFirstLine">false</boolProp>
  572. <boolProp name="quotedData">false</boolProp>
  573. <boolProp name="recycle">true</boolProp>
  574. <stringProp name="shareMode">shareMode.thread</stringProp>
  575. <boolProp name="stopThread">false</boolProp>
  576. <stringProp name="variableNames">action,memKey,alarm</stringProp>
  577. </CSVDataSet>
  578. <hashTree/>
  579. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  580. <stringProp name="mqtt.topic_name">scene/alert</stringProp>
  581. <stringProp name="mqtt.qos_level">0</stringProp>
  582. <boolProp name="mqtt.add_timestamp">false</boolProp>
  583. <stringProp name="mqtt.message_type">String</stringProp>
  584. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  585. <stringProp name="mqtt.message_to_sent">{&quot;memKey&quot;: ${memKey}, &quot;action&quot;: ${action}, &quot;alarm&quot; : ${alarm}}</stringProp>
  586. <boolProp name="mqtt.retained_message">false</boolProp>
  587. </net.xmeter.samplers.PubSampler>
  588. <hashTree/>
  589. </hashTree>
  590. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GetTableRuleStatus" enabled="true">
  591. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  592. <collectionProp name="Arguments.arguments"/>
  593. </elementProp>
  594. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  595. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  596. <stringProp name="HTTPSampler.protocol"></stringProp>
  597. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  598. <stringProp name="HTTPSampler.path">/rules/ruleUpdateAlert/status</stringProp>
  599. <stringProp name="HTTPSampler.method">GET</stringProp>
  600. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  601. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  602. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  603. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  604. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  605. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  606. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  607. </HTTPSamplerProxy>
  608. <hashTree>
  609. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  610. <stringProp name="JSON_PATH">$.source_alertStream_0_records_in_total</stringProp>
  611. <stringProp name="EXPECTED_VALUE">8</stringProp>
  612. <boolProp name="JSONVALIDATION">true</boolProp>
  613. <boolProp name="EXPECT_NULL">false</boolProp>
  614. <boolProp name="INVERT">false</boolProp>
  615. <boolProp name="ISREGEX">false</boolProp>
  616. </JSONPathAssertion>
  617. <hashTree/>
  618. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  619. <stringProp name="JSON_PATH">$.sink_memory_0_0_records_out_total</stringProp>
  620. <stringProp name="EXPECTED_VALUE">8</stringProp>
  621. <boolProp name="JSONVALIDATION">true</boolProp>
  622. <boolProp name="EXPECT_NULL">false</boolProp>
  623. <boolProp name="INVERT">false</boolProp>
  624. <boolProp name="ISREGEX">false</boolProp>
  625. </JSONPathAssertion>
  626. <hashTree/>
  627. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  628. <stringProp name="ConstantTimer.delay">5000</stringProp>
  629. </ConstantTimer>
  630. <hashTree/>
  631. </hashTree>
  632. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="SendData" enabled="true">
  633. <boolProp name="LoopController.continue_forever">true</boolProp>
  634. <stringProp name="LoopController.loops">4</stringProp>
  635. </LoopController>
  636. <hashTree>
  637. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  638. <stringProp name="delimiter">,</stringProp>
  639. <stringProp name="fileEncoding"></stringProp>
  640. <stringProp name="filename">collect_data.txt</stringProp>
  641. <boolProp name="ignoreFirstLine">false</boolProp>
  642. <boolProp name="quotedData">false</boolProp>
  643. <boolProp name="recycle">true</boolProp>
  644. <stringProp name="shareMode">shareMode.thread</stringProp>
  645. <boolProp name="stopThread">false</boolProp>
  646. <stringProp name="variableNames">device,deviceKind,value</stringProp>
  647. </CSVDataSet>
  648. <hashTree/>
  649. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  650. <stringProp name="mqtt.topic_name">scene/data</stringProp>
  651. <stringProp name="mqtt.qos_level">0</stringProp>
  652. <boolProp name="mqtt.add_timestamp">false</boolProp>
  653. <stringProp name="mqtt.message_type">String</stringProp>
  654. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  655. <stringProp name="mqtt.message_to_sent">{&quot;deviceKind&quot;: ${deviceKind}, &quot;device&quot;: ${device}, &quot;value&quot; : ${value}}</stringProp>
  656. <boolProp name="mqtt.retained_message">false</boolProp>
  657. </net.xmeter.samplers.PubSampler>
  658. <hashTree/>
  659. </hashTree>
  660. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  661. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  662. <collectionProp name="Arguments.arguments"/>
  663. </elementProp>
  664. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  665. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  666. <stringProp name="HTTPSampler.protocol"></stringProp>
  667. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  668. <stringProp name="HTTPSampler.path">/rules/ruleAlert/status</stringProp>
  669. <stringProp name="HTTPSampler.method">GET</stringProp>
  670. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  671. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  672. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  673. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  674. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  675. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  676. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  677. </HTTPSamplerProxy>
  678. <hashTree>
  679. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  680. <stringProp name="JSON_PATH">$.source_demoStream_0_records_in_total</stringProp>
  681. <stringProp name="EXPECTED_VALUE">8</stringProp>
  682. <boolProp name="JSONVALIDATION">true</boolProp>
  683. <boolProp name="EXPECT_NULL">false</boolProp>
  684. <boolProp name="INVERT">false</boolProp>
  685. <boolProp name="ISREGEX">false</boolProp>
  686. </JSONPathAssertion>
  687. <hashTree/>
  688. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  689. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_out_total</stringProp>
  690. <stringProp name="EXPECTED_VALUE">3</stringProp>
  691. <boolProp name="JSONVALIDATION">true</boolProp>
  692. <boolProp name="EXPECT_NULL">false</boolProp>
  693. <boolProp name="INVERT">false</boolProp>
  694. <boolProp name="ISREGEX">false</boolProp>
  695. </JSONPathAssertion>
  696. <hashTree/>
  697. </hashTree>
  698. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  699. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  700. <collectionProp name="Arguments.arguments"/>
  701. </elementProp>
  702. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  703. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  704. <stringProp name="HTTPSampler.protocol"></stringProp>
  705. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  706. <stringProp name="HTTPSampler.path">/rules/ruleAlert</stringProp>
  707. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  708. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  709. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  710. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  711. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  712. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  713. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  714. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  715. </HTTPSamplerProxy>
  716. <hashTree>
  717. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  718. <collectionProp name="Asserion.test_strings">
  719. <stringProp name="659914816">Rule ruleAlert is dropped.</stringProp>
  720. </collectionProp>
  721. <stringProp name="Assertion.custom_message"></stringProp>
  722. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  723. <boolProp name="Assertion.assume_success">false</boolProp>
  724. <intProp name="Assertion.test_type">16</intProp>
  725. </ResponseAssertion>
  726. <hashTree/>
  727. </hashTree>
  728. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  729. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  730. <collectionProp name="Arguments.arguments"/>
  731. </elementProp>
  732. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  733. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  734. <stringProp name="HTTPSampler.protocol"></stringProp>
  735. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  736. <stringProp name="HTTPSampler.path">/streams/demoStream</stringProp>
  737. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  738. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  739. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  740. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  741. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  742. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  743. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  744. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  745. </HTTPSamplerProxy>
  746. <hashTree>
  747. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  748. <collectionProp name="Asserion.test_strings">
  749. <stringProp name="1148079559">Stream demoStream is dropped.</stringProp>
  750. </collectionProp>
  751. <stringProp name="Assertion.custom_message"></stringProp>
  752. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  753. <boolProp name="Assertion.assume_success">false</boolProp>
  754. <intProp name="Assertion.test_type">16</intProp>
  755. </ResponseAssertion>
  756. <hashTree/>
  757. </hashTree>
  758. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Table" enabled="true">
  759. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  760. <collectionProp name="Arguments.arguments"/>
  761. </elementProp>
  762. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  763. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  764. <stringProp name="HTTPSampler.protocol"></stringProp>
  765. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  766. <stringProp name="HTTPSampler.path">/tables/alertTable</stringProp>
  767. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  768. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  769. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  770. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  771. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  772. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  773. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  774. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  775. </HTTPSamplerProxy>
  776. <hashTree>
  777. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  778. <collectionProp name="Asserion.test_strings">
  779. <stringProp name="701294600">Table alertTable is dropped.</stringProp>
  780. </collectionProp>
  781. <stringProp name="Assertion.custom_message"></stringProp>
  782. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  783. <boolProp name="Assertion.assume_success">false</boolProp>
  784. <intProp name="Assertion.test_type">16</intProp>
  785. </ResponseAssertion>
  786. <hashTree/>
  787. </hashTree>
  788. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  789. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  790. <collectionProp name="Arguments.arguments"/>
  791. </elementProp>
  792. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  793. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  794. <stringProp name="HTTPSampler.protocol"></stringProp>
  795. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  796. <stringProp name="HTTPSampler.path">/rules/ruleUpdateAlert</stringProp>
  797. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  798. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  799. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  800. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  801. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  802. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  803. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  804. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  805. </HTTPSamplerProxy>
  806. <hashTree>
  807. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  808. <collectionProp name="Asserion.test_strings">
  809. <stringProp name="1287637623">Rule ruleUpdateAlert is dropped.</stringProp>
  810. </collectionProp>
  811. <stringProp name="Assertion.custom_message"></stringProp>
  812. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  813. <boolProp name="Assertion.assume_success">false</boolProp>
  814. <intProp name="Assertion.test_type">16</intProp>
  815. </ResponseAssertion>
  816. <hashTree/>
  817. </hashTree>
  818. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  819. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  820. <collectionProp name="Arguments.arguments"/>
  821. </elementProp>
  822. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  823. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  824. <stringProp name="HTTPSampler.protocol"></stringProp>
  825. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  826. <stringProp name="HTTPSampler.path">/streams/alertStream</stringProp>
  827. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  828. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  829. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  830. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  831. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  832. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  833. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  834. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  835. </HTTPSamplerProxy>
  836. <hashTree>
  837. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  838. <collectionProp name="Asserion.test_strings">
  839. <stringProp name="-123753472">Stream alertStream is dropped.</stringProp>
  840. </collectionProp>
  841. <stringProp name="Assertion.custom_message"></stringProp>
  842. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  843. <boolProp name="Assertion.assume_success">false</boolProp>
  844. <intProp name="Assertion.test_type">16</intProp>
  845. </ResponseAssertion>
  846. <hashTree/>
  847. </hashTree>
  848. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  849. <stringProp name="ConstantTimer.delay">500</stringProp>
  850. </ConstantTimer>
  851. <hashTree/>
  852. </hashTree>
  853. </hashTree>
  854. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  855. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  856. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  857. <boolProp name="LoopController.continue_forever">false</boolProp>
  858. <stringProp name="LoopController.loops">3</stringProp>
  859. </elementProp>
  860. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  861. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  862. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  863. <stringProp name="ThreadGroup.duration"></stringProp>
  864. <stringProp name="ThreadGroup.delay"></stringProp>
  865. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  866. </ThreadGroup>
  867. <hashTree>
  868. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  869. <boolProp name="ResultCollector.error_logging">false</boolProp>
  870. <objProp>
  871. <name>saveConfig</name>
  872. <value class="SampleSaveConfiguration">
  873. <time>true</time>
  874. <latency>true</latency>
  875. <timestamp>true</timestamp>
  876. <success>true</success>
  877. <label>true</label>
  878. <code>true</code>
  879. <message>true</message>
  880. <threadName>true</threadName>
  881. <dataType>true</dataType>
  882. <encoding>false</encoding>
  883. <assertions>true</assertions>
  884. <subresults>true</subresults>
  885. <responseData>false</responseData>
  886. <samplerData>false</samplerData>
  887. <xml>false</xml>
  888. <fieldNames>true</fieldNames>
  889. <responseHeaders>false</responseHeaders>
  890. <requestHeaders>false</requestHeaders>
  891. <responseDataOnError>false</responseDataOnError>
  892. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  893. <assertionsResultsToSave>0</assertionsResultsToSave>
  894. <bytes>true</bytes>
  895. <sentBytes>true</sentBytes>
  896. <threadCounts>true</threadCounts>
  897. <idleTime>true</idleTime>
  898. <connectTime>true</connectTime>
  899. </value>
  900. </objProp>
  901. <stringProp name="filename"></stringProp>
  902. </ResultCollector>
  903. <hashTree/>
  904. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  905. <hashTree>
  906. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  907. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  908. <stringProp name="mqtt.port">1883</stringProp>
  909. <stringProp name="mqtt.version">3.1</stringProp>
  910. <stringProp name="mqtt.conn_timeout">10</stringProp>
  911. <boolProp name="mqtt.private_protocol">false</boolProp>
  912. <stringProp name="mqtt.listener_timeout">10</stringProp>
  913. <stringProp name="mqtt.protocol">TCP</stringProp>
  914. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  915. <stringProp name="mqtt.keystore_file_path"></stringProp>
  916. <stringProp name="mqtt.keystore_password"></stringProp>
  917. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  918. <stringProp name="mqtt.clientcert_password"></stringProp>
  919. <stringProp name="mqtt.user_name"></stringProp>
  920. <stringProp name="mqtt.password"></stringProp>
  921. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  922. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  923. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  924. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  925. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  926. <boolProp name="mqtt.conn_clean_session">true</boolProp>
  927. </net.xmeter.samplers.ConnectSampler>
  928. <hashTree/>
  929. </hashTree>
  930. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  931. <stringProp name="mqtt.topic_name">rule/alert</stringProp>
  932. <stringProp name="mqtt.qos_level">0</stringProp>
  933. <boolProp name="mqtt.add_timestamp">false</boolProp>
  934. <boolProp name="mqtt.debug_response">true</boolProp>
  935. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  936. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  937. </net.xmeter.samplers.SubSampler>
  938. <hashTree>
  939. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="value Assertion" enabled="true">
  940. <stringProp name="JSON_PATH">$.value</stringProp>
  941. <stringProp name="EXPECTED_VALUE">${value}</stringProp>
  942. <boolProp name="JSONVALIDATION">true</boolProp>
  943. <boolProp name="EXPECT_NULL">false</boolProp>
  944. <boolProp name="INVERT">false</boolProp>
  945. <boolProp name="ISREGEX">false</boolProp>
  946. </JSONPathAssertion>
  947. <hashTree/>
  948. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="device Assertion" enabled="true">
  949. <stringProp name="JSON_PATH">$.device</stringProp>
  950. <stringProp name="EXPECTED_VALUE">${device}</stringProp>
  951. <boolProp name="JSONVALIDATION">true</boolProp>
  952. <boolProp name="EXPECT_NULL">false</boolProp>
  953. <boolProp name="INVERT">false</boolProp>
  954. <boolProp name="ISREGEX">false</boolProp>
  955. </JSONPathAssertion>
  956. <hashTree/>
  957. </hashTree>
  958. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  959. <stringProp name="delimiter">,</stringProp>
  960. <stringProp name="fileEncoding"></stringProp>
  961. <stringProp name="filename">lookup_table_result_data.txt</stringProp>
  962. <boolProp name="ignoreFirstLine">false</boolProp>
  963. <boolProp name="quotedData">false</boolProp>
  964. <boolProp name="recycle">true</boolProp>
  965. <stringProp name="shareMode">shareMode.thread</stringProp>
  966. <boolProp name="stopThread">false</boolProp>
  967. <stringProp name="variableNames">device,value</stringProp>
  968. </CSVDataSet>
  969. <hashTree/>
  970. </hashTree>
  971. </hashTree>
  972. </hashTree>
  973. </jmeterTestPlan>