rule_test.jmx 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Copyright 2021 EMQ Technologies Co., Ltd.
  4. ~
  5. ~ Licensed under the Apache License, Version 2.0 (the "License");
  6. ~ you may not use this file except in compliance with the License.
  7. ~ You may obtain a copy of the License at
  8. ~
  9. ~ http://www.apache.org/licenses/LICENSE-2.0
  10. ~
  11. ~ Unless required by applicable law or agreed to in writing, software
  12. ~ distributed under the License is distributed on an "AS IS" BASIS,
  13. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ~ See the License for the specific language governing permissions and
  15. ~ limitations under the License.
  16. -->
  17. <jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414">
  18. <hashTree>
  19. <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
  20. <stringProp name="TestPlan.comments"></stringProp>
  21. <boolProp name="TestPlan.functional_mode">false</boolProp>
  22. <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
  23. <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
  24. <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  25. <collectionProp name="Arguments.arguments"/>
  26. </elementProp>
  27. <stringProp name="TestPlan.user_define_classpath"></stringProp>
  28. </TestPlan>
  29. <hashTree>
  30. <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  31. <collectionProp name="Arguments.arguments">
  32. <elementProp name="srv" elementType="Argument">
  33. <stringProp name="Argument.name">srv</stringProp>
  34. <stringProp name="Argument.value">127.0.0.1</stringProp>
  35. <stringProp name="Argument.metadata">=</stringProp>
  36. </elementProp>
  37. <elementProp name="rest_port" elementType="Argument">
  38. <stringProp name="Argument.name">rest_port</stringProp>
  39. <stringProp name="Argument.value">9081</stringProp>
  40. <stringProp name="Argument.metadata">=</stringProp>
  41. </elementProp>
  42. <elementProp name="k_home" elementType="Argument">
  43. <stringProp name="Argument.name">k_home</stringProp>
  44. <stringProp name="Argument.value">${__property(base,,)}</stringProp>
  45. <stringProp name="Argument.metadata">=</stringProp>
  46. </elementProp>
  47. <elementProp name="fvt" elementType="Argument">
  48. <stringProp name="Argument.name">fvt</stringProp>
  49. <stringProp name="Argument.value">${__property(fvt,,)}</stringProp>
  50. <stringProp name="Argument.metadata">=</stringProp>
  51. </elementProp>
  52. </collectionProp>
  53. </Arguments>
  54. <hashTree/>
  55. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Rules" enabled="true">
  56. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  57. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  58. <boolProp name="LoopController.continue_forever">false</boolProp>
  59. <stringProp name="LoopController.loops">1</stringProp>
  60. </elementProp>
  61. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  62. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  63. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  64. <stringProp name="ThreadGroup.duration"></stringProp>
  65. <stringProp name="ThreadGroup.delay"></stringProp>
  66. </ThreadGroup>
  67. <hashTree>
  68. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="API" enabled="true">
  69. <boolProp name="TransactionController.includeTimers">false</boolProp>
  70. <boolProp name="TransactionController.parent">false</boolProp>
  71. </TransactionController>
  72. <hashTree>
  73. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStream" enabled="true">
  74. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  75. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  76. <collectionProp name="Arguments.arguments">
  77. <elementProp name="" elementType="HTTPArgument">
  78. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  79. <stringProp name="Argument.value">{&#xd;
  80. &quot;sql&quot; : &quot;create stream demo (temperature float, humidity bigint) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;devices/+/messages\&quot; )&quot;&#xd;
  81. }</stringProp>
  82. <stringProp name="Argument.metadata">=</stringProp>
  83. </elementProp>
  84. </collectionProp>
  85. </elementProp>
  86. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  87. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  88. <stringProp name="HTTPSampler.protocol"></stringProp>
  89. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  90. <stringProp name="HTTPSampler.path">/streams</stringProp>
  91. <stringProp name="HTTPSampler.method">POST</stringProp>
  92. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  93. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  94. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  95. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  96. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  97. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  98. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  99. </HTTPSamplerProxy>
  100. <hashTree>
  101. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  102. <collectionProp name="Asserion.test_strings">
  103. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  104. </collectionProp>
  105. <stringProp name="Assertion.custom_message"></stringProp>
  106. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  107. <boolProp name="Assertion.assume_success">true</boolProp>
  108. <intProp name="Assertion.test_type">16</intProp>
  109. </ResponseAssertion>
  110. <hashTree/>
  111. </hashTree>
  112. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule" enabled="true">
  113. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  114. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  115. <collectionProp name="Arguments.arguments">
  116. <elementProp name="" elementType="HTTPArgument">
  117. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  118. <stringProp name="Argument.value">{&#xd;
  119. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  120. &quot;sql&quot;: &quot;SELECT * FROM demo&quot;,&#xd;
  121. &quot;actions&quot;: [&#xd;
  122. {&#xd;
  123. &quot;log&quot;: {}&#xd;
  124. },&#xd;
  125. {&#xd;
  126. &quot;mqtt&quot;: {&#xd;
  127. &quot;server&quot;: &quot;tcp://127.0.0.1:1883&quot;,&#xd;
  128. &quot;topic&quot;: &quot;devices/result&quot;,&#xd;
  129. &quot;qos&quot;: 1,&#xd;
  130. &quot;clientId&quot;: &quot;demo_001&quot;&#xd;
  131. }&#xd;
  132. }&#xd;
  133. ]&#xd;
  134. }</stringProp>
  135. <stringProp name="Argument.metadata">=</stringProp>
  136. </elementProp>
  137. </collectionProp>
  138. </elementProp>
  139. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  140. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  141. <stringProp name="HTTPSampler.protocol"></stringProp>
  142. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  143. <stringProp name="HTTPSampler.path">/rules</stringProp>
  144. <stringProp name="HTTPSampler.method">POST</stringProp>
  145. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  146. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  147. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  148. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  149. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  150. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  151. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  152. </HTTPSamplerProxy>
  153. <hashTree>
  154. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  155. <collectionProp name="Asserion.test_strings">
  156. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  157. </collectionProp>
  158. <stringProp name="Assertion.custom_message"></stringProp>
  159. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  160. <boolProp name="Assertion.assume_success">true</boolProp>
  161. <intProp name="Assertion.test_type">16</intProp>
  162. </ResponseAssertion>
  163. <hashTree/>
  164. </hashTree>
  165. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_ShowRules" enabled="true">
  166. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  167. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  168. <collectionProp name="Arguments.arguments">
  169. <elementProp name="" elementType="HTTPArgument">
  170. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  171. <stringProp name="Argument.value"></stringProp>
  172. <stringProp name="Argument.metadata">=</stringProp>
  173. </elementProp>
  174. </collectionProp>
  175. </elementProp>
  176. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  177. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  178. <stringProp name="HTTPSampler.protocol"></stringProp>
  179. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  180. <stringProp name="HTTPSampler.path">/rules</stringProp>
  181. <stringProp name="HTTPSampler.method">GET</stringProp>
  182. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  183. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  184. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  185. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  186. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  187. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  188. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  189. </HTTPSamplerProxy>
  190. <hashTree>
  191. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  192. <stringProp name="JSON_PATH">$[0].id</stringProp>
  193. <stringProp name="EXPECTED_VALUE">rule1</stringProp>
  194. <boolProp name="JSONVALIDATION">false</boolProp>
  195. <boolProp name="EXPECT_NULL">false</boolProp>
  196. <boolProp name="INVERT">false</boolProp>
  197. <boolProp name="ISREGEX">true</boolProp>
  198. </JSONPathAssertion>
  199. <hashTree/>
  200. </hashTree>
  201. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DescribeRule" enabled="true">
  202. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  203. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  204. <collectionProp name="Arguments.arguments">
  205. <elementProp name="" elementType="HTTPArgument">
  206. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  207. <stringProp name="Argument.value"></stringProp>
  208. <stringProp name="Argument.metadata">=</stringProp>
  209. </elementProp>
  210. </collectionProp>
  211. </elementProp>
  212. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  213. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  214. <stringProp name="HTTPSampler.protocol"></stringProp>
  215. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  216. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  217. <stringProp name="HTTPSampler.method">GET</stringProp>
  218. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  219. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  220. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  221. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  222. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  223. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  224. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  225. </HTTPSamplerProxy>
  226. <hashTree>
  227. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  228. <stringProp name="JSON_PATH">$.sql</stringProp>
  229. <stringProp name="EXPECTED_VALUE">SELECT \* FROM demo</stringProp>
  230. <boolProp name="JSONVALIDATION">true</boolProp>
  231. <boolProp name="EXPECT_NULL">false</boolProp>
  232. <boolProp name="INVERT">false</boolProp>
  233. <boolProp name="ISREGEX">true</boolProp>
  234. </JSONPathAssertion>
  235. <hashTree/>
  236. </hashTree>
  237. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  238. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  239. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  240. <collectionProp name="Arguments.arguments">
  241. <elementProp name="" elementType="HTTPArgument">
  242. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  243. <stringProp name="Argument.value"></stringProp>
  244. <stringProp name="Argument.metadata">=</stringProp>
  245. </elementProp>
  246. </collectionProp>
  247. </elementProp>
  248. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  249. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  250. <stringProp name="HTTPSampler.protocol"></stringProp>
  251. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  252. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  253. <stringProp name="HTTPSampler.method">GET</stringProp>
  254. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  255. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  256. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  257. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  258. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  259. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  260. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  261. </HTTPSamplerProxy>
  262. <hashTree>
  263. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  264. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  265. <stringProp name="EXPECTED_VALUE">0</stringProp>
  266. <boolProp name="JSONVALIDATION">true</boolProp>
  267. <boolProp name="EXPECT_NULL">false</boolProp>
  268. <boolProp name="INVERT">false</boolProp>
  269. <boolProp name="ISREGEX">false</boolProp>
  270. </JSONPathAssertion>
  271. <hashTree/>
  272. </hashTree>
  273. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  274. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  275. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  276. <collectionProp name="Arguments.arguments">
  277. <elementProp name="" elementType="HTTPArgument">
  278. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  279. <stringProp name="Argument.value"></stringProp>
  280. <stringProp name="Argument.metadata">=</stringProp>
  281. </elementProp>
  282. </collectionProp>
  283. </elementProp>
  284. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  285. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  286. <stringProp name="HTTPSampler.protocol"></stringProp>
  287. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  288. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  289. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  290. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  291. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  292. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  293. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  294. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  295. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  296. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  297. </HTTPSamplerProxy>
  298. <hashTree>
  299. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  300. <collectionProp name="Asserion.test_strings">
  301. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  302. </collectionProp>
  303. <stringProp name="Assertion.custom_message"></stringProp>
  304. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  305. <boolProp name="Assertion.assume_success">false</boolProp>
  306. <intProp name="Assertion.test_type">16</intProp>
  307. </ResponseAssertion>
  308. <hashTree/>
  309. </hashTree>
  310. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  311. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  312. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  313. <collectionProp name="Arguments.arguments">
  314. <elementProp name="" elementType="HTTPArgument">
  315. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  316. <stringProp name="Argument.value"></stringProp>
  317. <stringProp name="Argument.metadata">=</stringProp>
  318. </elementProp>
  319. </collectionProp>
  320. </elementProp>
  321. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  322. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  323. <stringProp name="HTTPSampler.protocol"></stringProp>
  324. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  325. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  326. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  327. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  328. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  329. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  330. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  331. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  332. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  333. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  334. </HTTPSamplerProxy>
  335. <hashTree>
  336. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  337. <collectionProp name="Asserion.test_strings">
  338. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  339. </collectionProp>
  340. <stringProp name="Assertion.custom_message"></stringProp>
  341. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  342. <boolProp name="Assertion.assume_success">false</boolProp>
  343. <intProp name="Assertion.test_type">16</intProp>
  344. </ResponseAssertion>
  345. <hashTree/>
  346. </hashTree>
  347. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  348. <stringProp name="ConstantTimer.delay">500</stringProp>
  349. </ConstantTimer>
  350. <hashTree/>
  351. </hashTree>
  352. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="CLI" enabled="true">
  353. <boolProp name="TransactionController.includeTimers">false</boolProp>
  354. <boolProp name="TransactionController.parent">false</boolProp>
  355. </TransactionController>
  356. <hashTree>
  357. <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="CLI_CreateStream" enabled="true">
  358. <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
  359. <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
  360. <stringProp name="SystemSampler.command">bin/kuiper</stringProp>
  361. <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  362. <collectionProp name="Arguments.arguments">
  363. <elementProp name="" elementType="Argument">
  364. <stringProp name="Argument.name"></stringProp>
  365. <stringProp name="Argument.value">create</stringProp>
  366. <stringProp name="Argument.metadata">=</stringProp>
  367. </elementProp>
  368. <elementProp name="" elementType="Argument">
  369. <stringProp name="Argument.name"></stringProp>
  370. <stringProp name="Argument.value">stream</stringProp>
  371. <stringProp name="Argument.metadata">=</stringProp>
  372. </elementProp>
  373. <elementProp name="" elementType="Argument">
  374. <stringProp name="Argument.name"></stringProp>
  375. <stringProp name="Argument.value">demo</stringProp>
  376. <stringProp name="Argument.metadata">=</stringProp>
  377. </elementProp>
  378. <elementProp name="" elementType="Argument">
  379. <stringProp name="Argument.name"></stringProp>
  380. <stringProp name="Argument.value">(temperature float, humidity bigint) WITH (FORMAT=&quot;JSON&quot;, DATASOURCE=&quot;devices/+/messages&quot;)</stringProp>
  381. <stringProp name="Argument.metadata">=</stringProp>
  382. </elementProp>
  383. </collectionProp>
  384. </elementProp>
  385. <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  386. <collectionProp name="Arguments.arguments"/>
  387. </elementProp>
  388. <stringProp name="SystemSampler.directory">${k_home}</stringProp>
  389. </SystemSampler>
  390. <hashTree>
  391. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  392. <collectionProp name="Asserion.test_strings">
  393. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  394. </collectionProp>
  395. <stringProp name="Assertion.custom_message"></stringProp>
  396. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  397. <boolProp name="Assertion.assume_success">false</boolProp>
  398. <intProp name="Assertion.test_type">16</intProp>
  399. </ResponseAssertion>
  400. <hashTree/>
  401. </hashTree>
  402. <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="CLI_CreateRule" enabled="true">
  403. <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
  404. <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
  405. <stringProp name="SystemSampler.command">bin/kuiper</stringProp>
  406. <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  407. <collectionProp name="Arguments.arguments">
  408. <elementProp name="" elementType="Argument">
  409. <stringProp name="Argument.name"></stringProp>
  410. <stringProp name="Argument.value">create</stringProp>
  411. <stringProp name="Argument.metadata">=</stringProp>
  412. </elementProp>
  413. <elementProp name="" elementType="Argument">
  414. <stringProp name="Argument.name"></stringProp>
  415. <stringProp name="Argument.value">rule</stringProp>
  416. <stringProp name="Argument.metadata">=</stringProp>
  417. </elementProp>
  418. <elementProp name="" elementType="Argument">
  419. <stringProp name="Argument.name"></stringProp>
  420. <stringProp name="Argument.value">rule1</stringProp>
  421. <stringProp name="Argument.metadata">=</stringProp>
  422. </elementProp>
  423. <elementProp name="" elementType="Argument">
  424. <stringProp name="Argument.name"></stringProp>
  425. <stringProp name="Argument.value">-f</stringProp>
  426. <stringProp name="Argument.metadata">=</stringProp>
  427. </elementProp>
  428. <elementProp name="" elementType="Argument">
  429. <stringProp name="Argument.name"></stringProp>
  430. <stringProp name="Argument.value">${fvt}/test/rule1.txt</stringProp>
  431. <stringProp name="Argument.metadata">=</stringProp>
  432. </elementProp>
  433. </collectionProp>
  434. </elementProp>
  435. <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  436. <collectionProp name="Arguments.arguments"/>
  437. </elementProp>
  438. <stringProp name="SystemSampler.directory">${k_home}</stringProp>
  439. </SystemSampler>
  440. <hashTree>
  441. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  442. <collectionProp name="Asserion.test_strings">
  443. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  444. </collectionProp>
  445. <stringProp name="Assertion.custom_message"></stringProp>
  446. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  447. <boolProp name="Assertion.assume_success">false</boolProp>
  448. <intProp name="Assertion.test_type">16</intProp>
  449. </ResponseAssertion>
  450. <hashTree/>
  451. </hashTree>
  452. <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="CLI_ShowRules" enabled="true">
  453. <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
  454. <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
  455. <stringProp name="SystemSampler.command">bin/kuiper</stringProp>
  456. <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  457. <collectionProp name="Arguments.arguments">
  458. <elementProp name="" elementType="Argument">
  459. <stringProp name="Argument.name"></stringProp>
  460. <stringProp name="Argument.value">show</stringProp>
  461. <stringProp name="Argument.metadata">=</stringProp>
  462. </elementProp>
  463. <elementProp name="" elementType="Argument">
  464. <stringProp name="Argument.name"></stringProp>
  465. <stringProp name="Argument.value">rules</stringProp>
  466. <stringProp name="Argument.metadata">=</stringProp>
  467. </elementProp>
  468. </collectionProp>
  469. </elementProp>
  470. <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  471. <collectionProp name="Arguments.arguments"/>
  472. </elementProp>
  473. <stringProp name="SystemSampler.directory">${k_home}</stringProp>
  474. </SystemSampler>
  475. <hashTree>
  476. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  477. <collectionProp name="Asserion.test_strings">
  478. <stringProp name="108873909">rule1</stringProp>
  479. </collectionProp>
  480. <stringProp name="Assertion.custom_message"></stringProp>
  481. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  482. <boolProp name="Assertion.assume_success">false</boolProp>
  483. <intProp name="Assertion.test_type">16</intProp>
  484. </ResponseAssertion>
  485. <hashTree/>
  486. </hashTree>
  487. <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="CLI_DescribeRule" enabled="true">
  488. <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
  489. <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
  490. <stringProp name="SystemSampler.command">bin/kuiper</stringProp>
  491. <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  492. <collectionProp name="Arguments.arguments">
  493. <elementProp name="" elementType="Argument">
  494. <stringProp name="Argument.name"></stringProp>
  495. <stringProp name="Argument.value">describe</stringProp>
  496. <stringProp name="Argument.metadata">=</stringProp>
  497. </elementProp>
  498. <elementProp name="" elementType="Argument">
  499. <stringProp name="Argument.name"></stringProp>
  500. <stringProp name="Argument.value">rule</stringProp>
  501. <stringProp name="Argument.metadata">=</stringProp>
  502. </elementProp>
  503. <elementProp name="" elementType="Argument">
  504. <stringProp name="Argument.name"></stringProp>
  505. <stringProp name="Argument.value">rule1</stringProp>
  506. <stringProp name="Argument.metadata">=</stringProp>
  507. </elementProp>
  508. </collectionProp>
  509. </elementProp>
  510. <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  511. <collectionProp name="Arguments.arguments"/>
  512. </elementProp>
  513. <stringProp name="SystemSampler.directory">${k_home}</stringProp>
  514. </SystemSampler>
  515. <hashTree>
  516. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  517. <collectionProp name="Asserion.test_strings">
  518. <stringProp name="304363919">devices/result</stringProp>
  519. </collectionProp>
  520. <stringProp name="Assertion.custom_message"></stringProp>
  521. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  522. <boolProp name="Assertion.assume_success">false</boolProp>
  523. <intProp name="Assertion.test_type">16</intProp>
  524. </ResponseAssertion>
  525. <hashTree/>
  526. </hashTree>
  527. <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="CLI_GetRuleStatus" enabled="true">
  528. <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
  529. <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
  530. <stringProp name="SystemSampler.command">bin/kuiper</stringProp>
  531. <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  532. <collectionProp name="Arguments.arguments">
  533. <elementProp name="" elementType="Argument">
  534. <stringProp name="Argument.name"></stringProp>
  535. <stringProp name="Argument.value">getstatus</stringProp>
  536. <stringProp name="Argument.metadata">=</stringProp>
  537. </elementProp>
  538. <elementProp name="" elementType="Argument">
  539. <stringProp name="Argument.name"></stringProp>
  540. <stringProp name="Argument.value">rule</stringProp>
  541. <stringProp name="Argument.metadata">=</stringProp>
  542. </elementProp>
  543. <elementProp name="" elementType="Argument">
  544. <stringProp name="Argument.name"></stringProp>
  545. <stringProp name="Argument.value">rule1</stringProp>
  546. <stringProp name="Argument.metadata">=</stringProp>
  547. </elementProp>
  548. </collectionProp>
  549. </elementProp>
  550. <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  551. <collectionProp name="Arguments.arguments"/>
  552. </elementProp>
  553. <stringProp name="SystemSampler.directory">${k_home}</stringProp>
  554. </SystemSampler>
  555. <hashTree>
  556. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  557. <collectionProp name="Asserion.test_strings">
  558. <stringProp name="679259374">source_demo_0_records_in_total</stringProp>
  559. </collectionProp>
  560. <stringProp name="Assertion.custom_message"></stringProp>
  561. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  562. <boolProp name="Assertion.assume_success">false</boolProp>
  563. <intProp name="Assertion.test_type">16</intProp>
  564. </ResponseAssertion>
  565. <hashTree/>
  566. </hashTree>
  567. <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="CLI_DropRule" enabled="true">
  568. <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
  569. <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
  570. <stringProp name="SystemSampler.command">bin/kuiper</stringProp>
  571. <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  572. <collectionProp name="Arguments.arguments">
  573. <elementProp name="" elementType="Argument">
  574. <stringProp name="Argument.name"></stringProp>
  575. <stringProp name="Argument.value">drop</stringProp>
  576. <stringProp name="Argument.metadata">=</stringProp>
  577. </elementProp>
  578. <elementProp name="" elementType="Argument">
  579. <stringProp name="Argument.name"></stringProp>
  580. <stringProp name="Argument.value">rule</stringProp>
  581. <stringProp name="Argument.metadata">=</stringProp>
  582. </elementProp>
  583. <elementProp name="" elementType="Argument">
  584. <stringProp name="Argument.name"></stringProp>
  585. <stringProp name="Argument.value">rule1</stringProp>
  586. <stringProp name="Argument.metadata">=</stringProp>
  587. </elementProp>
  588. </collectionProp>
  589. </elementProp>
  590. <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  591. <collectionProp name="Arguments.arguments"/>
  592. </elementProp>
  593. <stringProp name="SystemSampler.directory">${k_home}</stringProp>
  594. </SystemSampler>
  595. <hashTree>
  596. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  597. <collectionProp name="Asserion.test_strings">
  598. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  599. </collectionProp>
  600. <stringProp name="Assertion.custom_message"></stringProp>
  601. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  602. <boolProp name="Assertion.assume_success">false</boolProp>
  603. <intProp name="Assertion.test_type">16</intProp>
  604. </ResponseAssertion>
  605. <hashTree/>
  606. </hashTree>
  607. <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="CLI_DropStream" enabled="true">
  608. <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
  609. <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
  610. <stringProp name="SystemSampler.command">bin/kuiper</stringProp>
  611. <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  612. <collectionProp name="Arguments.arguments">
  613. <elementProp name="" elementType="Argument">
  614. <stringProp name="Argument.name"></stringProp>
  615. <stringProp name="Argument.value">drop</stringProp>
  616. <stringProp name="Argument.metadata">=</stringProp>
  617. </elementProp>
  618. <elementProp name="" elementType="Argument">
  619. <stringProp name="Argument.name"></stringProp>
  620. <stringProp name="Argument.value">stream</stringProp>
  621. <stringProp name="Argument.metadata">=</stringProp>
  622. </elementProp>
  623. <elementProp name="" elementType="Argument">
  624. <stringProp name="Argument.name"></stringProp>
  625. <stringProp name="Argument.value">demo</stringProp>
  626. <stringProp name="Argument.metadata">=</stringProp>
  627. </elementProp>
  628. </collectionProp>
  629. </elementProp>
  630. <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  631. <collectionProp name="Arguments.arguments"/>
  632. </elementProp>
  633. <stringProp name="SystemSampler.directory">${k_home}</stringProp>
  634. </SystemSampler>
  635. <hashTree>
  636. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  637. <collectionProp name="Asserion.test_strings">
  638. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  639. </collectionProp>
  640. <stringProp name="Assertion.custom_message"></stringProp>
  641. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  642. <boolProp name="Assertion.assume_success">false</boolProp>
  643. <intProp name="Assertion.test_type">16</intProp>
  644. </ResponseAssertion>
  645. <hashTree/>
  646. </hashTree>
  647. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  648. <stringProp name="ConstantTimer.delay">500</stringProp>
  649. </ConstantTimer>
  650. <hashTree/>
  651. </hashTree>
  652. </hashTree>
  653. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  654. <boolProp name="ResultCollector.error_logging">false</boolProp>
  655. <objProp>
  656. <name>saveConfig</name>
  657. <value class="SampleSaveConfiguration">
  658. <time>true</time>
  659. <latency>true</latency>
  660. <timestamp>true</timestamp>
  661. <success>true</success>
  662. <label>true</label>
  663. <code>true</code>
  664. <message>true</message>
  665. <threadName>true</threadName>
  666. <dataType>true</dataType>
  667. <encoding>false</encoding>
  668. <assertions>true</assertions>
  669. <subresults>true</subresults>
  670. <responseData>false</responseData>
  671. <samplerData>false</samplerData>
  672. <xml>false</xml>
  673. <fieldNames>true</fieldNames>
  674. <responseHeaders>false</responseHeaders>
  675. <requestHeaders>false</requestHeaders>
  676. <responseDataOnError>false</responseDataOnError>
  677. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  678. <assertionsResultsToSave>0</assertionsResultsToSave>
  679. <bytes>true</bytes>
  680. <sentBytes>true</sentBytes>
  681. <threadCounts>true</threadCounts>
  682. <idleTime>true</idleTime>
  683. <connectTime>true</connectTime>
  684. </value>
  685. </objProp>
  686. <stringProp name="filename"></stringProp>
  687. </ResultCollector>
  688. <hashTree/>
  689. </hashTree>
  690. </hashTree>
  691. </jmeterTestPlan>