rule_pipeline.jmx 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Copyright 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="5.0" jmeter="5.3">
  18. <hashTree>
  19. <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
  20. <stringProp name="TestPlan.comments"></stringProp>
  21. <boolProp name="TestPlan.functional_mode">false</boolProp>
  22. <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
  23. <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
  24. <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  25. <collectionProp name="Arguments.arguments"/>
  26. </elementProp>
  27. <stringProp name="TestPlan.user_define_classpath"></stringProp>
  28. </TestPlan>
  29. <hashTree>
  30. <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  31. <collectionProp name="Arguments.arguments">
  32. <elementProp name="srv" elementType="Argument">
  33. <stringProp name="Argument.name">srv</stringProp>
  34. <stringProp name="Argument.value">127.0.0.1</stringProp>
  35. <stringProp name="Argument.metadata">=</stringProp>
  36. </elementProp>
  37. <elementProp name="rest_port" elementType="Argument">
  38. <stringProp name="Argument.name">rest_port</stringProp>
  39. <stringProp name="Argument.value">9081</stringProp>
  40. <stringProp name="Argument.metadata">=</stringProp>
  41. </elementProp>
  42. <elementProp name="mqtt_srv" elementType="Argument">
  43. <stringProp name="Argument.name">mqtt_srv</stringProp>
  44. <stringProp name="Argument.value">127.0.0.1</stringProp>
  45. <stringProp name="Argument.metadata">=</stringProp>
  46. </elementProp>
  47. </collectionProp>
  48. </Arguments>
  49. <hashTree/>
  50. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Rules" enabled="true">
  51. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  52. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  53. <boolProp name="LoopController.continue_forever">false</boolProp>
  54. <stringProp name="LoopController.loops">1</stringProp>
  55. </elementProp>
  56. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  57. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  58. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  59. <stringProp name="ThreadGroup.duration"></stringProp>
  60. <stringProp name="ThreadGroup.delay"></stringProp>
  61. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  62. </ThreadGroup>
  63. <hashTree>
  64. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  65. <boolProp name="ResultCollector.error_logging">false</boolProp>
  66. <objProp>
  67. <name>saveConfig</name>
  68. <value class="SampleSaveConfiguration">
  69. <time>true</time>
  70. <latency>true</latency>
  71. <timestamp>true</timestamp>
  72. <success>true</success>
  73. <label>true</label>
  74. <code>true</code>
  75. <message>true</message>
  76. <threadName>true</threadName>
  77. <dataType>true</dataType>
  78. <encoding>false</encoding>
  79. <assertions>true</assertions>
  80. <subresults>true</subresults>
  81. <responseData>false</responseData>
  82. <samplerData>false</samplerData>
  83. <xml>false</xml>
  84. <fieldNames>true</fieldNames>
  85. <responseHeaders>false</responseHeaders>
  86. <requestHeaders>false</requestHeaders>
  87. <responseDataOnError>false</responseDataOnError>
  88. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  89. <assertionsResultsToSave>0</assertionsResultsToSave>
  90. <bytes>true</bytes>
  91. <sentBytes>true</sentBytes>
  92. <threadCounts>true</threadCounts>
  93. <idleTime>true</idleTime>
  94. <connectTime>true</connectTime>
  95. </value>
  96. </objProp>
  97. <stringProp name="filename"></stringProp>
  98. </ResultCollector>
  99. <hashTree/>
  100. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="API" enabled="true">
  101. <boolProp name="TransactionController.includeTimers">false</boolProp>
  102. <boolProp name="TransactionController.parent">false</boolProp>
  103. </TransactionController>
  104. <hashTree>
  105. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  106. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  107. <stringProp name="mqtt.port">1883</stringProp>
  108. <stringProp name="mqtt.version">3.1</stringProp>
  109. <stringProp name="mqtt.conn_timeout">10</stringProp>
  110. <boolProp name="mqtt.private_protocol">false</boolProp>
  111. <stringProp name="mqtt.listener_timeout">10</stringProp>
  112. <stringProp name="mqtt.protocol">TCP</stringProp>
  113. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  114. <stringProp name="mqtt.keystore_file_path"></stringProp>
  115. <stringProp name="mqtt.keystore_password"></stringProp>
  116. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  117. <stringProp name="mqtt.clientcert_password"></stringProp>
  118. <stringProp name="mqtt.user_name"></stringProp>
  119. <stringProp name="mqtt.password"></stringProp>
  120. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  121. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  122. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  123. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  124. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  125. <boolProp name="mqtt.conn_clean_session">true</boolProp>
  126. </net.xmeter.samplers.ConnectSampler>
  127. <hashTree/>
  128. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStreamDevice1" 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 stream device1 (temperature float, humidity bigint, ts bigint) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;devices/1/messages\&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">/streams</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="475897847">Stream device1 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_CreateStreamDevice2" 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 device2 (temperature float, humidity bigint, ts bigint) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;devices/2/messages\&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="182494840">Stream device2 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_CreateStreamSensorAll" 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">{&quot;sql&quot; : &quot;create stream sensorAll () WITH (DATASOURCE=\&quot;result/source/+\&quot;, FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;memory\&quot;, TIMESTAMP=\&quot;ts\&quot;)&quot;}</stringProp>
  213. <stringProp name="Argument.metadata">=</stringProp>
  214. </elementProp>
  215. </collectionProp>
  216. </elementProp>
  217. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  218. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  219. <stringProp name="HTTPSampler.protocol"></stringProp>
  220. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  221. <stringProp name="HTTPSampler.path">/streams</stringProp>
  222. <stringProp name="HTTPSampler.method">POST</stringProp>
  223. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  224. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  225. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  226. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  227. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  228. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  229. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  230. </HTTPSamplerProxy>
  231. <hashTree>
  232. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  233. <collectionProp name="Asserion.test_strings">
  234. <stringProp name="-2092274461">Stream sensorAll is created.</stringProp>
  235. </collectionProp>
  236. <stringProp name="Assertion.custom_message"></stringProp>
  237. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  238. <boolProp name="Assertion.assume_success">true</boolProp>
  239. <intProp name="Assertion.test_type">16</intProp>
  240. </ResponseAssertion>
  241. <hashTree/>
  242. </hashTree>
  243. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule1" enabled="true">
  244. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  245. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  246. <collectionProp name="Arguments.arguments">
  247. <elementProp name="" elementType="HTTPArgument">
  248. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  249. <stringProp name="Argument.value">{&#xd;
  250. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  251. &quot;sql&quot;: &quot;SELECT * FROM device1 WHERE humidity &gt; 30&quot;,&#xd;
  252. &quot;actions&quot;: [{&#xd;
  253. &quot;memory&quot;: {&#xd;
  254. &quot;topic&quot;: &quot;result/source/rule1&quot;&#xd;
  255. }&#xd;
  256. }]&#xd;
  257. }</stringProp>
  258. <stringProp name="Argument.metadata">=</stringProp>
  259. </elementProp>
  260. </collectionProp>
  261. </elementProp>
  262. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  263. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  264. <stringProp name="HTTPSampler.protocol"></stringProp>
  265. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  266. <stringProp name="HTTPSampler.path">/rules</stringProp>
  267. <stringProp name="HTTPSampler.method">POST</stringProp>
  268. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  269. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  270. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  271. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  272. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  273. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  274. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  275. </HTTPSamplerProxy>
  276. <hashTree>
  277. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  278. <collectionProp name="Asserion.test_strings">
  279. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  280. </collectionProp>
  281. <stringProp name="Assertion.custom_message"></stringProp>
  282. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  283. <boolProp name="Assertion.assume_success">true</boolProp>
  284. <intProp name="Assertion.test_type">16</intProp>
  285. </ResponseAssertion>
  286. <hashTree/>
  287. </hashTree>
  288. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule2" enabled="true">
  289. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  290. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  291. <collectionProp name="Arguments.arguments">
  292. <elementProp name="" elementType="HTTPArgument">
  293. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  294. <stringProp name="Argument.value">{&#xd;
  295. &quot;id&quot;: &quot;rule2&quot;,&#xd;
  296. &quot;sql&quot;: &quot;SELECT * FROM device2 WHERE temperature &gt; 26&quot;,&#xd;
  297. &quot;actions&quot;: [{&#xd;
  298. &quot;memory&quot;: {&#xd;
  299. &quot;topic&quot;: &quot;result/source/rule2&quot;&#xd;
  300. }&#xd;
  301. }]&#xd;
  302. }</stringProp>
  303. <stringProp name="Argument.metadata">=</stringProp>
  304. </elementProp>
  305. </collectionProp>
  306. </elementProp>
  307. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  308. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  309. <stringProp name="HTTPSampler.protocol"></stringProp>
  310. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  311. <stringProp name="HTTPSampler.path">/rules</stringProp>
  312. <stringProp name="HTTPSampler.method">POST</stringProp>
  313. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  314. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  315. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  316. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  317. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  318. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  319. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  320. </HTTPSamplerProxy>
  321. <hashTree>
  322. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  323. <collectionProp name="Asserion.test_strings">
  324. <stringProp name="1979367491">Rule rule2 was created</stringProp>
  325. </collectionProp>
  326. <stringProp name="Assertion.custom_message"></stringProp>
  327. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  328. <boolProp name="Assertion.assume_success">true</boolProp>
  329. <intProp name="Assertion.test_type">16</intProp>
  330. </ResponseAssertion>
  331. <hashTree/>
  332. </hashTree>
  333. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRuleFinal" enabled="true">
  334. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  335. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  336. <collectionProp name="Arguments.arguments">
  337. <elementProp name="" elementType="HTTPArgument">
  338. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  339. <stringProp name="Argument.value">{&#xd;
  340. &quot;id&quot;: &quot;ruleFinal&quot;,&#xd;
  341. &quot;sql&quot;: &quot;SELECT concat(\&quot;final/\&quot;, meta(topic)) as t, avg(temperature) as temp, window_end() as ts FROM sensorAll GROUP BY TumblingWindow(ss, 2), t&quot;,&#xd;
  342. &quot;actions&quot;: [{&#xd;
  343. &quot;mqtt&quot;: {&#xd;
  344. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  345. &quot;sendSingle&quot;: true,&#xd;
  346. &quot;topic&quot;: &quot;{{.t}}&quot;&#xd;
  347. }&#xd;
  348. }],&#xd;
  349. &quot;options&quot;: {&#xd;
  350. &quot;isEventTime&quot;: true,&#xd;
  351. &quot;lateTolerance&quot; : 0&#xd;
  352. }&#xd;
  353. }</stringProp>
  354. <stringProp name="Argument.metadata">=</stringProp>
  355. </elementProp>
  356. </collectionProp>
  357. </elementProp>
  358. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  359. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  360. <stringProp name="HTTPSampler.protocol"></stringProp>
  361. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  362. <stringProp name="HTTPSampler.path">/rules</stringProp>
  363. <stringProp name="HTTPSampler.method">POST</stringProp>
  364. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  365. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  366. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  367. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  368. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  369. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  370. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  371. </HTTPSamplerProxy>
  372. <hashTree>
  373. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  374. <collectionProp name="Asserion.test_strings">
  375. <stringProp name="663534439">Rule ruleFinal was created</stringProp>
  376. </collectionProp>
  377. <stringProp name="Assertion.custom_message"></stringProp>
  378. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  379. <boolProp name="Assertion.assume_success">true</boolProp>
  380. <intProp name="Assertion.test_type">16</intProp>
  381. </ResponseAssertion>
  382. <hashTree/>
  383. </hashTree>
  384. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  385. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  386. <collectionProp name="Arguments.arguments"/>
  387. </elementProp>
  388. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  389. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  390. <stringProp name="HTTPSampler.protocol"></stringProp>
  391. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  392. <stringProp name="HTTPSampler.path">/rules/ruleFinal/status</stringProp>
  393. <stringProp name="HTTPSampler.method">GET</stringProp>
  394. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  395. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  396. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  397. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  398. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  399. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  400. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  401. </HTTPSamplerProxy>
  402. <hashTree>
  403. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  404. <stringProp name="JSON_PATH">$.source_sensorAll_0_records_in_total</stringProp>
  405. <stringProp name="EXPECTED_VALUE">0</stringProp>
  406. <boolProp name="JSONVALIDATION">true</boolProp>
  407. <boolProp name="EXPECT_NULL">false</boolProp>
  408. <boolProp name="INVERT">false</boolProp>
  409. <boolProp name="ISREGEX">false</boolProp>
  410. </JSONPathAssertion>
  411. <hashTree/>
  412. </hashTree>
  413. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="loop_controller" enabled="true">
  414. <boolProp name="LoopController.continue_forever">true</boolProp>
  415. <stringProp name="LoopController.loops">15</stringProp>
  416. </LoopController>
  417. <hashTree>
  418. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  419. <stringProp name="delimiter">,</stringProp>
  420. <stringProp name="fileEncoding"></stringProp>
  421. <stringProp name="filename">iot_data_ts.txt</stringProp>
  422. <boolProp name="ignoreFirstLine">false</boolProp>
  423. <boolProp name="quotedData">false</boolProp>
  424. <boolProp name="recycle">true</boolProp>
  425. <stringProp name="shareMode">shareMode.thread</stringProp>
  426. <boolProp name="stopThread">false</boolProp>
  427. <stringProp name="variableNames">device_id,ts,temperature,humidity</stringProp>
  428. </CSVDataSet>
  429. <hashTree/>
  430. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  431. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  432. <stringProp name="mqtt.qos_level">0</stringProp>
  433. <boolProp name="mqtt.add_timestamp">false</boolProp>
  434. <stringProp name="mqtt.message_type">String</stringProp>
  435. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  436. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${temperature}, &quot;humidity&quot; : ${humidity},&quot;ts&quot;:${ts}}</stringProp>
  437. <boolProp name="mqtt.retained_message">false</boolProp>
  438. </net.xmeter.samplers.PubSampler>
  439. <hashTree/>
  440. </hashTree>
  441. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  442. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  443. <collectionProp name="Arguments.arguments"/>
  444. </elementProp>
  445. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  446. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  447. <stringProp name="HTTPSampler.protocol"></stringProp>
  448. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  449. <stringProp name="HTTPSampler.path">/rules/ruleFinal/status</stringProp>
  450. <stringProp name="HTTPSampler.method">GET</stringProp>
  451. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  452. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  453. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  454. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  455. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  456. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  457. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  458. </HTTPSamplerProxy>
  459. <hashTree>
  460. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  461. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  462. <stringProp name="EXPECTED_VALUE">3</stringProp>
  463. <boolProp name="JSONVALIDATION">true</boolProp>
  464. <boolProp name="EXPECT_NULL">false</boolProp>
  465. <boolProp name="INVERT">false</boolProp>
  466. <boolProp name="ISREGEX">false</boolProp>
  467. </JSONPathAssertion>
  468. <hashTree/>
  469. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  470. <stringProp name="ConstantTimer.delay">5000</stringProp>
  471. </ConstantTimer>
  472. <hashTree/>
  473. </hashTree>
  474. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule1" enabled="true">
  475. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  476. <collectionProp name="Arguments.arguments"/>
  477. </elementProp>
  478. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  479. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  480. <stringProp name="HTTPSampler.protocol"></stringProp>
  481. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  482. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  483. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  484. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  485. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  486. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  487. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  488. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  489. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  490. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  491. </HTTPSamplerProxy>
  492. <hashTree>
  493. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  494. <collectionProp name="Asserion.test_strings">
  495. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  496. </collectionProp>
  497. <stringProp name="Assertion.custom_message"></stringProp>
  498. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  499. <boolProp name="Assertion.assume_success">false</boolProp>
  500. <intProp name="Assertion.test_type">16</intProp>
  501. </ResponseAssertion>
  502. <hashTree/>
  503. </hashTree>
  504. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule2" enabled="true">
  505. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  506. <collectionProp name="Arguments.arguments"/>
  507. </elementProp>
  508. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  509. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  510. <stringProp name="HTTPSampler.protocol"></stringProp>
  511. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  512. <stringProp name="HTTPSampler.path">/rules/rule2</stringProp>
  513. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  514. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  515. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  516. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  517. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  518. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  519. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  520. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  521. </HTTPSamplerProxy>
  522. <hashTree>
  523. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  524. <collectionProp name="Asserion.test_strings">
  525. <stringProp name="423847478">Rule rule2 is dropped.</stringProp>
  526. </collectionProp>
  527. <stringProp name="Assertion.custom_message"></stringProp>
  528. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  529. <boolProp name="Assertion.assume_success">false</boolProp>
  530. <intProp name="Assertion.test_type">16</intProp>
  531. </ResponseAssertion>
  532. <hashTree/>
  533. </hashTree>
  534. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRuleFinal" enabled="true">
  535. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  536. <collectionProp name="Arguments.arguments"/>
  537. </elementProp>
  538. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  539. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  540. <stringProp name="HTTPSampler.protocol"></stringProp>
  541. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  542. <stringProp name="HTTPSampler.path">/rules/ruleFinal</stringProp>
  543. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  544. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  545. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  546. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  547. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  548. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  549. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  550. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  551. </HTTPSamplerProxy>
  552. <hashTree>
  553. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  554. <collectionProp name="Asserion.test_strings">
  555. <stringProp name="-891985574">Rule ruleFinal is dropped.</stringProp>
  556. </collectionProp>
  557. <stringProp name="Assertion.custom_message"></stringProp>
  558. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  559. <boolProp name="Assertion.assume_success">false</boolProp>
  560. <intProp name="Assertion.test_type">16</intProp>
  561. </ResponseAssertion>
  562. <hashTree/>
  563. </hashTree>
  564. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Device1" enabled="true">
  565. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  566. <collectionProp name="Arguments.arguments"/>
  567. </elementProp>
  568. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  569. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  570. <stringProp name="HTTPSampler.protocol"></stringProp>
  571. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  572. <stringProp name="HTTPSampler.path">/streams/device1</stringProp>
  573. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  574. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  575. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  576. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  577. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  578. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  579. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  580. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  581. </HTTPSamplerProxy>
  582. <hashTree>
  583. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  584. <collectionProp name="Asserion.test_strings">
  585. <stringProp name="-1776233953">Stream device1 is dropped.</stringProp>
  586. </collectionProp>
  587. <stringProp name="Assertion.custom_message"></stringProp>
  588. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  589. <boolProp name="Assertion.assume_success">false</boolProp>
  590. <intProp name="Assertion.test_type">16</intProp>
  591. </ResponseAssertion>
  592. <hashTree/>
  593. </hashTree>
  594. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Device2" enabled="true">
  595. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  596. <collectionProp name="Arguments.arguments"/>
  597. </elementProp>
  598. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  599. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  600. <stringProp name="HTTPSampler.protocol"></stringProp>
  601. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  602. <stringProp name="HTTPSampler.path">/streams/device2</stringProp>
  603. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  604. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  605. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  606. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  607. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  608. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  609. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  610. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  611. </HTTPSamplerProxy>
  612. <hashTree>
  613. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  614. <collectionProp name="Asserion.test_strings">
  615. <stringProp name="-2069636960">Stream device2 is dropped.</stringProp>
  616. </collectionProp>
  617. <stringProp name="Assertion.custom_message"></stringProp>
  618. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  619. <boolProp name="Assertion.assume_success">false</boolProp>
  620. <intProp name="Assertion.test_type">16</intProp>
  621. </ResponseAssertion>
  622. <hashTree/>
  623. </hashTree>
  624. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_SensorAll" enabled="true">
  625. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  626. <collectionProp name="Arguments.arguments"/>
  627. </elementProp>
  628. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  629. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  630. <stringProp name="HTTPSampler.protocol"></stringProp>
  631. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  632. <stringProp name="HTTPSampler.path">/streams/sensorAll</stringProp>
  633. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  634. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  635. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  636. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  637. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  638. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  639. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  640. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  641. </HTTPSamplerProxy>
  642. <hashTree>
  643. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  644. <collectionProp name="Asserion.test_strings">
  645. <stringProp name="-49438965">Stream sensorAll is dropped.</stringProp>
  646. </collectionProp>
  647. <stringProp name="Assertion.custom_message"></stringProp>
  648. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  649. <boolProp name="Assertion.assume_success">false</boolProp>
  650. <intProp name="Assertion.test_type">16</intProp>
  651. </ResponseAssertion>
  652. <hashTree/>
  653. </hashTree>
  654. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  655. <stringProp name="ConstantTimer.delay">500</stringProp>
  656. </ConstantTimer>
  657. <hashTree/>
  658. </hashTree>
  659. </hashTree>
  660. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  661. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  662. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  663. <boolProp name="LoopController.continue_forever">false</boolProp>
  664. <stringProp name="LoopController.loops">1</stringProp>
  665. </elementProp>
  666. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  667. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  668. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  669. <stringProp name="ThreadGroup.duration"></stringProp>
  670. <stringProp name="ThreadGroup.delay"></stringProp>
  671. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  672. </ThreadGroup>
  673. <hashTree>
  674. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  675. <boolProp name="ResultCollector.error_logging">false</boolProp>
  676. <objProp>
  677. <name>saveConfig</name>
  678. <value class="SampleSaveConfiguration">
  679. <time>true</time>
  680. <latency>true</latency>
  681. <timestamp>true</timestamp>
  682. <success>true</success>
  683. <label>true</label>
  684. <code>true</code>
  685. <message>true</message>
  686. <threadName>true</threadName>
  687. <dataType>true</dataType>
  688. <encoding>false</encoding>
  689. <assertions>true</assertions>
  690. <subresults>true</subresults>
  691. <responseData>false</responseData>
  692. <samplerData>false</samplerData>
  693. <xml>false</xml>
  694. <fieldNames>true</fieldNames>
  695. <responseHeaders>false</responseHeaders>
  696. <requestHeaders>false</requestHeaders>
  697. <responseDataOnError>false</responseDataOnError>
  698. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  699. <assertionsResultsToSave>0</assertionsResultsToSave>
  700. <bytes>true</bytes>
  701. <sentBytes>true</sentBytes>
  702. <threadCounts>true</threadCounts>
  703. <idleTime>true</idleTime>
  704. <connectTime>true</connectTime>
  705. </value>
  706. </objProp>
  707. <stringProp name="filename"></stringProp>
  708. </ResultCollector>
  709. <hashTree/>
  710. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  711. <hashTree>
  712. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  713. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  714. <stringProp name="mqtt.port">1883</stringProp>
  715. <stringProp name="mqtt.version">3.1</stringProp>
  716. <stringProp name="mqtt.conn_timeout">10</stringProp>
  717. <boolProp name="mqtt.private_protocol">false</boolProp>
  718. <stringProp name="mqtt.listener_timeout">10</stringProp>
  719. <stringProp name="mqtt.protocol">TCP</stringProp>
  720. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  721. <stringProp name="mqtt.keystore_file_path"></stringProp>
  722. <stringProp name="mqtt.keystore_password"></stringProp>
  723. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  724. <stringProp name="mqtt.clientcert_password"></stringProp>
  725. <stringProp name="mqtt.user_name"></stringProp>
  726. <stringProp name="mqtt.password"></stringProp>
  727. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  728. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  729. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  730. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  731. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  732. <boolProp name="mqtt.conn_clean_session">true</boolProp>
  733. </net.xmeter.samplers.ConnectSampler>
  734. <hashTree/>
  735. </hashTree>
  736. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  737. <stringProp name="mqtt.topic_name">final/result/source/rule1</stringProp>
  738. <stringProp name="mqtt.qos_level">0</stringProp>
  739. <boolProp name="mqtt.add_timestamp">false</boolProp>
  740. <boolProp name="mqtt.debug_response">true</boolProp>
  741. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  742. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  743. </net.xmeter.samplers.SubSampler>
  744. <hashTree>
  745. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="temperature Assertion" enabled="true">
  746. <stringProp name="JSON_PATH">$.temp</stringProp>
  747. <stringProp name="EXPECTED_VALUE">24.349999999999998</stringProp>
  748. <boolProp name="JSONVALIDATION">true</boolProp>
  749. <boolProp name="EXPECT_NULL">false</boolProp>
  750. <boolProp name="INVERT">false</boolProp>
  751. <boolProp name="ISREGEX">false</boolProp>
  752. </JSONPathAssertion>
  753. <hashTree/>
  754. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="ts Assertion" enabled="true">
  755. <stringProp name="JSON_PATH">$.ts</stringProp>
  756. <stringProp name="EXPECTED_VALUE">1541152492000</stringProp>
  757. <boolProp name="JSONVALIDATION">true</boolProp>
  758. <boolProp name="EXPECT_NULL">false</boolProp>
  759. <boolProp name="INVERT">false</boolProp>
  760. <boolProp name="ISREGEX">false</boolProp>
  761. </JSONPathAssertion>
  762. <hashTree/>
  763. </hashTree>
  764. </hashTree>
  765. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  766. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  767. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  768. <boolProp name="LoopController.continue_forever">false</boolProp>
  769. <stringProp name="LoopController.loops">1</stringProp>
  770. </elementProp>
  771. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  772. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  773. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  774. <stringProp name="ThreadGroup.duration"></stringProp>
  775. <stringProp name="ThreadGroup.delay"></stringProp>
  776. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  777. </ThreadGroup>
  778. <hashTree>
  779. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  780. <boolProp name="ResultCollector.error_logging">false</boolProp>
  781. <objProp>
  782. <name>saveConfig</name>
  783. <value class="SampleSaveConfiguration">
  784. <time>true</time>
  785. <latency>true</latency>
  786. <timestamp>true</timestamp>
  787. <success>true</success>
  788. <label>true</label>
  789. <code>true</code>
  790. <message>true</message>
  791. <threadName>true</threadName>
  792. <dataType>true</dataType>
  793. <encoding>false</encoding>
  794. <assertions>true</assertions>
  795. <subresults>true</subresults>
  796. <responseData>false</responseData>
  797. <samplerData>false</samplerData>
  798. <xml>false</xml>
  799. <fieldNames>true</fieldNames>
  800. <responseHeaders>false</responseHeaders>
  801. <requestHeaders>false</requestHeaders>
  802. <responseDataOnError>false</responseDataOnError>
  803. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  804. <assertionsResultsToSave>0</assertionsResultsToSave>
  805. <bytes>true</bytes>
  806. <sentBytes>true</sentBytes>
  807. <threadCounts>true</threadCounts>
  808. <idleTime>true</idleTime>
  809. <connectTime>true</connectTime>
  810. </value>
  811. </objProp>
  812. <stringProp name="filename"></stringProp>
  813. </ResultCollector>
  814. <hashTree/>
  815. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  816. <hashTree>
  817. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  818. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  819. <stringProp name="mqtt.port">1883</stringProp>
  820. <stringProp name="mqtt.version">3.1</stringProp>
  821. <stringProp name="mqtt.conn_timeout">10</stringProp>
  822. <boolProp name="mqtt.private_protocol">false</boolProp>
  823. <stringProp name="mqtt.listener_timeout">10</stringProp>
  824. <stringProp name="mqtt.protocol">TCP</stringProp>
  825. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  826. <stringProp name="mqtt.keystore_file_path"></stringProp>
  827. <stringProp name="mqtt.keystore_password"></stringProp>
  828. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  829. <stringProp name="mqtt.clientcert_password"></stringProp>
  830. <stringProp name="mqtt.user_name"></stringProp>
  831. <stringProp name="mqtt.password"></stringProp>
  832. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  833. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  834. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  835. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  836. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  837. <boolProp name="mqtt.conn_clean_session">true</boolProp>
  838. </net.xmeter.samplers.ConnectSampler>
  839. <hashTree/>
  840. </hashTree>
  841. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  842. <stringProp name="mqtt.topic_name">final/result/source/rule2</stringProp>
  843. <stringProp name="mqtt.qos_level">0</stringProp>
  844. <boolProp name="mqtt.add_timestamp">false</boolProp>
  845. <boolProp name="mqtt.debug_response">true</boolProp>
  846. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  847. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  848. </net.xmeter.samplers.SubSampler>
  849. <hashTree>
  850. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="temperature Assertion" enabled="true">
  851. <stringProp name="JSON_PATH">$.temp</stringProp>
  852. <stringProp name="EXPECTED_VALUE">27.03333333333333</stringProp>
  853. <boolProp name="JSONVALIDATION">true</boolProp>
  854. <boolProp name="EXPECT_NULL">false</boolProp>
  855. <boolProp name="INVERT">false</boolProp>
  856. <boolProp name="ISREGEX">false</boolProp>
  857. </JSONPathAssertion>
  858. <hashTree/>
  859. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="ts Assertion" enabled="true">
  860. <stringProp name="JSON_PATH">$.ts</stringProp>
  861. <stringProp name="EXPECTED_VALUE">1541152490000</stringProp>
  862. <boolProp name="JSONVALIDATION">true</boolProp>
  863. <boolProp name="EXPECT_NULL">false</boolProp>
  864. <boolProp name="INVERT">false</boolProp>
  865. <boolProp name="ISREGEX">false</boolProp>
  866. </JSONPathAssertion>
  867. <hashTree/>
  868. </hashTree>
  869. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  870. <stringProp name="mqtt.topic_name">final/result/source/rule2</stringProp>
  871. <stringProp name="mqtt.qos_level">0</stringProp>
  872. <boolProp name="mqtt.add_timestamp">false</boolProp>
  873. <boolProp name="mqtt.debug_response">true</boolProp>
  874. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  875. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  876. </net.xmeter.samplers.SubSampler>
  877. <hashTree>
  878. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="temperature Assertion" enabled="true">
  879. <stringProp name="JSON_PATH">$.temp</stringProp>
  880. <stringProp name="EXPECTED_VALUE">27.025000000000002</stringProp>
  881. <boolProp name="JSONVALIDATION">true</boolProp>
  882. <boolProp name="EXPECT_NULL">false</boolProp>
  883. <boolProp name="INVERT">false</boolProp>
  884. <boolProp name="ISREGEX">false</boolProp>
  885. </JSONPathAssertion>
  886. <hashTree/>
  887. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="ts Assertion" enabled="true">
  888. <stringProp name="JSON_PATH">$.ts</stringProp>
  889. <stringProp name="EXPECTED_VALUE">1541152492000</stringProp>
  890. <boolProp name="JSONVALIDATION">true</boolProp>
  891. <boolProp name="EXPECT_NULL">false</boolProp>
  892. <boolProp name="INVERT">false</boolProp>
  893. <boolProp name="ISREGEX">false</boolProp>
  894. </JSONPathAssertion>
  895. <hashTree/>
  896. </hashTree>
  897. </hashTree>
  898. </hashTree>
  899. </hashTree>
  900. </jmeterTestPlan>