graph_join_rule.jmx 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Copyright 2023 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_CreateRule" 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;id&quot;: &quot;rule1&quot;,&#xd;
  136. &quot;name&quot;: &quot;Join规则&quot;,&#xd;
  137. &quot;graph&quot;: {&#xd;
  138. &quot;nodes&quot;: {&#xd;
  139. &quot;device1&quot;: {&#xd;
  140. &quot;type&quot;: &quot;source&quot;,&#xd;
  141. &quot;nodeType&quot;: &quot;mqtt&quot;,&#xd;
  142. &quot;props&quot;: {&#xd;
  143. &quot;datasource&quot;: &quot;devices/1/messages&quot;,&#xd;
  144. &quot;timestamp&quot;: &quot;ts&quot;&#xd;
  145. }&#xd;
  146. },&#xd;
  147. &quot;device2&quot;: {&#xd;
  148. &quot;type&quot;: &quot;source&quot;,&#xd;
  149. &quot;nodeType&quot;: &quot;mqtt&quot;,&#xd;
  150. &quot;props&quot;: {&#xd;
  151. &quot;datasource&quot;: &quot;devices/2/messages&quot;,&#xd;
  152. &quot;timestamp&quot;: &quot;ts&quot;&#xd;
  153. }&#xd;
  154. },&#xd;
  155. &quot;watermark&quot;: {&#xd;
  156. &quot;type&quot;: &quot;operator&quot;,&#xd;
  157. &quot;nodeType&quot;: &quot;watermark&quot;,&#xd;
  158. &quot;props&quot;: {&#xd;
  159. &quot;emitters&quot;:[&quot;device1&quot;,&quot;device2&quot;],&#xd;
  160. &quot;sendWatermark&quot;:true&#xd;
  161. }&#xd;
  162. },&#xd;
  163. &quot;window&quot;: {&#xd;
  164. &quot;type&quot;: &quot;operator&quot;,&#xd;
  165. &quot;nodeType&quot;: &quot;window&quot;,&#xd;
  166. &quot;props&quot;: {&#xd;
  167. &quot;type&quot;: &quot;tumblingwindow&quot;,&#xd;
  168. &quot;unit&quot;: &quot;ms&quot;,&#xd;
  169. &quot;size&quot;: 600&#xd;
  170. }&#xd;
  171. },&#xd;
  172. &quot;joinop&quot;: {&#xd;
  173. &quot;type&quot;: &quot;operator&quot;,&#xd;
  174. &quot;nodeType&quot;: &quot;join&quot;,&#xd;
  175. &quot;props&quot;: {&#xd;
  176. &quot;from&quot;: &quot;device1&quot;,&#xd;
  177. &quot;joins&quot;: [&#xd;
  178. {&#xd;
  179. &quot;name&quot;: &quot;device2&quot;,&#xd;
  180. &quot;type&quot;: &quot;inner&quot;,&#xd;
  181. &quot;on&quot;: &quot;abs(device1.ts - device2.ts) &lt; 200&quot;&#xd;
  182. }&#xd;
  183. ]&#xd;
  184. }&#xd;
  185. },&#xd;
  186. &quot;mqtt&quot;: {&#xd;
  187. &quot;type&quot;: &quot;sink&quot;,&#xd;
  188. &quot;nodeType&quot;: &quot;mqtt&quot;,&#xd;
  189. &quot;props&quot;: {&#xd;
  190. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  191. &quot;topic&quot;: &quot;devices/result&quot;&#xd;
  192. }&#xd;
  193. },&#xd;
  194. &quot;log&quot;: {&#xd;
  195. &quot;type&quot;: &quot;sink&quot;,&#xd;
  196. &quot;nodeType&quot;: &quot;log&quot;,&#xd;
  197. &quot;props&quot;: {}&#xd;
  198. }&#xd;
  199. },&#xd;
  200. &quot;topo&quot;: {&#xd;
  201. &quot;sources&quot;: [&quot;device1&quot;, &quot;device2&quot;],&#xd;
  202. &quot;edges&quot;: {&#xd;
  203. &quot;device1&quot;: [&quot;watermark&quot;],&#xd;
  204. &quot;device2&quot;: [&quot;watermark&quot;],&#xd;
  205. &quot;watermark&quot;:[&quot;window&quot;],&#xd;
  206. &quot;window&quot;: [&quot;joinop&quot;],&#xd;
  207. &quot;joinop&quot;: [&quot;mqtt&quot;, &quot;log&quot;]&#xd;
  208. }&#xd;
  209. }&#xd;
  210. },&#xd;
  211. &quot;options&quot;: {&#xd;
  212. &quot;isEventTime&quot;: true,&#xd;
  213. &quot;lateTolerance&quot; : 0&#xd;
  214. }&#xd;
  215. }
  216. </stringProp>
  217. <stringProp name="Argument.metadata">=</stringProp>
  218. </elementProp>
  219. </collectionProp>
  220. </elementProp>
  221. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  222. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  223. <stringProp name="HTTPSampler.protocol"></stringProp>
  224. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  225. <stringProp name="HTTPSampler.path">/rules</stringProp>
  226. <stringProp name="HTTPSampler.method">POST</stringProp>
  227. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  228. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  229. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  230. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  231. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  232. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  233. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  234. </HTTPSamplerProxy>
  235. <hashTree>
  236. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  237. <collectionProp name="Asserion.test_strings">
  238. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  239. </collectionProp>
  240. <stringProp name="Assertion.custom_message"></stringProp>
  241. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  242. <boolProp name="Assertion.assume_success">true</boolProp>
  243. <intProp name="Assertion.test_type">16</intProp>
  244. </ResponseAssertion>
  245. <hashTree/>
  246. </hashTree>
  247. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  248. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  249. <collectionProp name="Arguments.arguments"/>
  250. </elementProp>
  251. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  252. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  253. <stringProp name="HTTPSampler.protocol"></stringProp>
  254. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  255. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  256. <stringProp name="HTTPSampler.method">GET</stringProp>
  257. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  258. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  259. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  260. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  261. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  262. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  263. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  264. </HTTPSamplerProxy>
  265. <hashTree>
  266. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  267. <stringProp name="JSON_PATH">$.source_device1_0_records_in_total</stringProp>
  268. <stringProp name="EXPECTED_VALUE">0</stringProp>
  269. <boolProp name="JSONVALIDATION">true</boolProp>
  270. <boolProp name="EXPECT_NULL">false</boolProp>
  271. <boolProp name="INVERT">false</boolProp>
  272. <boolProp name="ISREGEX">false</boolProp>
  273. </JSONPathAssertion>
  274. <hashTree/>
  275. </hashTree>
  276. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="loop_controller" enabled="true">
  277. <boolProp name="LoopController.continue_forever">true</boolProp>
  278. <stringProp name="LoopController.loops">15</stringProp>
  279. </LoopController>
  280. <hashTree>
  281. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  282. <stringProp name="delimiter">,</stringProp>
  283. <stringProp name="fileEncoding"></stringProp>
  284. <stringProp name="filename">iot_data_ts.txt</stringProp>
  285. <boolProp name="ignoreFirstLine">false</boolProp>
  286. <boolProp name="quotedData">false</boolProp>
  287. <boolProp name="recycle">true</boolProp>
  288. <stringProp name="shareMode">shareMode.thread</stringProp>
  289. <boolProp name="stopThread">false</boolProp>
  290. <stringProp name="variableNames">device_id,ts,temperature,humidity</stringProp>
  291. </CSVDataSet>
  292. <hashTree/>
  293. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
  294. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  295. <stringProp name="mqtt.qos_level">0</stringProp>
  296. <boolProp name="mqtt.add_timestamp">false</boolProp>
  297. <stringProp name="mqtt.message_type">String</stringProp>
  298. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  299. <stringProp name="mqtt.message_to_sent">{&quot;ts&quot;:${ts},&quot;temperature&quot;: ${temperature}, &quot;humidity&quot; : ${humidity}}</stringProp>
  300. <boolProp name="mqtt.retained_message">false</boolProp>
  301. </net.xmeter.samplers.PubSampler>
  302. <hashTree/>
  303. </hashTree>
  304. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  305. <stringProp name="ConstantTimer.delay">100</stringProp>
  306. </ConstantTimer>
  307. <hashTree/>
  308. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  309. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  310. <collectionProp name="Arguments.arguments"/>
  311. </elementProp>
  312. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  313. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  314. <stringProp name="HTTPSampler.protocol"></stringProp>
  315. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  316. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  317. <stringProp name="HTTPSampler.method">GET</stringProp>
  318. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  319. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  320. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  321. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  322. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  323. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  324. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  325. </HTTPSamplerProxy>
  326. <hashTree>
  327. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  328. <stringProp name="JSON_PATH">$.op_window_0_records_in_total</stringProp>
  329. <stringProp name="EXPECTED_VALUE">13</stringProp>
  330. <boolProp name="JSONVALIDATION">true</boolProp>
  331. <boolProp name="EXPECT_NULL">false</boolProp>
  332. <boolProp name="INVERT">false</boolProp>
  333. <boolProp name="ISREGEX">false</boolProp>
  334. </JSONPathAssertion>
  335. <hashTree/>
  336. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  337. <stringProp name="JSON_PATH">$.sink_mqtt_0_records_out_total</stringProp>
  338. <stringProp name="EXPECTED_VALUE">4</stringProp>
  339. <boolProp name="JSONVALIDATION">true</boolProp>
  340. <boolProp name="EXPECT_NULL">false</boolProp>
  341. <boolProp name="INVERT">false</boolProp>
  342. <boolProp name="ISREGEX">false</boolProp>
  343. </JSONPathAssertion>
  344. <hashTree/>
  345. </hashTree>
  346. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  347. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  348. <collectionProp name="Arguments.arguments"/>
  349. </elementProp>
  350. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  351. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  352. <stringProp name="HTTPSampler.protocol"></stringProp>
  353. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  354. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  355. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  356. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  357. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  358. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  359. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  360. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  361. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  362. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  363. </HTTPSamplerProxy>
  364. <hashTree>
  365. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  366. <collectionProp name="Asserion.test_strings">
  367. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  368. </collectionProp>
  369. <stringProp name="Assertion.custom_message"></stringProp>
  370. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  371. <boolProp name="Assertion.assume_success">false</boolProp>
  372. <intProp name="Assertion.test_type">16</intProp>
  373. </ResponseAssertion>
  374. <hashTree/>
  375. </hashTree>
  376. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  377. <stringProp name="ConstantTimer.delay">500</stringProp>
  378. </ConstantTimer>
  379. <hashTree/>
  380. </hashTree>
  381. </hashTree>
  382. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  383. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  384. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  385. <boolProp name="LoopController.continue_forever">false</boolProp>
  386. <stringProp name="LoopController.loops">4</stringProp>
  387. </elementProp>
  388. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  389. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  390. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  391. <stringProp name="ThreadGroup.duration"></stringProp>
  392. <stringProp name="ThreadGroup.delay"></stringProp>
  393. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  394. </ThreadGroup>
  395. <hashTree>
  396. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  397. <boolProp name="ResultCollector.error_logging">false</boolProp>
  398. <objProp>
  399. <name>saveConfig</name>
  400. <value class="SampleSaveConfiguration">
  401. <time>true</time>
  402. <latency>true</latency>
  403. <timestamp>true</timestamp>
  404. <success>true</success>
  405. <label>true</label>
  406. <code>true</code>
  407. <message>true</message>
  408. <threadName>true</threadName>
  409. <dataType>true</dataType>
  410. <encoding>false</encoding>
  411. <assertions>true</assertions>
  412. <subresults>true</subresults>
  413. <responseData>false</responseData>
  414. <samplerData>false</samplerData>
  415. <xml>false</xml>
  416. <fieldNames>true</fieldNames>
  417. <responseHeaders>false</responseHeaders>
  418. <requestHeaders>false</requestHeaders>
  419. <responseDataOnError>false</responseDataOnError>
  420. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  421. <assertionsResultsToSave>0</assertionsResultsToSave>
  422. <bytes>true</bytes>
  423. <sentBytes>true</sentBytes>
  424. <threadCounts>true</threadCounts>
  425. <idleTime>true</idleTime>
  426. <connectTime>true</connectTime>
  427. </value>
  428. </objProp>
  429. <stringProp name="filename"></stringProp>
  430. </ResultCollector>
  431. <hashTree/>
  432. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
  433. <stringProp name="delimiter">,</stringProp>
  434. <stringProp name="fileEncoding"></stringProp>
  435. <stringProp name="filename">graph_join_rule_result.txt</stringProp>
  436. <boolProp name="ignoreFirstLine">false</boolProp>
  437. <boolProp name="quotedData">false</boolProp>
  438. <boolProp name="recycle">true</boolProp>
  439. <stringProp name="shareMode">shareMode.group</stringProp>
  440. <boolProp name="stopThread">false</boolProp>
  441. <stringProp name="variableNames">ts,temperature,humidity</stringProp>
  442. </CSVDataSet>
  443. <hashTree/>
  444. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  445. <hashTree>
  446. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  447. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  448. <stringProp name="mqtt.port">1883</stringProp>
  449. <stringProp name="mqtt.version">3.1</stringProp>
  450. <stringProp name="mqtt.conn_timeout">10</stringProp>
  451. <boolProp name="mqtt.private_protocol">false</boolProp>
  452. <stringProp name="mqtt.listener_timeout">10</stringProp>
  453. <stringProp name="mqtt.protocol">TCP</stringProp>
  454. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  455. <stringProp name="mqtt.keystore_file_path"></stringProp>
  456. <stringProp name="mqtt.keystore_password"></stringProp>
  457. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  458. <stringProp name="mqtt.clientcert_password"></stringProp>
  459. <stringProp name="mqtt.user_name"></stringProp>
  460. <stringProp name="mqtt.password"></stringProp>
  461. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  462. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  463. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  464. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  465. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  466. <boolProp name="mqtt.conn_clean_session">true</boolProp>
  467. </net.xmeter.samplers.ConnectSampler>
  468. <hashTree/>
  469. </hashTree>
  470. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  471. <stringProp name="mqtt.topic_name">devices/result</stringProp>
  472. <stringProp name="mqtt.qos_level">0</stringProp>
  473. <boolProp name="mqtt.add_timestamp">false</boolProp>
  474. <boolProp name="mqtt.debug_response">true</boolProp>
  475. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  476. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  477. </net.xmeter.samplers.SubSampler>
  478. <hashTree>
  479. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="temperature Assertion" enabled="true">
  480. <stringProp name="JSON_PATH">$[0].temperature</stringProp>
  481. <stringProp name="EXPECTED_VALUE">${temperature}</stringProp>
  482. <boolProp name="JSONVALIDATION">true</boolProp>
  483. <boolProp name="EXPECT_NULL">false</boolProp>
  484. <boolProp name="INVERT">false</boolProp>
  485. <boolProp name="ISREGEX">false</boolProp>
  486. </JSONPathAssertion>
  487. <hashTree/>
  488. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="humidity Assertion" enabled="true">
  489. <stringProp name="JSON_PATH">$[0].humidity</stringProp>
  490. <stringProp name="EXPECTED_VALUE">${humidity}</stringProp>
  491. <boolProp name="JSONVALIDATION">true</boolProp>
  492. <boolProp name="EXPECT_NULL">false</boolProp>
  493. <boolProp name="INVERT">false</boolProp>
  494. <boolProp name="ISREGEX">false</boolProp>
  495. </JSONPathAssertion>
  496. <hashTree/>
  497. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="ts Assertion" enabled="true">
  498. <stringProp name="JSON_PATH">$[0].ts</stringProp>
  499. <stringProp name="EXPECTED_VALUE">${ts}</stringProp>
  500. <boolProp name="JSONVALIDATION">true</boolProp>
  501. <boolProp name="EXPECT_NULL">false</boolProp>
  502. <boolProp name="INVERT">false</boolProp>
  503. <boolProp name="ISREGEX">false</boolProp>
  504. </JSONPathAssertion>
  505. <hashTree/>
  506. </hashTree>
  507. </hashTree>
  508. </hashTree>
  509. </hashTree>
  510. </jmeterTestPlan>