binary_image_process.jmx 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414">
  3. <hashTree>
  4. <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
  5. <stringProp name="TestPlan.comments"></stringProp>
  6. <boolProp name="TestPlan.functional_mode">false</boolProp>
  7. <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
  8. <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
  9. <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  10. <collectionProp name="Arguments.arguments"/>
  11. </elementProp>
  12. <stringProp name="TestPlan.user_define_classpath"></stringProp>
  13. </TestPlan>
  14. <hashTree>
  15. <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  16. <collectionProp name="Arguments.arguments">
  17. <elementProp name="srv" elementType="Argument">
  18. <stringProp name="Argument.name">srv</stringProp>
  19. <stringProp name="Argument.value">127.0.0.1</stringProp>
  20. <stringProp name="Argument.metadata">=</stringProp>
  21. </elementProp>
  22. <elementProp name="rest_port" elementType="Argument">
  23. <stringProp name="Argument.name">rest_port</stringProp>
  24. <stringProp name="Argument.value">9081</stringProp>
  25. <stringProp name="Argument.metadata">=</stringProp>
  26. </elementProp>
  27. <elementProp name="mqtt_srv" elementType="Argument">
  28. <stringProp name="Argument.name">mqtt_srv</stringProp>
  29. <stringProp name="Argument.value">127.0.0.1</stringProp>
  30. <stringProp name="Argument.metadata">=</stringProp>
  31. </elementProp>
  32. </collectionProp>
  33. </Arguments>
  34. <hashTree/>
  35. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Rules" enabled="true">
  36. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  37. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  38. <boolProp name="LoopController.continue_forever">false</boolProp>
  39. <stringProp name="LoopController.loops">1</stringProp>
  40. </elementProp>
  41. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  42. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  43. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  44. <stringProp name="ThreadGroup.duration"></stringProp>
  45. <stringProp name="ThreadGroup.delay"></stringProp>
  46. </ThreadGroup>
  47. <hashTree>
  48. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  49. <boolProp name="ResultCollector.error_logging">false</boolProp>
  50. <objProp>
  51. <name>saveConfig</name>
  52. <value class="SampleSaveConfiguration">
  53. <time>true</time>
  54. <latency>true</latency>
  55. <timestamp>true</timestamp>
  56. <success>true</success>
  57. <label>true</label>
  58. <code>true</code>
  59. <message>true</message>
  60. <threadName>true</threadName>
  61. <dataType>true</dataType>
  62. <encoding>false</encoding>
  63. <assertions>true</assertions>
  64. <subresults>true</subresults>
  65. <responseData>false</responseData>
  66. <samplerData>false</samplerData>
  67. <xml>false</xml>
  68. <fieldNames>true</fieldNames>
  69. <responseHeaders>false</responseHeaders>
  70. <requestHeaders>false</requestHeaders>
  71. <responseDataOnError>false</responseDataOnError>
  72. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  73. <assertionsResultsToSave>0</assertionsResultsToSave>
  74. <bytes>true</bytes>
  75. <sentBytes>true</sentBytes>
  76. <threadCounts>true</threadCounts>
  77. <idleTime>true</idleTime>
  78. <connectTime>true</connectTime>
  79. </value>
  80. </objProp>
  81. <stringProp name="filename"></stringProp>
  82. </ResultCollector>
  83. <hashTree/>
  84. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="API" enabled="true">
  85. <boolProp name="TransactionController.includeTimers">false</boolProp>
  86. <boolProp name="TransactionController.parent">false</boolProp>
  87. </TransactionController>
  88. <hashTree>
  89. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  90. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  91. <stringProp name="mqtt.port">1883</stringProp>
  92. <stringProp name="mqtt.version">3.1</stringProp>
  93. <stringProp name="mqtt.conn_timeout">10</stringProp>
  94. <boolProp name="mqtt.private_protocol">false</boolProp>
  95. <stringProp name="mqtt.listener_timeout">10</stringProp>
  96. <stringProp name="mqtt.protocol">TCP</stringProp>
  97. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  98. <stringProp name="mqtt.keystore_file_path"></stringProp>
  99. <stringProp name="mqtt.keystore_password"></stringProp>
  100. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  101. <stringProp name="mqtt.clientcert_password"></stringProp>
  102. <stringProp name="mqtt.user_name"></stringProp>
  103. <stringProp name="mqtt.password"></stringProp>
  104. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  105. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  106. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  107. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  108. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  109. </net.xmeter.samplers.ConnectSampler>
  110. <hashTree/>
  111. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_AddPlugin" enabled="true">
  112. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  113. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  114. <collectionProp name="Arguments.arguments">
  115. <elementProp name="" elementType="HTTPArgument">
  116. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  117. <stringProp name="Argument.value">{&#xd;
  118. &quot;name&quot;:&quot;image&quot;,&#xd;
  119. &quot;file&quot;:&quot;http://127.0.0.1:9090/plugins/image.zip&quot;,&#xd;
  120. &quot;functions&quot;:[&quot;resize&quot;,&quot;thumbnail&quot;]&#xd;
  121. }</stringProp>
  122. <stringProp name="Argument.metadata">=</stringProp>
  123. </elementProp>
  124. </collectionProp>
  125. </elementProp>
  126. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  127. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  128. <stringProp name="HTTPSampler.protocol"></stringProp>
  129. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  130. <stringProp name="HTTPSampler.path">/plugins/functions</stringProp>
  131. <stringProp name="HTTPSampler.method">POST</stringProp>
  132. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  133. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  134. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  135. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  136. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  137. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  138. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  139. </HTTPSamplerProxy>
  140. <hashTree>
  141. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  142. <collectionProp name="Asserion.test_strings">
  143. <stringProp name="49587">201</stringProp>
  144. </collectionProp>
  145. <stringProp name="Assertion.custom_message"></stringProp>
  146. <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
  147. <boolProp name="Assertion.assume_success">true</boolProp>
  148. <intProp name="Assertion.test_type">16</intProp>
  149. </ResponseAssertion>
  150. <hashTree/>
  151. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  152. <stringProp name="ConstantTimer.delay">500</stringProp>
  153. </ConstantTimer>
  154. <hashTree/>
  155. </hashTree>
  156. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetFunc" enabled="true">
  157. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  158. <collectionProp name="Arguments.arguments"/>
  159. </elementProp>
  160. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  161. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  162. <stringProp name="HTTPSampler.protocol"></stringProp>
  163. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  164. <stringProp name="HTTPSampler.path">/plugins/udfs/resize</stringProp>
  165. <stringProp name="HTTPSampler.method">GET</stringProp>
  166. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  167. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  168. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  169. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  170. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  171. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  172. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  173. </HTTPSamplerProxy>
  174. <hashTree>
  175. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  176. <stringProp name="JSON_PATH">$.plugin</stringProp>
  177. <stringProp name="EXPECTED_VALUE">image</stringProp>
  178. <boolProp name="JSONVALIDATION">true</boolProp>
  179. <boolProp name="EXPECT_NULL">false</boolProp>
  180. <boolProp name="INVERT">false</boolProp>
  181. <boolProp name="ISREGEX">false</boolProp>
  182. </JSONPathAssertion>
  183. <hashTree/>
  184. </hashTree>
  185. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStream" enabled="true">
  186. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  187. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  188. <collectionProp name="Arguments.arguments">
  189. <elementProp name="" elementType="HTTPArgument">
  190. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  191. <stringProp name="Argument.value">{&#xd;
  192. &quot;sql&quot; : &quot;create stream demo (image BYTEA) WITH (FORMAT=\&quot;BINARY\&quot;, DATASOURCE=\&quot;devices/+/images\&quot; )&quot;&#xd;
  193. }</stringProp>
  194. <stringProp name="Argument.metadata">=</stringProp>
  195. </elementProp>
  196. </collectionProp>
  197. </elementProp>
  198. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  199. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  200. <stringProp name="HTTPSampler.protocol"></stringProp>
  201. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  202. <stringProp name="HTTPSampler.path">/streams</stringProp>
  203. <stringProp name="HTTPSampler.method">POST</stringProp>
  204. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  205. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  206. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  207. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  208. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  209. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  210. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  211. </HTTPSamplerProxy>
  212. <hashTree>
  213. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  214. <collectionProp name="Asserion.test_strings">
  215. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  216. </collectionProp>
  217. <stringProp name="Assertion.custom_message"></stringProp>
  218. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  219. <boolProp name="Assertion.assume_success">true</boolProp>
  220. <intProp name="Assertion.test_type">16</intProp>
  221. </ResponseAssertion>
  222. <hashTree/>
  223. </hashTree>
  224. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule" enabled="true">
  225. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  226. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  227. <collectionProp name="Arguments.arguments">
  228. <elementProp name="" elementType="HTTPArgument">
  229. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  230. <stringProp name="Argument.value">{&#xd;
  231. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  232. &quot;sql&quot;: &quot;SELECT * FROM demo&quot;,&#xd;
  233. &quot;actions&quot;: [&#xd;
  234. {&#xd;
  235. &quot;mqtt&quot;: {&#xd;
  236. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  237. &quot;topic&quot;: &quot;devices/result&quot;,&#xd;
  238. &quot;qos&quot;: 1,&#xd;
  239. &quot;clientId&quot;: &quot;demo_001&quot;,&#xd;
  240. &quot;sendSingle&quot;: true,&#xd;
  241. &quot;dataTemplate&quot;: &quot;{{json .}}&quot;&#xd;
  242. }&#xd;
  243. }&#xd;
  244. ]&#xd;
  245. }</stringProp>
  246. <stringProp name="Argument.metadata">=</stringProp>
  247. </elementProp>
  248. </collectionProp>
  249. </elementProp>
  250. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  251. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  252. <stringProp name="HTTPSampler.protocol"></stringProp>
  253. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  254. <stringProp name="HTTPSampler.path">/rules</stringProp>
  255. <stringProp name="HTTPSampler.method">POST</stringProp>
  256. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  257. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  258. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  259. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  260. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  261. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  262. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  263. </HTTPSamplerProxy>
  264. <hashTree>
  265. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  266. <collectionProp name="Asserion.test_strings">
  267. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  268. </collectionProp>
  269. <stringProp name="Assertion.custom_message"></stringProp>
  270. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  271. <boolProp name="Assertion.assume_success">true</boolProp>
  272. <intProp name="Assertion.test_type">16</intProp>
  273. </ResponseAssertion>
  274. <hashTree/>
  275. </hashTree>
  276. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  277. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  278. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  279. <collectionProp name="Arguments.arguments">
  280. <elementProp name="" elementType="HTTPArgument">
  281. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  282. <stringProp name="Argument.value"></stringProp>
  283. <stringProp name="Argument.metadata">=</stringProp>
  284. </elementProp>
  285. </collectionProp>
  286. </elementProp>
  287. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  288. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  289. <stringProp name="HTTPSampler.protocol"></stringProp>
  290. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  291. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  292. <stringProp name="HTTPSampler.method">GET</stringProp>
  293. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  294. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  295. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  296. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  297. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  298. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  299. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  300. </HTTPSamplerProxy>
  301. <hashTree>
  302. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  303. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  304. <stringProp name="EXPECTED_VALUE">0</stringProp>
  305. <boolProp name="JSONVALIDATION">true</boolProp>
  306. <boolProp name="EXPECT_NULL">false</boolProp>
  307. <boolProp name="INVERT">false</boolProp>
  308. <boolProp name="ISREGEX">false</boolProp>
  309. </JSONPathAssertion>
  310. <hashTree/>
  311. </hashTree>
  312. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="loop_controller" enabled="true">
  313. <boolProp name="LoopController.continue_forever">true</boolProp>
  314. <stringProp name="LoopController.loops">1</stringProp>
  315. </LoopController>
  316. <hashTree>
  317. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  318. <stringProp name="delimiter">,</stringProp>
  319. <stringProp name="fileEncoding"></stringProp>
  320. <stringProp name="filename">binary_image_hex.txt</stringProp>
  321. <boolProp name="ignoreFirstLine">false</boolProp>
  322. <boolProp name="quotedData">false</boolProp>
  323. <boolProp name="recycle">true</boolProp>
  324. <stringProp name="shareMode">shareMode.thread</stringProp>
  325. <boolProp name="stopThread">false</boolProp>
  326. <stringProp name="variableNames">img</stringProp>
  327. </CSVDataSet>
  328. <hashTree/>
  329. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  330. <stringProp name="mqtt.topic_name">devices/${device_id}/images</stringProp>
  331. <stringProp name="mqtt.qos_level">0</stringProp>
  332. <boolProp name="mqtt.add_timestamp">false</boolProp>
  333. <stringProp name="mqtt.message_type">Hex string</stringProp>
  334. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  335. <stringProp name="mqtt.message_to_sent">${img}</stringProp>
  336. </net.xmeter.samplers.PubSampler>
  337. <hashTree>
  338. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  339. <stringProp name="ConstantTimer.delay">1000</stringProp>
  340. </ConstantTimer>
  341. <hashTree/>
  342. </hashTree>
  343. </hashTree>
  344. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  345. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  346. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  347. <collectionProp name="Arguments.arguments">
  348. <elementProp name="" elementType="HTTPArgument">
  349. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  350. <stringProp name="Argument.value"></stringProp>
  351. <stringProp name="Argument.metadata">=</stringProp>
  352. </elementProp>
  353. </collectionProp>
  354. </elementProp>
  355. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  356. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  357. <stringProp name="HTTPSampler.protocol"></stringProp>
  358. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  359. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  360. <stringProp name="HTTPSampler.method">GET</stringProp>
  361. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  362. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  363. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  364. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  365. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  366. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  367. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  368. </HTTPSamplerProxy>
  369. <hashTree>
  370. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  371. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  372. <stringProp name="EXPECTED_VALUE">1</stringProp>
  373. <boolProp name="JSONVALIDATION">true</boolProp>
  374. <boolProp name="EXPECT_NULL">false</boolProp>
  375. <boolProp name="INVERT">false</boolProp>
  376. <boolProp name="ISREGEX">false</boolProp>
  377. </JSONPathAssertion>
  378. <hashTree/>
  379. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  380. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  381. <stringProp name="EXPECTED_VALUE">1</stringProp>
  382. <boolProp name="JSONVALIDATION">true</boolProp>
  383. <boolProp name="EXPECT_NULL">false</boolProp>
  384. <boolProp name="INVERT">false</boolProp>
  385. <boolProp name="ISREGEX">false</boolProp>
  386. </JSONPathAssertion>
  387. <hashTree/>
  388. </hashTree>
  389. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  390. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  391. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  392. <collectionProp name="Arguments.arguments">
  393. <elementProp name="" elementType="HTTPArgument">
  394. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  395. <stringProp name="Argument.value"></stringProp>
  396. <stringProp name="Argument.metadata">=</stringProp>
  397. </elementProp>
  398. </collectionProp>
  399. </elementProp>
  400. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  401. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  402. <stringProp name="HTTPSampler.protocol"></stringProp>
  403. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  404. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  405. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  406. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  407. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  408. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  409. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  410. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  411. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  412. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  413. </HTTPSamplerProxy>
  414. <hashTree>
  415. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  416. <collectionProp name="Asserion.test_strings">
  417. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  418. </collectionProp>
  419. <stringProp name="Assertion.custom_message"></stringProp>
  420. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  421. <boolProp name="Assertion.assume_success">false</boolProp>
  422. <intProp name="Assertion.test_type">16</intProp>
  423. </ResponseAssertion>
  424. <hashTree/>
  425. </hashTree>
  426. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  427. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  428. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  429. <collectionProp name="Arguments.arguments">
  430. <elementProp name="" elementType="HTTPArgument">
  431. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  432. <stringProp name="Argument.value"></stringProp>
  433. <stringProp name="Argument.metadata">=</stringProp>
  434. </elementProp>
  435. </collectionProp>
  436. </elementProp>
  437. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  438. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  439. <stringProp name="HTTPSampler.protocol"></stringProp>
  440. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  441. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  442. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  443. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  444. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  445. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  446. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  447. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  448. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  449. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  450. </HTTPSamplerProxy>
  451. <hashTree>
  452. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  453. <collectionProp name="Asserion.test_strings">
  454. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  455. </collectionProp>
  456. <stringProp name="Assertion.custom_message"></stringProp>
  457. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  458. <boolProp name="Assertion.assume_success">false</boolProp>
  459. <intProp name="Assertion.test_type">16</intProp>
  460. </ResponseAssertion>
  461. <hashTree/>
  462. </hashTree>
  463. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  464. <stringProp name="ConstantTimer.delay">500</stringProp>
  465. </ConstantTimer>
  466. <hashTree/>
  467. </hashTree>
  468. </hashTree>
  469. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  470. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  471. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  472. <boolProp name="LoopController.continue_forever">false</boolProp>
  473. <stringProp name="LoopController.loops">1</stringProp>
  474. </elementProp>
  475. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  476. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  477. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  478. <stringProp name="ThreadGroup.duration"></stringProp>
  479. <stringProp name="ThreadGroup.delay"></stringProp>
  480. </ThreadGroup>
  481. <hashTree>
  482. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  483. <boolProp name="ResultCollector.error_logging">false</boolProp>
  484. <objProp>
  485. <name>saveConfig</name>
  486. <value class="SampleSaveConfiguration">
  487. <time>true</time>
  488. <latency>true</latency>
  489. <timestamp>true</timestamp>
  490. <success>true</success>
  491. <label>true</label>
  492. <code>true</code>
  493. <message>true</message>
  494. <threadName>true</threadName>
  495. <dataType>true</dataType>
  496. <encoding>false</encoding>
  497. <assertions>true</assertions>
  498. <subresults>true</subresults>
  499. <responseData>false</responseData>
  500. <samplerData>false</samplerData>
  501. <xml>false</xml>
  502. <fieldNames>true</fieldNames>
  503. <responseHeaders>false</responseHeaders>
  504. <requestHeaders>false</requestHeaders>
  505. <responseDataOnError>false</responseDataOnError>
  506. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  507. <assertionsResultsToSave>0</assertionsResultsToSave>
  508. <bytes>true</bytes>
  509. <sentBytes>true</sentBytes>
  510. <threadCounts>true</threadCounts>
  511. <idleTime>true</idleTime>
  512. <connectTime>true</connectTime>
  513. </value>
  514. </objProp>
  515. <stringProp name="filename"></stringProp>
  516. </ResultCollector>
  517. <hashTree/>
  518. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  519. <stringProp name="delimiter">,</stringProp>
  520. <stringProp name="fileEncoding"></stringProp>
  521. <stringProp name="filename">binary_image_base64.txt</stringProp>
  522. <boolProp name="ignoreFirstLine">false</boolProp>
  523. <boolProp name="quotedData">false</boolProp>
  524. <boolProp name="recycle">true</boolProp>
  525. <stringProp name="shareMode">shareMode.group</stringProp>
  526. <boolProp name="stopThread">false</boolProp>
  527. <stringProp name="variableNames">img</stringProp>
  528. </CSVDataSet>
  529. <hashTree/>
  530. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  531. <hashTree>
  532. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  533. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  534. <stringProp name="mqtt.port">1883</stringProp>
  535. <stringProp name="mqtt.version">3.1</stringProp>
  536. <stringProp name="mqtt.conn_timeout">10</stringProp>
  537. <boolProp name="mqtt.private_protocol">false</boolProp>
  538. <stringProp name="mqtt.listener_timeout">10</stringProp>
  539. <stringProp name="mqtt.protocol">TCP</stringProp>
  540. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  541. <stringProp name="mqtt.keystore_file_path"></stringProp>
  542. <stringProp name="mqtt.keystore_password"></stringProp>
  543. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  544. <stringProp name="mqtt.clientcert_password"></stringProp>
  545. <stringProp name="mqtt.user_name"></stringProp>
  546. <stringProp name="mqtt.password"></stringProp>
  547. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  548. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  549. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  550. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  551. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  552. </net.xmeter.samplers.ConnectSampler>
  553. <hashTree/>
  554. </hashTree>
  555. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  556. <stringProp name="mqtt.topic_name">devices/result</stringProp>
  557. <stringProp name="mqtt.qos_level">0</stringProp>
  558. <boolProp name="mqtt.add_timestamp">false</boolProp>
  559. <boolProp name="mqtt.debug_response">true</boolProp>
  560. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  561. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  562. </net.xmeter.samplers.SubSampler>
  563. <hashTree>
  564. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="image Assertion" enabled="true">
  565. <stringProp name="JSON_PATH">$.image</stringProp>
  566. <stringProp name="EXPECTED_VALUE">${img}</stringProp>
  567. <boolProp name="JSONVALIDATION">true</boolProp>
  568. <boolProp name="EXPECT_NULL">false</boolProp>
  569. <boolProp name="INVERT">false</boolProp>
  570. <boolProp name="ISREGEX">false</boolProp>
  571. </JSONPathAssertion>
  572. <hashTree/>
  573. </hashTree>
  574. </hashTree>
  575. </hashTree>
  576. </hashTree>
  577. </jmeterTestPlan>