http_pull_rule.jmx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Copyright 2021 EMQ Technologies Co., Ltd.
  4. ~
  5. ~ Licensed under the Apache License, Version 2.0 (the "License");
  6. ~ you may not use this file except in compliance with the License.
  7. ~ You may obtain a copy of the License at
  8. ~
  9. ~ http://www.apache.org/licenses/LICENSE-2.0
  10. ~
  11. ~ Unless required by applicable law or agreed to in writing, software
  12. ~ distributed under the License is distributed on an "AS IS" BASIS,
  13. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ~ See the License for the specific language governing permissions and
  15. ~ limitations under the License.
  16. -->
  17. <jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414">
  18. <hashTree>
  19. <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
  20. <stringProp name="TestPlan.comments"></stringProp>
  21. <boolProp name="TestPlan.functional_mode">false</boolProp>
  22. <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
  23. <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
  24. <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  25. <collectionProp name="Arguments.arguments"/>
  26. </elementProp>
  27. <stringProp name="TestPlan.user_define_classpath"></stringProp>
  28. </TestPlan>
  29. <hashTree>
  30. <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  31. <collectionProp name="Arguments.arguments">
  32. <elementProp name="srv" elementType="Argument">
  33. <stringProp name="Argument.name">srv</stringProp>
  34. <stringProp name="Argument.value">127.0.0.1</stringProp>
  35. <stringProp name="Argument.metadata">=</stringProp>
  36. </elementProp>
  37. <elementProp name="rest_port" elementType="Argument">
  38. <stringProp name="Argument.name">rest_port</stringProp>
  39. <stringProp name="Argument.value">9081</stringProp>
  40. <stringProp name="Argument.metadata">=</stringProp>
  41. </elementProp>
  42. <elementProp name="mqtt_srv" elementType="Argument">
  43. <stringProp name="Argument.name">mqtt_srv</stringProp>
  44. <stringProp name="Argument.value">127.0.0.1</stringProp>
  45. <stringProp name="Argument.metadata">=</stringProp>
  46. </elementProp>
  47. </collectionProp>
  48. </Arguments>
  49. <hashTree/>
  50. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Rules" enabled="true">
  51. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  52. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  53. <boolProp name="LoopController.continue_forever">false</boolProp>
  54. <stringProp name="LoopController.loops">1</stringProp>
  55. </elementProp>
  56. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  57. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  58. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  59. <stringProp name="ThreadGroup.duration"></stringProp>
  60. <stringProp name="ThreadGroup.delay"></stringProp>
  61. </ThreadGroup>
  62. <hashTree>
  63. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  64. <boolProp name="ResultCollector.error_logging">false</boolProp>
  65. <objProp>
  66. <name>saveConfig</name>
  67. <value class="SampleSaveConfiguration">
  68. <time>true</time>
  69. <latency>true</latency>
  70. <timestamp>true</timestamp>
  71. <success>true</success>
  72. <label>true</label>
  73. <code>true</code>
  74. <message>true</message>
  75. <threadName>true</threadName>
  76. <dataType>true</dataType>
  77. <encoding>false</encoding>
  78. <assertions>true</assertions>
  79. <subresults>true</subresults>
  80. <responseData>false</responseData>
  81. <samplerData>false</samplerData>
  82. <xml>false</xml>
  83. <fieldNames>true</fieldNames>
  84. <responseHeaders>false</responseHeaders>
  85. <requestHeaders>false</requestHeaders>
  86. <responseDataOnError>false</responseDataOnError>
  87. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  88. <assertionsResultsToSave>0</assertionsResultsToSave>
  89. <bytes>true</bytes>
  90. <sentBytes>true</sentBytes>
  91. <threadCounts>true</threadCounts>
  92. <idleTime>true</idleTime>
  93. <connectTime>true</connectTime>
  94. </value>
  95. </objProp>
  96. <stringProp name="filename"></stringProp>
  97. </ResultCollector>
  98. <hashTree/>
  99. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="API" enabled="true">
  100. <boolProp name="TransactionController.includeTimers">false</boolProp>
  101. <boolProp name="TransactionController.parent">false</boolProp>
  102. </TransactionController>
  103. <hashTree>
  104. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStream" enabled="true">
  105. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  106. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  107. <collectionProp name="Arguments.arguments">
  108. <elementProp name="" elementType="HTTPArgument">
  109. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  110. <stringProp name="Argument.value">{&#xd;
  111. &quot;sql&quot; : &quot;create stream demo (Temperature float, humidity bigint) WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;httppull\&quot; DATASOURCE=\&quot;pull\&quot; Conf_key=\&quot;application_conf\&quot;)&quot;&#xd;
  112. }</stringProp>
  113. <stringProp name="Argument.metadata">=</stringProp>
  114. </elementProp>
  115. </collectionProp>
  116. </elementProp>
  117. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  118. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  119. <stringProp name="HTTPSampler.protocol"></stringProp>
  120. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  121. <stringProp name="HTTPSampler.path">/streams</stringProp>
  122. <stringProp name="HTTPSampler.method">POST</stringProp>
  123. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  124. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  125. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  126. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  127. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  128. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  129. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  130. </HTTPSamplerProxy>
  131. <hashTree>
  132. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  133. <collectionProp name="Asserion.test_strings">
  134. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  135. </collectionProp>
  136. <stringProp name="Assertion.custom_message"></stringProp>
  137. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  138. <boolProp name="Assertion.assume_success">true</boolProp>
  139. <intProp name="Assertion.test_type">16</intProp>
  140. </ResponseAssertion>
  141. <hashTree/>
  142. </hashTree>
  143. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule" enabled="true">
  144. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  145. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  146. <collectionProp name="Arguments.arguments">
  147. <elementProp name="" elementType="HTTPArgument">
  148. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  149. <stringProp name="Argument.value">{&#xd;
  150. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  151. &quot;sql&quot;: &quot;SELECT * FROM demo&quot;,&#xd;
  152. &quot;actions&quot;: [&#xd;
  153. {&#xd;
  154. &quot;log&quot;: {}&#xd;
  155. },&#xd;
  156. {&#xd;
  157. &quot;mqtt&quot;: {&#xd;
  158. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  159. &quot;topic&quot;: &quot;devices/result&quot;,&#xd;
  160. &quot;qos&quot;: 1,&#xd;
  161. &quot;clientId&quot;: &quot;demo_001&quot;&#xd;
  162. }&#xd;
  163. }&#xd;
  164. ]&#xd;
  165. }</stringProp>
  166. <stringProp name="Argument.metadata">=</stringProp>
  167. </elementProp>
  168. </collectionProp>
  169. </elementProp>
  170. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  171. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  172. <stringProp name="HTTPSampler.protocol"></stringProp>
  173. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  174. <stringProp name="HTTPSampler.path">/rules</stringProp>
  175. <stringProp name="HTTPSampler.method">POST</stringProp>
  176. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  177. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  178. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  179. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  180. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  181. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  182. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  183. </HTTPSamplerProxy>
  184. <hashTree>
  185. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  186. <collectionProp name="Asserion.test_strings">
  187. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  188. </collectionProp>
  189. <stringProp name="Assertion.custom_message"></stringProp>
  190. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  191. <boolProp name="Assertion.assume_success">true</boolProp>
  192. <intProp name="Assertion.test_type">16</intProp>
  193. </ResponseAssertion>
  194. <hashTree/>
  195. </hashTree>
  196. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  197. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  198. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  199. <collectionProp name="Arguments.arguments">
  200. <elementProp name="" elementType="HTTPArgument">
  201. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  202. <stringProp name="Argument.value"></stringProp>
  203. <stringProp name="Argument.metadata">=</stringProp>
  204. </elementProp>
  205. </collectionProp>
  206. </elementProp>
  207. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  208. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  209. <stringProp name="HTTPSampler.protocol"></stringProp>
  210. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  211. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  212. <stringProp name="HTTPSampler.method">GET</stringProp>
  213. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  214. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  215. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  216. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  217. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  218. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  219. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  220. </HTTPSamplerProxy>
  221. <hashTree>
  222. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  223. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  224. <stringProp name="EXPECTED_VALUE">0</stringProp>
  225. <boolProp name="JSONVALIDATION">true</boolProp>
  226. <boolProp name="EXPECT_NULL">false</boolProp>
  227. <boolProp name="INVERT">false</boolProp>
  228. <boolProp name="ISREGEX">false</boolProp>
  229. </JSONPathAssertion>
  230. <hashTree/>
  231. </hashTree>
  232. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  233. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  234. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  235. <collectionProp name="Arguments.arguments">
  236. <elementProp name="" elementType="HTTPArgument">
  237. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  238. <stringProp name="Argument.value"></stringProp>
  239. <stringProp name="Argument.metadata">=</stringProp>
  240. </elementProp>
  241. </collectionProp>
  242. </elementProp>
  243. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  244. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  245. <stringProp name="HTTPSampler.protocol"></stringProp>
  246. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  247. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  248. <stringProp name="HTTPSampler.method">GET</stringProp>
  249. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  250. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  251. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  252. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  253. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  254. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  255. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  256. </HTTPSamplerProxy>
  257. <hashTree>
  258. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  259. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  260. <stringProp name="EXPECTED_VALUE">1</stringProp>
  261. <boolProp name="JSONVALIDATION">true</boolProp>
  262. <boolProp name="EXPECT_NULL">false</boolProp>
  263. <boolProp name="INVERT">false</boolProp>
  264. <boolProp name="ISREGEX">false</boolProp>
  265. </JSONPathAssertion>
  266. <hashTree/>
  267. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  268. <stringProp name="JSON_PATH">$.sink_mqtt_1_0_records_in_total</stringProp>
  269. <stringProp name="EXPECTED_VALUE">1</stringProp>
  270. <boolProp name="JSONVALIDATION">true</boolProp>
  271. <boolProp name="EXPECT_NULL">false</boolProp>
  272. <boolProp name="INVERT">false</boolProp>
  273. <boolProp name="ISREGEX">false</boolProp>
  274. </JSONPathAssertion>
  275. <hashTree/>
  276. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
  277. <stringProp name="ConstantTimer.delay">23000</stringProp>
  278. </ConstantTimer>
  279. <hashTree/>
  280. </hashTree>
  281. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  282. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  283. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  284. <collectionProp name="Arguments.arguments">
  285. <elementProp name="" elementType="HTTPArgument">
  286. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  287. <stringProp name="Argument.value"></stringProp>
  288. <stringProp name="Argument.metadata">=</stringProp>
  289. </elementProp>
  290. </collectionProp>
  291. </elementProp>
  292. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  293. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  294. <stringProp name="HTTPSampler.protocol"></stringProp>
  295. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  296. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  297. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  298. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  299. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  300. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  301. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  302. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  303. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  304. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  305. </HTTPSamplerProxy>
  306. <hashTree>
  307. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  308. <collectionProp name="Asserion.test_strings">
  309. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  310. </collectionProp>
  311. <stringProp name="Assertion.custom_message"></stringProp>
  312. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  313. <boolProp name="Assertion.assume_success">false</boolProp>
  314. <intProp name="Assertion.test_type">16</intProp>
  315. </ResponseAssertion>
  316. <hashTree/>
  317. </hashTree>
  318. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  319. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  320. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  321. <collectionProp name="Arguments.arguments">
  322. <elementProp name="" elementType="HTTPArgument">
  323. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  324. <stringProp name="Argument.value"></stringProp>
  325. <stringProp name="Argument.metadata">=</stringProp>
  326. </elementProp>
  327. </collectionProp>
  328. </elementProp>
  329. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  330. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  331. <stringProp name="HTTPSampler.protocol"></stringProp>
  332. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  333. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  334. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  335. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  336. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  337. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  338. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  339. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  340. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  341. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  342. </HTTPSamplerProxy>
  343. <hashTree>
  344. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  345. <collectionProp name="Asserion.test_strings">
  346. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  347. </collectionProp>
  348. <stringProp name="Assertion.custom_message"></stringProp>
  349. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  350. <boolProp name="Assertion.assume_success">false</boolProp>
  351. <intProp name="Assertion.test_type">16</intProp>
  352. </ResponseAssertion>
  353. <hashTree/>
  354. </hashTree>
  355. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  356. <stringProp name="ConstantTimer.delay">500</stringProp>
  357. </ConstantTimer>
  358. <hashTree/>
  359. </hashTree>
  360. </hashTree>
  361. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  362. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  363. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  364. <boolProp name="LoopController.continue_forever">false</boolProp>
  365. <stringProp name="LoopController.loops">1</stringProp>
  366. </elementProp>
  367. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  368. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  369. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  370. <stringProp name="ThreadGroup.duration"></stringProp>
  371. <stringProp name="ThreadGroup.delay"></stringProp>
  372. </ThreadGroup>
  373. <hashTree>
  374. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  375. <boolProp name="ResultCollector.error_logging">false</boolProp>
  376. <objProp>
  377. <name>saveConfig</name>
  378. <value class="SampleSaveConfiguration">
  379. <time>true</time>
  380. <latency>true</latency>
  381. <timestamp>true</timestamp>
  382. <success>true</success>
  383. <label>true</label>
  384. <code>true</code>
  385. <message>true</message>
  386. <threadName>true</threadName>
  387. <dataType>true</dataType>
  388. <encoding>false</encoding>
  389. <assertions>true</assertions>
  390. <subresults>true</subresults>
  391. <responseData>false</responseData>
  392. <samplerData>false</samplerData>
  393. <xml>false</xml>
  394. <fieldNames>true</fieldNames>
  395. <responseHeaders>false</responseHeaders>
  396. <requestHeaders>false</requestHeaders>
  397. <responseDataOnError>false</responseDataOnError>
  398. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  399. <assertionsResultsToSave>0</assertionsResultsToSave>
  400. <bytes>true</bytes>
  401. <sentBytes>true</sentBytes>
  402. <threadCounts>true</threadCounts>
  403. <idleTime>true</idleTime>
  404. <connectTime>true</connectTime>
  405. </value>
  406. </objProp>
  407. <stringProp name="filename"></stringProp>
  408. </ResultCollector>
  409. <hashTree/>
  410. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  411. <hashTree>
  412. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  413. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  414. <stringProp name="mqtt.port">1883</stringProp>
  415. <stringProp name="mqtt.version">3.1</stringProp>
  416. <stringProp name="mqtt.conn_timeout">10</stringProp>
  417. <boolProp name="mqtt.private_protocol">false</boolProp>
  418. <stringProp name="mqtt.listener_timeout">10</stringProp>
  419. <stringProp name="mqtt.protocol">TCP</stringProp>
  420. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  421. <stringProp name="mqtt.keystore_file_path"></stringProp>
  422. <stringProp name="mqtt.keystore_password"></stringProp>
  423. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  424. <stringProp name="mqtt.clientcert_password"></stringProp>
  425. <stringProp name="mqtt.user_name"></stringProp>
  426. <stringProp name="mqtt.password"></stringProp>
  427. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  428. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  429. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  430. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  431. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  432. </net.xmeter.samplers.ConnectSampler>
  433. <hashTree/>
  434. </hashTree>
  435. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  436. <stringProp name="mqtt.topic_name">devices/result</stringProp>
  437. <stringProp name="mqtt.qos_level">0</stringProp>
  438. <boolProp name="mqtt.add_timestamp">false</boolProp>
  439. <boolProp name="mqtt.debug_response">true</boolProp>
  440. <stringProp name="mqtt.sample_condition">specified elapsed time (ms)</stringProp>
  441. <stringProp name="mqtt.sample_condition_value">25000</stringProp>
  442. </net.xmeter.samplers.SubSampler>
  443. <hashTree>
  444. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="temperature Assertion" enabled="true">
  445. <stringProp name="JSON_PATH">$[0].Temperature</stringProp>
  446. <stringProp name="EXPECTED_VALUE">${temperature}</stringProp>
  447. <boolProp name="JSONVALIDATION">false</boolProp>
  448. <boolProp name="EXPECT_NULL">false</boolProp>
  449. <boolProp name="INVERT">false</boolProp>
  450. <boolProp name="ISREGEX">false</boolProp>
  451. </JSONPathAssertion>
  452. <hashTree/>
  453. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="humidity Assertion" enabled="true">
  454. <stringProp name="JSON_PATH">$[0].humidity</stringProp>
  455. <stringProp name="EXPECTED_VALUE">${humidity}</stringProp>
  456. <boolProp name="JSONVALIDATION">false</boolProp>
  457. <boolProp name="EXPECT_NULL">false</boolProp>
  458. <boolProp name="INVERT">false</boolProp>
  459. <boolProp name="ISREGEX">false</boolProp>
  460. </JSONPathAssertion>
  461. <hashTree/>
  462. </hashTree>
  463. </hashTree>
  464. </hashTree>
  465. </hashTree>
  466. </jmeterTestPlan>