table_cont.jmx 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  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="5.0" jmeter="5.4.1">
  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="API_CreateTable" 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">{&#xd;
  135. &quot;sql&quot; : &quot;create table stateTable (state bigint) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;messages/state\&quot;, TYPE=\&quot;mqtt\&quot; )&quot;&#xd;
  136. }</stringProp>
  137. <stringProp name="Argument.metadata">=</stringProp>
  138. </elementProp>
  139. </collectionProp>
  140. </elementProp>
  141. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  142. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  143. <stringProp name="HTTPSampler.protocol"></stringProp>
  144. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  145. <stringProp name="HTTPSampler.path">/tables</stringProp>
  146. <stringProp name="HTTPSampler.method">POST</stringProp>
  147. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  148. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  149. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  150. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  151. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  152. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  153. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  154. </HTTPSamplerProxy>
  155. <hashTree>
  156. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  157. <collectionProp name="Asserion.test_strings">
  158. <stringProp name="41528139">Table stateTable is created.</stringProp>
  159. </collectionProp>
  160. <stringProp name="Assertion.custom_message"></stringProp>
  161. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  162. <boolProp name="Assertion.assume_success">true</boolProp>
  163. <intProp name="Assertion.test_type">16</intProp>
  164. </ResponseAssertion>
  165. <hashTree/>
  166. </hashTree>
  167. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStream" enabled="true">
  168. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  169. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  170. <collectionProp name="Arguments.arguments">
  171. <elementProp name="" elementType="HTTPArgument">
  172. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  173. <stringProp name="Argument.value">{&#xd;
  174. &quot;sql&quot; : &quot;create stream demo (temperature bigint) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;messages/iot\&quot; )&quot;&#xd;
  175. }</stringProp>
  176. <stringProp name="Argument.metadata">=</stringProp>
  177. </elementProp>
  178. </collectionProp>
  179. </elementProp>
  180. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  181. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  182. <stringProp name="HTTPSampler.protocol"></stringProp>
  183. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  184. <stringProp name="HTTPSampler.path">/streams</stringProp>
  185. <stringProp name="HTTPSampler.method">POST</stringProp>
  186. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  187. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  188. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  189. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  190. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  191. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  192. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  193. </HTTPSamplerProxy>
  194. <hashTree>
  195. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  196. <collectionProp name="Asserion.test_strings">
  197. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  198. </collectionProp>
  199. <stringProp name="Assertion.custom_message"></stringProp>
  200. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  201. <boolProp name="Assertion.assume_success">true</boolProp>
  202. <intProp name="Assertion.test_type">16</intProp>
  203. </ResponseAssertion>
  204. <hashTree/>
  205. </hashTree>
  206. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule" enabled="true">
  207. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  208. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  209. <collectionProp name="Arguments.arguments">
  210. <elementProp name="" elementType="HTTPArgument">
  211. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  212. <stringProp name="Argument.value">{&#xd;
  213. &quot;id&quot;: &quot;ruleTableCont&quot;,&#xd;
  214. &quot;sql&quot;: &quot;SELECT temperature FROM demo INNER JOIN stateTable WHERE stateTable.state= 1 AND temperature &gt; 30&quot;,&#xd;
  215. &quot;actions&quot;: [&#xd;
  216. {&#xd;
  217. &quot;mqtt&quot;: {&#xd;
  218. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  219. &quot;topic&quot;: &quot;devices/result&quot;,&#xd;
  220. &quot;qos&quot;: 1,&#xd;
  221. &quot;clientId&quot;: &quot;demo_001&quot;&#xd;
  222. }&#xd;
  223. }&#xd;
  224. ]&#xd;
  225. }</stringProp>
  226. <stringProp name="Argument.metadata">=</stringProp>
  227. </elementProp>
  228. </collectionProp>
  229. </elementProp>
  230. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  231. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  232. <stringProp name="HTTPSampler.protocol"></stringProp>
  233. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  234. <stringProp name="HTTPSampler.path">/rules</stringProp>
  235. <stringProp name="HTTPSampler.method">POST</stringProp>
  236. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  237. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  238. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  239. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  240. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  241. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  242. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  243. </HTTPSamplerProxy>
  244. <hashTree>
  245. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  246. <collectionProp name="Asserion.test_strings">
  247. <stringProp name="98624273">Rule ruleTableCont was created</stringProp>
  248. </collectionProp>
  249. <stringProp name="Assertion.custom_message"></stringProp>
  250. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  251. <boolProp name="Assertion.assume_success">true</boolProp>
  252. <intProp name="Assertion.test_type">16</intProp>
  253. </ResponseAssertion>
  254. <hashTree/>
  255. </hashTree>
  256. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  257. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  258. <collectionProp name="Arguments.arguments"/>
  259. </elementProp>
  260. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  261. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  262. <stringProp name="HTTPSampler.protocol"></stringProp>
  263. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  264. <stringProp name="HTTPSampler.path">/rules/ruleTableCont/status</stringProp>
  265. <stringProp name="HTTPSampler.method">GET</stringProp>
  266. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  267. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  268. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  269. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  270. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  271. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  272. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  273. </HTTPSamplerProxy>
  274. <hashTree>
  275. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  276. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  277. <stringProp name="EXPECTED_VALUE">0</stringProp>
  278. <boolProp name="JSONVALIDATION">true</boolProp>
  279. <boolProp name="EXPECT_NULL">false</boolProp>
  280. <boolProp name="INVERT">false</boolProp>
  281. <boolProp name="ISREGEX">false</boolProp>
  282. </JSONPathAssertion>
  283. <hashTree/>
  284. </hashTree>
  285. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="loop_controller" enabled="true">
  286. <boolProp name="LoopController.continue_forever">true</boolProp>
  287. <stringProp name="LoopController.loops">13</stringProp>
  288. </LoopController>
  289. <hashTree>
  290. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  291. <stringProp name="delimiter">,</stringProp>
  292. <stringProp name="fileEncoding"></stringProp>
  293. <stringProp name="filename">iot_data_multi_topics.txt</stringProp>
  294. <boolProp name="ignoreFirstLine">false</boolProp>
  295. <boolProp name="quotedData">false</boolProp>
  296. <boolProp name="recycle">true</boolProp>
  297. <stringProp name="shareMode">shareMode.thread</stringProp>
  298. <boolProp name="stopThread">false</boolProp>
  299. <stringProp name="variableNames">topic,num,state</stringProp>
  300. </CSVDataSet>
  301. <hashTree/>
  302. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  303. <stringProp name="mqtt.topic_name">messages/${topic}</stringProp>
  304. <stringProp name="mqtt.qos_level">0</stringProp>
  305. <boolProp name="mqtt.add_timestamp">false</boolProp>
  306. <stringProp name="mqtt.message_type">String</stringProp>
  307. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  308. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;:${num},&quot;state&quot;:${state}}</stringProp>
  309. <boolProp name="mqtt.retained_message">false</boolProp>
  310. </net.xmeter.samplers.PubSampler>
  311. <hashTree/>
  312. </hashTree>
  313. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  314. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  315. <collectionProp name="Arguments.arguments"/>
  316. </elementProp>
  317. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  318. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  319. <stringProp name="HTTPSampler.protocol"></stringProp>
  320. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  321. <stringProp name="HTTPSampler.path">/rules/ruleTableCont/status</stringProp>
  322. <stringProp name="HTTPSampler.method">GET</stringProp>
  323. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  324. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  325. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  326. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  327. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  328. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  329. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  330. </HTTPSamplerProxy>
  331. <hashTree>
  332. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  333. <stringProp name="JSON_PATH">$.source_stateTable_0_records_in_total</stringProp>
  334. <stringProp name="EXPECTED_VALUE">4</stringProp>
  335. <boolProp name="JSONVALIDATION">true</boolProp>
  336. <boolProp name="EXPECT_NULL">false</boolProp>
  337. <boolProp name="INVERT">false</boolProp>
  338. <boolProp name="ISREGEX">false</boolProp>
  339. </JSONPathAssertion>
  340. <hashTree/>
  341. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  342. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  343. <stringProp name="EXPECTED_VALUE">9</stringProp>
  344. <boolProp name="JSONVALIDATION">true</boolProp>
  345. <boolProp name="EXPECT_NULL">false</boolProp>
  346. <boolProp name="INVERT">false</boolProp>
  347. <boolProp name="ISREGEX">false</boolProp>
  348. </JSONPathAssertion>
  349. <hashTree/>
  350. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  351. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_out_total</stringProp>
  352. <stringProp name="EXPECTED_VALUE">3</stringProp>
  353. <boolProp name="JSONVALIDATION">true</boolProp>
  354. <boolProp name="EXPECT_NULL">false</boolProp>
  355. <boolProp name="INVERT">false</boolProp>
  356. <boolProp name="ISREGEX">false</boolProp>
  357. </JSONPathAssertion>
  358. <hashTree/>
  359. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  360. <stringProp name="ConstantTimer.delay">5000</stringProp>
  361. </ConstantTimer>
  362. <hashTree/>
  363. </hashTree>
  364. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  365. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  366. <collectionProp name="Arguments.arguments"/>
  367. </elementProp>
  368. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  369. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  370. <stringProp name="HTTPSampler.protocol"></stringProp>
  371. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  372. <stringProp name="HTTPSampler.path">/rules/ruleTableCont</stringProp>
  373. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  374. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  375. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  376. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  377. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  378. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  379. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  380. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  381. </HTTPSamplerProxy>
  382. <hashTree>
  383. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  384. <collectionProp name="Asserion.test_strings">
  385. <stringProp name="-1456895740">Rule ruleTableCont is dropped.</stringProp>
  386. </collectionProp>
  387. <stringProp name="Assertion.custom_message"></stringProp>
  388. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  389. <boolProp name="Assertion.assume_success">false</boolProp>
  390. <intProp name="Assertion.test_type">16</intProp>
  391. </ResponseAssertion>
  392. <hashTree/>
  393. </hashTree>
  394. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  395. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  396. <collectionProp name="Arguments.arguments"/>
  397. </elementProp>
  398. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  399. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  400. <stringProp name="HTTPSampler.protocol"></stringProp>
  401. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  402. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  403. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  404. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  405. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  406. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  407. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  408. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  409. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  410. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  411. </HTTPSamplerProxy>
  412. <hashTree>
  413. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  414. <collectionProp name="Asserion.test_strings">
  415. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  416. </collectionProp>
  417. <stringProp name="Assertion.custom_message"></stringProp>
  418. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  419. <boolProp name="Assertion.assume_success">false</boolProp>
  420. <intProp name="Assertion.test_type">16</intProp>
  421. </ResponseAssertion>
  422. <hashTree/>
  423. </hashTree>
  424. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Table" enabled="true">
  425. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  426. <collectionProp name="Arguments.arguments"/>
  427. </elementProp>
  428. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  429. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  430. <stringProp name="HTTPSampler.protocol"></stringProp>
  431. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  432. <stringProp name="HTTPSampler.path">/tables/stateTable</stringProp>
  433. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  434. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  435. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  436. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  437. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  438. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  439. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  440. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  441. </HTTPSamplerProxy>
  442. <hashTree>
  443. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  444. <collectionProp name="Asserion.test_strings">
  445. <stringProp name="2084363635">Table stateTable is dropped.</stringProp>
  446. </collectionProp>
  447. <stringProp name="Assertion.custom_message"></stringProp>
  448. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  449. <boolProp name="Assertion.assume_success">false</boolProp>
  450. <intProp name="Assertion.test_type">16</intProp>
  451. </ResponseAssertion>
  452. <hashTree/>
  453. </hashTree>
  454. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  455. <stringProp name="ConstantTimer.delay">500</stringProp>
  456. </ConstantTimer>
  457. <hashTree/>
  458. </hashTree>
  459. </hashTree>
  460. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  461. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  462. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  463. <boolProp name="LoopController.continue_forever">false</boolProp>
  464. <stringProp name="LoopController.loops">6</stringProp>
  465. </elementProp>
  466. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  467. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  468. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  469. <stringProp name="ThreadGroup.duration"></stringProp>
  470. <stringProp name="ThreadGroup.delay"></stringProp>
  471. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  472. </ThreadGroup>
  473. <hashTree>
  474. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  475. <boolProp name="ResultCollector.error_logging">false</boolProp>
  476. <objProp>
  477. <name>saveConfig</name>
  478. <value class="SampleSaveConfiguration">
  479. <time>true</time>
  480. <latency>true</latency>
  481. <timestamp>true</timestamp>
  482. <success>true</success>
  483. <label>true</label>
  484. <code>true</code>
  485. <message>true</message>
  486. <threadName>true</threadName>
  487. <dataType>true</dataType>
  488. <encoding>false</encoding>
  489. <assertions>true</assertions>
  490. <subresults>true</subresults>
  491. <responseData>false</responseData>
  492. <samplerData>false</samplerData>
  493. <xml>false</xml>
  494. <fieldNames>true</fieldNames>
  495. <responseHeaders>false</responseHeaders>
  496. <requestHeaders>false</requestHeaders>
  497. <responseDataOnError>false</responseDataOnError>
  498. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  499. <assertionsResultsToSave>0</assertionsResultsToSave>
  500. <bytes>true</bytes>
  501. <sentBytes>true</sentBytes>
  502. <threadCounts>true</threadCounts>
  503. <idleTime>true</idleTime>
  504. <connectTime>true</connectTime>
  505. </value>
  506. </objProp>
  507. <stringProp name="filename"></stringProp>
  508. </ResultCollector>
  509. <hashTree/>
  510. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  511. <hashTree>
  512. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  513. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  514. <stringProp name="mqtt.port">1883</stringProp>
  515. <stringProp name="mqtt.version">3.1</stringProp>
  516. <stringProp name="mqtt.conn_timeout">10</stringProp>
  517. <boolProp name="mqtt.private_protocol">false</boolProp>
  518. <stringProp name="mqtt.listener_timeout">10</stringProp>
  519. <stringProp name="mqtt.protocol">TCP</stringProp>
  520. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  521. <stringProp name="mqtt.keystore_file_path"></stringProp>
  522. <stringProp name="mqtt.keystore_password"></stringProp>
  523. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  524. <stringProp name="mqtt.clientcert_password"></stringProp>
  525. <stringProp name="mqtt.user_name"></stringProp>
  526. <stringProp name="mqtt.password"></stringProp>
  527. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  528. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  529. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  530. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  531. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  532. <boolProp name="mqtt.conn_clean_session">true</boolProp>
  533. </net.xmeter.samplers.ConnectSampler>
  534. <hashTree/>
  535. </hashTree>
  536. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  537. <stringProp name="mqtt.topic_name">devices/result</stringProp>
  538. <stringProp name="mqtt.qos_level">0</stringProp>
  539. <boolProp name="mqtt.add_timestamp">false</boolProp>
  540. <boolProp name="mqtt.debug_response">true</boolProp>
  541. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  542. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  543. </net.xmeter.samplers.SubSampler>
  544. <hashTree>
  545. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="temperature Assertion" enabled="true">
  546. <stringProp name="JSON_PATH">$[0].temperature</stringProp>
  547. <stringProp name="EXPECTED_VALUE">${temperature}</stringProp>
  548. <boolProp name="JSONVALIDATION">true</boolProp>
  549. <boolProp name="EXPECT_NULL">false</boolProp>
  550. <boolProp name="INVERT">false</boolProp>
  551. <boolProp name="ISREGEX">false</boolProp>
  552. </JSONPathAssertion>
  553. <hashTree/>
  554. </hashTree>
  555. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  556. <stringProp name="delimiter">,</stringProp>
  557. <stringProp name="fileEncoding"></stringProp>
  558. <stringProp name="filename">table_cont_result_data.txt</stringProp>
  559. <boolProp name="ignoreFirstLine">false</boolProp>
  560. <boolProp name="quotedData">false</boolProp>
  561. <boolProp name="recycle">false</boolProp>
  562. <stringProp name="shareMode">shareMode.thread</stringProp>
  563. <boolProp name="stopThread">true</boolProp>
  564. <stringProp name="variableNames">temperature</stringProp>
  565. </CSVDataSet>
  566. <hashTree/>
  567. </hashTree>
  568. </hashTree>
  569. </hashTree>
  570. </jmeterTestPlan>