binary_image_process.jmx 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Copyright 2021-2022 EMQ Technologies Co., Ltd.
  4. ~
  5. ~ Licensed under the Apache License, Version 2.0 (the "License");
  6. ~ you may not use this file except in compliance with the License.
  7. ~ You may obtain a copy of the License at
  8. ~
  9. ~ http://www.apache.org/licenses/LICENSE-2.0
  10. ~
  11. ~ Unless required by applicable law or agreed to in writing, software
  12. ~ distributed under the License is distributed on an "AS IS" BASIS,
  13. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ~ See the License for the specific language governing permissions and
  15. ~ limitations under the License.
  16. -->
  17. <jmeterTestPlan version="1.2" properties="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="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. </ThreadGroup>
  62. <hashTree>
  63. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  64. <boolProp name="ResultCollector.error_logging">false</boolProp>
  65. <objProp>
  66. <name>saveConfig</name>
  67. <value class="SampleSaveConfiguration">
  68. <time>true</time>
  69. <latency>true</latency>
  70. <timestamp>true</timestamp>
  71. <success>true</success>
  72. <label>true</label>
  73. <code>true</code>
  74. <message>true</message>
  75. <threadName>true</threadName>
  76. <dataType>true</dataType>
  77. <encoding>false</encoding>
  78. <assertions>true</assertions>
  79. <subresults>true</subresults>
  80. <responseData>false</responseData>
  81. <samplerData>false</samplerData>
  82. <xml>false</xml>
  83. <fieldNames>true</fieldNames>
  84. <responseHeaders>false</responseHeaders>
  85. <requestHeaders>false</requestHeaders>
  86. <responseDataOnError>false</responseDataOnError>
  87. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  88. <assertionsResultsToSave>0</assertionsResultsToSave>
  89. <bytes>true</bytes>
  90. <sentBytes>true</sentBytes>
  91. <threadCounts>true</threadCounts>
  92. <idleTime>true</idleTime>
  93. <connectTime>true</connectTime>
  94. </value>
  95. </objProp>
  96. <stringProp name="filename"></stringProp>
  97. </ResultCollector>
  98. <hashTree/>
  99. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="API" enabled="true">
  100. <boolProp name="TransactionController.includeTimers">false</boolProp>
  101. <boolProp name="TransactionController.parent">false</boolProp>
  102. </TransactionController>
  103. <hashTree>
  104. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  105. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  106. <stringProp name="mqtt.port">1883</stringProp>
  107. <stringProp name="mqtt.version">3.1</stringProp>
  108. <stringProp name="mqtt.conn_timeout">10</stringProp>
  109. <boolProp name="mqtt.private_protocol">false</boolProp>
  110. <stringProp name="mqtt.listener_timeout">10</stringProp>
  111. <stringProp name="mqtt.protocol">TCP</stringProp>
  112. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  113. <stringProp name="mqtt.keystore_file_path"></stringProp>
  114. <stringProp name="mqtt.keystore_password"></stringProp>
  115. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  116. <stringProp name="mqtt.clientcert_password"></stringProp>
  117. <stringProp name="mqtt.user_name"></stringProp>
  118. <stringProp name="mqtt.password"></stringProp>
  119. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  120. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  121. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  122. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  123. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  124. </net.xmeter.samplers.ConnectSampler>
  125. <hashTree/>
  126. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_AddPlugin" enabled="true">
  127. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  128. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  129. <collectionProp name="Arguments.arguments">
  130. <elementProp name="" elementType="HTTPArgument">
  131. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  132. <stringProp name="Argument.value">{&#xd;
  133. &quot;name&quot;:&quot;image&quot;,&#xd;
  134. &quot;file&quot;:&quot;http://127.0.0.1:9090/plugins/image.zip&quot;,&#xd;
  135. &quot;functions&quot;:[&quot;resize&quot;,&quot;thumbnail&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">/plugins/functions</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="49587">201</stringProp>
  159. </collectionProp>
  160. <stringProp name="Assertion.custom_message"></stringProp>
  161. <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
  162. <boolProp name="Assertion.assume_success">true</boolProp>
  163. <intProp name="Assertion.test_type">16</intProp>
  164. </ResponseAssertion>
  165. <hashTree/>
  166. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  167. <stringProp name="ConstantTimer.delay">500</stringProp>
  168. </ConstantTimer>
  169. <hashTree/>
  170. </hashTree>
  171. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetFunc" enabled="true">
  172. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  173. <collectionProp name="Arguments.arguments"/>
  174. </elementProp>
  175. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  176. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  177. <stringProp name="HTTPSampler.protocol"></stringProp>
  178. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  179. <stringProp name="HTTPSampler.path">/plugins/udfs/resize</stringProp>
  180. <stringProp name="HTTPSampler.method">GET</stringProp>
  181. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  182. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  183. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  184. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  185. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  186. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  187. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  188. </HTTPSamplerProxy>
  189. <hashTree>
  190. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  191. <stringProp name="JSON_PATH">$.plugin</stringProp>
  192. <stringProp name="EXPECTED_VALUE">image</stringProp>
  193. <boolProp name="JSONVALIDATION">true</boolProp>
  194. <boolProp name="EXPECT_NULL">false</boolProp>
  195. <boolProp name="INVERT">false</boolProp>
  196. <boolProp name="ISREGEX">false</boolProp>
  197. </JSONPathAssertion>
  198. <hashTree/>
  199. </hashTree>
  200. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStream" enabled="true">
  201. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  202. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  203. <collectionProp name="Arguments.arguments">
  204. <elementProp name="" elementType="HTTPArgument">
  205. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  206. <stringProp name="Argument.value">{&#xd;
  207. &quot;sql&quot; : &quot;create stream demo (image BYTEA) WITH (FORMAT=\&quot;BINARY\&quot;, DATASOURCE=\&quot;devices/+/images\&quot; )&quot;&#xd;
  208. }</stringProp>
  209. <stringProp name="Argument.metadata">=</stringProp>
  210. </elementProp>
  211. </collectionProp>
  212. </elementProp>
  213. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  214. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  215. <stringProp name="HTTPSampler.protocol"></stringProp>
  216. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  217. <stringProp name="HTTPSampler.path">/streams</stringProp>
  218. <stringProp name="HTTPSampler.method">POST</stringProp>
  219. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  220. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  221. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  222. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  223. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  224. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  225. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  226. </HTTPSamplerProxy>
  227. <hashTree>
  228. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  229. <collectionProp name="Asserion.test_strings">
  230. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  231. </collectionProp>
  232. <stringProp name="Assertion.custom_message"></stringProp>
  233. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  234. <boolProp name="Assertion.assume_success">true</boolProp>
  235. <intProp name="Assertion.test_type">16</intProp>
  236. </ResponseAssertion>
  237. <hashTree/>
  238. </hashTree>
  239. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule" enabled="true">
  240. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  241. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  242. <collectionProp name="Arguments.arguments">
  243. <elementProp name="" elementType="HTTPArgument">
  244. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  245. <stringProp name="Argument.value">{&#xd;
  246. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  247. &quot;sql&quot;: &quot;SELECT * FROM demo&quot;,&#xd;
  248. &quot;actions&quot;: [&#xd;
  249. {&#xd;
  250. &quot;mqtt&quot;: {&#xd;
  251. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  252. &quot;topic&quot;: &quot;devices/result&quot;,&#xd;
  253. &quot;qos&quot;: 1,&#xd;
  254. &quot;clientId&quot;: &quot;demo_001&quot;,&#xd;
  255. &quot;sendSingle&quot;: true,&#xd;
  256. &quot;dataTemplate&quot;: &quot;{{json .}}&quot;&#xd;
  257. }&#xd;
  258. }&#xd;
  259. ]&#xd;
  260. }</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">/rules</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="-2022196798">Rule rule1 was 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="API_GetRuleStatus" 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"></stringProp>
  298. <stringProp name="Argument.metadata">=</stringProp>
  299. </elementProp>
  300. </collectionProp>
  301. </elementProp>
  302. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  303. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  304. <stringProp name="HTTPSampler.protocol"></stringProp>
  305. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  306. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  307. <stringProp name="HTTPSampler.method">GET</stringProp>
  308. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  309. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  310. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  311. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  312. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  313. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  314. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  315. </HTTPSamplerProxy>
  316. <hashTree>
  317. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  318. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  319. <stringProp name="EXPECTED_VALUE">0</stringProp>
  320. <boolProp name="JSONVALIDATION">true</boolProp>
  321. <boolProp name="EXPECT_NULL">false</boolProp>
  322. <boolProp name="INVERT">false</boolProp>
  323. <boolProp name="ISREGEX">false</boolProp>
  324. </JSONPathAssertion>
  325. <hashTree/>
  326. </hashTree>
  327. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="loop_controller" enabled="true">
  328. <boolProp name="LoopController.continue_forever">true</boolProp>
  329. <stringProp name="LoopController.loops">1</stringProp>
  330. </LoopController>
  331. <hashTree>
  332. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  333. <stringProp name="delimiter">,</stringProp>
  334. <stringProp name="fileEncoding"></stringProp>
  335. <stringProp name="filename">binary_image_hex.txt</stringProp>
  336. <boolProp name="ignoreFirstLine">false</boolProp>
  337. <boolProp name="quotedData">false</boolProp>
  338. <boolProp name="recycle">true</boolProp>
  339. <stringProp name="shareMode">shareMode.thread</stringProp>
  340. <boolProp name="stopThread">false</boolProp>
  341. <stringProp name="variableNames">img</stringProp>
  342. </CSVDataSet>
  343. <hashTree/>
  344. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  345. <stringProp name="mqtt.topic_name">devices/${device_id}/images</stringProp>
  346. <stringProp name="mqtt.qos_level">0</stringProp>
  347. <boolProp name="mqtt.add_timestamp">false</boolProp>
  348. <stringProp name="mqtt.message_type">Hex string</stringProp>
  349. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  350. <stringProp name="mqtt.message_to_sent">${img}</stringProp>
  351. </net.xmeter.samplers.PubSampler>
  352. <hashTree>
  353. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  354. <stringProp name="ConstantTimer.delay">1000</stringProp>
  355. </ConstantTimer>
  356. <hashTree/>
  357. </hashTree>
  358. </hashTree>
  359. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  360. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  361. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  362. <collectionProp name="Arguments.arguments">
  363. <elementProp name="" elementType="HTTPArgument">
  364. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  365. <stringProp name="Argument.value"></stringProp>
  366. <stringProp name="Argument.metadata">=</stringProp>
  367. </elementProp>
  368. </collectionProp>
  369. </elementProp>
  370. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  371. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  372. <stringProp name="HTTPSampler.protocol"></stringProp>
  373. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  374. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  375. <stringProp name="HTTPSampler.method">GET</stringProp>
  376. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  377. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  378. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  379. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  380. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  381. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  382. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  383. </HTTPSamplerProxy>
  384. <hashTree>
  385. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  386. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  387. <stringProp name="EXPECTED_VALUE">1</stringProp>
  388. <boolProp name="JSONVALIDATION">true</boolProp>
  389. <boolProp name="EXPECT_NULL">false</boolProp>
  390. <boolProp name="INVERT">false</boolProp>
  391. <boolProp name="ISREGEX">false</boolProp>
  392. </JSONPathAssertion>
  393. <hashTree/>
  394. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  395. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  396. <stringProp name="EXPECTED_VALUE">1</stringProp>
  397. <boolProp name="JSONVALIDATION">true</boolProp>
  398. <boolProp name="EXPECT_NULL">false</boolProp>
  399. <boolProp name="INVERT">false</boolProp>
  400. <boolProp name="ISREGEX">false</boolProp>
  401. </JSONPathAssertion>
  402. <hashTree/>
  403. </hashTree>
  404. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  405. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  406. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  407. <collectionProp name="Arguments.arguments">
  408. <elementProp name="" elementType="HTTPArgument">
  409. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  410. <stringProp name="Argument.value"></stringProp>
  411. <stringProp name="Argument.metadata">=</stringProp>
  412. </elementProp>
  413. </collectionProp>
  414. </elementProp>
  415. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  416. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  417. <stringProp name="HTTPSampler.protocol"></stringProp>
  418. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  419. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  420. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  421. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  422. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  423. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  424. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  425. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  426. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  427. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  428. </HTTPSamplerProxy>
  429. <hashTree>
  430. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  431. <collectionProp name="Asserion.test_strings">
  432. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  433. </collectionProp>
  434. <stringProp name="Assertion.custom_message"></stringProp>
  435. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  436. <boolProp name="Assertion.assume_success">false</boolProp>
  437. <intProp name="Assertion.test_type">16</intProp>
  438. </ResponseAssertion>
  439. <hashTree/>
  440. </hashTree>
  441. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  442. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  443. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  444. <collectionProp name="Arguments.arguments">
  445. <elementProp name="" elementType="HTTPArgument">
  446. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  447. <stringProp name="Argument.value"></stringProp>
  448. <stringProp name="Argument.metadata">=</stringProp>
  449. </elementProp>
  450. </collectionProp>
  451. </elementProp>
  452. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  453. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  454. <stringProp name="HTTPSampler.protocol"></stringProp>
  455. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  456. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  457. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  458. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  459. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  460. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  461. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  462. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  463. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  464. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  465. </HTTPSamplerProxy>
  466. <hashTree>
  467. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  468. <collectionProp name="Asserion.test_strings">
  469. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  470. </collectionProp>
  471. <stringProp name="Assertion.custom_message"></stringProp>
  472. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  473. <boolProp name="Assertion.assume_success">false</boolProp>
  474. <intProp name="Assertion.test_type">16</intProp>
  475. </ResponseAssertion>
  476. <hashTree/>
  477. </hashTree>
  478. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  479. <stringProp name="ConstantTimer.delay">500</stringProp>
  480. </ConstantTimer>
  481. <hashTree/>
  482. </hashTree>
  483. </hashTree>
  484. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  485. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  486. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  487. <boolProp name="LoopController.continue_forever">false</boolProp>
  488. <stringProp name="LoopController.loops">1</stringProp>
  489. </elementProp>
  490. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  491. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  492. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  493. <stringProp name="ThreadGroup.duration"></stringProp>
  494. <stringProp name="ThreadGroup.delay"></stringProp>
  495. </ThreadGroup>
  496. <hashTree>
  497. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  498. <boolProp name="ResultCollector.error_logging">false</boolProp>
  499. <objProp>
  500. <name>saveConfig</name>
  501. <value class="SampleSaveConfiguration">
  502. <time>true</time>
  503. <latency>true</latency>
  504. <timestamp>true</timestamp>
  505. <success>true</success>
  506. <label>true</label>
  507. <code>true</code>
  508. <message>true</message>
  509. <threadName>true</threadName>
  510. <dataType>true</dataType>
  511. <encoding>false</encoding>
  512. <assertions>true</assertions>
  513. <subresults>true</subresults>
  514. <responseData>false</responseData>
  515. <samplerData>false</samplerData>
  516. <xml>false</xml>
  517. <fieldNames>true</fieldNames>
  518. <responseHeaders>false</responseHeaders>
  519. <requestHeaders>false</requestHeaders>
  520. <responseDataOnError>false</responseDataOnError>
  521. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  522. <assertionsResultsToSave>0</assertionsResultsToSave>
  523. <bytes>true</bytes>
  524. <sentBytes>true</sentBytes>
  525. <threadCounts>true</threadCounts>
  526. <idleTime>true</idleTime>
  527. <connectTime>true</connectTime>
  528. </value>
  529. </objProp>
  530. <stringProp name="filename"></stringProp>
  531. </ResultCollector>
  532. <hashTree/>
  533. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  534. <stringProp name="delimiter">,</stringProp>
  535. <stringProp name="fileEncoding"></stringProp>
  536. <stringProp name="filename">binary_image_base64.txt</stringProp>
  537. <boolProp name="ignoreFirstLine">false</boolProp>
  538. <boolProp name="quotedData">false</boolProp>
  539. <boolProp name="recycle">true</boolProp>
  540. <stringProp name="shareMode">shareMode.group</stringProp>
  541. <boolProp name="stopThread">false</boolProp>
  542. <stringProp name="variableNames">img</stringProp>
  543. </CSVDataSet>
  544. <hashTree/>
  545. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  546. <hashTree>
  547. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  548. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  549. <stringProp name="mqtt.port">1883</stringProp>
  550. <stringProp name="mqtt.version">3.1</stringProp>
  551. <stringProp name="mqtt.conn_timeout">10</stringProp>
  552. <boolProp name="mqtt.private_protocol">false</boolProp>
  553. <stringProp name="mqtt.listener_timeout">10</stringProp>
  554. <stringProp name="mqtt.protocol">TCP</stringProp>
  555. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  556. <stringProp name="mqtt.keystore_file_path"></stringProp>
  557. <stringProp name="mqtt.keystore_password"></stringProp>
  558. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  559. <stringProp name="mqtt.clientcert_password"></stringProp>
  560. <stringProp name="mqtt.user_name"></stringProp>
  561. <stringProp name="mqtt.password"></stringProp>
  562. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  563. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  564. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  565. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  566. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  567. </net.xmeter.samplers.ConnectSampler>
  568. <hashTree/>
  569. </hashTree>
  570. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  571. <stringProp name="mqtt.topic_name">devices/result</stringProp>
  572. <stringProp name="mqtt.qos_level">0</stringProp>
  573. <boolProp name="mqtt.add_timestamp">false</boolProp>
  574. <boolProp name="mqtt.debug_response">true</boolProp>
  575. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  576. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  577. </net.xmeter.samplers.SubSampler>
  578. <hashTree>
  579. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="image Assertion" enabled="true">
  580. <stringProp name="JSON_PATH">$.image</stringProp>
  581. <stringProp name="EXPECTED_VALUE">${img}</stringProp>
  582. <boolProp name="JSONVALIDATION">true</boolProp>
  583. <boolProp name="EXPECT_NULL">false</boolProp>
  584. <boolProp name="INVERT">false</boolProp>
  585. <boolProp name="ISREGEX">false</boolProp>
  586. </JSONPathAssertion>
  587. <hashTree/>
  588. </hashTree>
  589. </hashTree>
  590. </hashTree>
  591. </hashTree>
  592. </jmeterTestPlan>