select_edgex_meta_rule.jmx 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  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="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="fvt" elementType="Argument">
  43. <stringProp name="Argument.name">fvt</stringProp>
  44. <stringProp name="Argument.value">${__property(fvt,,)}</stringProp>
  45. <stringProp name="Argument.metadata">=</stringProp>
  46. </elementProp>
  47. <elementProp name="mqtt_srv" elementType="Argument">
  48. <stringProp name="Argument.name">mqtt_srv</stringProp>
  49. <stringProp name="Argument.value">127.0.0.1</stringProp>
  50. <stringProp name="Argument.metadata">=</stringProp>
  51. </elementProp>
  52. </collectionProp>
  53. </Arguments>
  54. <hashTree/>
  55. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Rules" enabled="true">
  56. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  57. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  58. <boolProp name="LoopController.continue_forever">false</boolProp>
  59. <stringProp name="LoopController.loops">1</stringProp>
  60. </elementProp>
  61. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  62. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  63. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  64. <stringProp name="ThreadGroup.duration"></stringProp>
  65. <stringProp name="ThreadGroup.delay"></stringProp>
  66. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  67. </ThreadGroup>
  68. <hashTree>
  69. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  70. <boolProp name="ResultCollector.error_logging">false</boolProp>
  71. <objProp>
  72. <name>saveConfig</name>
  73. <value class="SampleSaveConfiguration">
  74. <time>true</time>
  75. <latency>true</latency>
  76. <timestamp>true</timestamp>
  77. <success>true</success>
  78. <label>true</label>
  79. <code>true</code>
  80. <message>true</message>
  81. <threadName>true</threadName>
  82. <dataType>true</dataType>
  83. <encoding>false</encoding>
  84. <assertions>true</assertions>
  85. <subresults>true</subresults>
  86. <responseData>false</responseData>
  87. <samplerData>false</samplerData>
  88. <xml>false</xml>
  89. <fieldNames>true</fieldNames>
  90. <responseHeaders>false</responseHeaders>
  91. <requestHeaders>false</requestHeaders>
  92. <responseDataOnError>false</responseDataOnError>
  93. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  94. <assertionsResultsToSave>0</assertionsResultsToSave>
  95. <bytes>true</bytes>
  96. <sentBytes>true</sentBytes>
  97. <threadCounts>true</threadCounts>
  98. <idleTime>true</idleTime>
  99. <connectTime>true</connectTime>
  100. </value>
  101. </objProp>
  102. <stringProp name="filename"></stringProp>
  103. </ResultCollector>
  104. <hashTree/>
  105. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="API" enabled="true">
  106. <boolProp name="TransactionController.includeTimers">false</boolProp>
  107. <boolProp name="TransactionController.parent">false</boolProp>
  108. </TransactionController>
  109. <hashTree>
  110. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStream" enabled="true">
  111. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  112. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  113. <collectionProp name="Arguments.arguments">
  114. <elementProp name="" elementType="HTTPArgument">
  115. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  116. <stringProp name="Argument.value">{&#xd;
  117. &quot;sql&quot; : &quot;create stream demo () WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;edgex\&quot;,Conf_key=\&quot;redis_conf\&quot;)&quot;&#xd;
  118. }</stringProp>
  119. <stringProp name="Argument.metadata">=</stringProp>
  120. </elementProp>
  121. </collectionProp>
  122. </elementProp>
  123. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  124. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  125. <stringProp name="HTTPSampler.protocol"></stringProp>
  126. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  127. <stringProp name="HTTPSampler.path">/streams</stringProp>
  128. <stringProp name="HTTPSampler.method">POST</stringProp>
  129. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  130. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  131. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  132. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  133. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  134. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  135. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  136. </HTTPSamplerProxy>
  137. <hashTree>
  138. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  139. <collectionProp name="Asserion.test_strings">
  140. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  141. </collectionProp>
  142. <stringProp name="Assertion.custom_message"></stringProp>
  143. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  144. <boolProp name="Assertion.assume_success">true</boolProp>
  145. <intProp name="Assertion.test_type">16</intProp>
  146. </ResponseAssertion>
  147. <hashTree/>
  148. </hashTree>
  149. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule" enabled="true">
  150. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  151. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  152. <collectionProp name="Arguments.arguments">
  153. <elementProp name="" elementType="HTTPArgument">
  154. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  155. <stringProp name="Argument.value">{&#xd;
  156. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  157. &quot;sql&quot;: &quot;SELECT Temperature as temperature, Humidity as humidity, raw, meta(id) AS eid, meta(Temperature-&gt;origin) AS torigin, meta(Humidity-&gt;deviceName) AS hdevice, meta(raw-&gt;mediaType) as rawMedia FROM demo WHERE meta(deviceName)=\&quot;demo2\&quot;&quot;,&#xd;
  158. &quot;actions&quot;: [&#xd;
  159. {&#xd;
  160. &quot;mqtt&quot;: {&#xd;
  161. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  162. &quot;topic&quot;: &quot;devices/result&quot;,&#xd;
  163. &quot;qos&quot;: 1,&#xd;
  164. &quot;clientId&quot;: &quot;demo_001&quot;&#xd;
  165. }&#xd;
  166. }&#xd;
  167. ]&#xd;
  168. }</stringProp>
  169. <stringProp name="Argument.metadata">=</stringProp>
  170. </elementProp>
  171. </collectionProp>
  172. </elementProp>
  173. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  174. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  175. <stringProp name="HTTPSampler.protocol"></stringProp>
  176. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  177. <stringProp name="HTTPSampler.path">/rules</stringProp>
  178. <stringProp name="HTTPSampler.method">POST</stringProp>
  179. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  180. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  181. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  182. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  183. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  184. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  185. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  186. </HTTPSamplerProxy>
  187. <hashTree>
  188. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  189. <collectionProp name="Asserion.test_strings">
  190. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  191. </collectionProp>
  192. <stringProp name="Assertion.custom_message"></stringProp>
  193. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  194. <boolProp name="Assertion.assume_success">true</boolProp>
  195. <intProp name="Assertion.test_type">16</intProp>
  196. </ResponseAssertion>
  197. <hashTree/>
  198. </hashTree>
  199. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  200. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  201. <collectionProp name="Arguments.arguments"/>
  202. </elementProp>
  203. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  204. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  205. <stringProp name="HTTPSampler.protocol"></stringProp>
  206. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  207. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  208. <stringProp name="HTTPSampler.method">GET</stringProp>
  209. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  210. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  211. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  212. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  213. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  214. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  215. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  216. </HTTPSamplerProxy>
  217. <hashTree>
  218. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  219. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  220. <stringProp name="EXPECTED_VALUE">0</stringProp>
  221. <boolProp name="JSONVALIDATION">true</boolProp>
  222. <boolProp name="EXPECT_NULL">false</boolProp>
  223. <boolProp name="INVERT">false</boolProp>
  224. <boolProp name="ISREGEX">false</boolProp>
  225. </JSONPathAssertion>
  226. <hashTree/>
  227. </hashTree>
  228. <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="OS Process Sampler" enabled="true">
  229. <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
  230. <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
  231. <stringProp name="SystemSampler.command">test/edgex/pub</stringProp>
  232. <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  233. <collectionProp name="Arguments.arguments">
  234. <elementProp name="" elementType="Argument">
  235. <stringProp name="Argument.name"></stringProp>
  236. <stringProp name="Argument.value">meta</stringProp>
  237. <stringProp name="Argument.metadata">=</stringProp>
  238. </elementProp>
  239. </collectionProp>
  240. </elementProp>
  241. <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  242. <collectionProp name="Arguments.arguments"/>
  243. </elementProp>
  244. <stringProp name="SystemSampler.directory">${__property(fvt,,)}</stringProp>
  245. </SystemSampler>
  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_demo_0_records_in_total</stringProp>
  268. <stringProp name="EXPECTED_VALUE">2</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. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  276. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  277. <stringProp name="EXPECTED_VALUE">6</stringProp>
  278. <boolProp name="JSONVALIDATION">true</boolProp>
  279. <boolProp name="EXPECT_NULL">false</boolProp>
  280. <boolProp name="INVERT">false</boolProp>
  281. <boolProp name="ISREGEX">false</boolProp>
  282. </JSONPathAssertion>
  283. <hashTree/>
  284. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  285. <stringProp name="ConstantTimer.delay">2000</stringProp>
  286. </ConstantTimer>
  287. <hashTree/>
  288. </hashTree>
  289. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  290. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  291. <collectionProp name="Arguments.arguments"/>
  292. </elementProp>
  293. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  294. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  295. <stringProp name="HTTPSampler.protocol"></stringProp>
  296. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  297. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  298. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  299. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  300. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  301. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  302. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  303. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  304. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  305. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  306. </HTTPSamplerProxy>
  307. <hashTree>
  308. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  309. <collectionProp name="Asserion.test_strings">
  310. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  311. </collectionProp>
  312. <stringProp name="Assertion.custom_message"></stringProp>
  313. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  314. <boolProp name="Assertion.assume_success">false</boolProp>
  315. <intProp name="Assertion.test_type">16</intProp>
  316. </ResponseAssertion>
  317. <hashTree/>
  318. </hashTree>
  319. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  320. <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  321. <collectionProp name="Arguments.arguments"/>
  322. </elementProp>
  323. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  324. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  325. <stringProp name="HTTPSampler.protocol"></stringProp>
  326. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  327. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  328. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  329. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  330. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  331. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  332. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  333. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  334. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  335. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  336. </HTTPSamplerProxy>
  337. <hashTree>
  338. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  339. <collectionProp name="Asserion.test_strings">
  340. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  341. </collectionProp>
  342. <stringProp name="Assertion.custom_message"></stringProp>
  343. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  344. <boolProp name="Assertion.assume_success">false</boolProp>
  345. <intProp name="Assertion.test_type">16</intProp>
  346. </ResponseAssertion>
  347. <hashTree/>
  348. </hashTree>
  349. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  350. <stringProp name="ConstantTimer.delay">500</stringProp>
  351. </ConstantTimer>
  352. <hashTree/>
  353. </hashTree>
  354. </hashTree>
  355. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  356. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  357. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  358. <boolProp name="LoopController.continue_forever">false</boolProp>
  359. <stringProp name="LoopController.loops">1</stringProp>
  360. </elementProp>
  361. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  362. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  363. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  364. <stringProp name="ThreadGroup.duration"></stringProp>
  365. <stringProp name="ThreadGroup.delay"></stringProp>
  366. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  367. </ThreadGroup>
  368. <hashTree>
  369. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  370. <boolProp name="ResultCollector.error_logging">false</boolProp>
  371. <objProp>
  372. <name>saveConfig</name>
  373. <value class="SampleSaveConfiguration">
  374. <time>true</time>
  375. <latency>true</latency>
  376. <timestamp>true</timestamp>
  377. <success>true</success>
  378. <label>true</label>
  379. <code>true</code>
  380. <message>true</message>
  381. <threadName>true</threadName>
  382. <dataType>true</dataType>
  383. <encoding>false</encoding>
  384. <assertions>true</assertions>
  385. <subresults>true</subresults>
  386. <responseData>false</responseData>
  387. <samplerData>false</samplerData>
  388. <xml>false</xml>
  389. <fieldNames>true</fieldNames>
  390. <responseHeaders>false</responseHeaders>
  391. <requestHeaders>false</requestHeaders>
  392. <responseDataOnError>false</responseDataOnError>
  393. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  394. <assertionsResultsToSave>0</assertionsResultsToSave>
  395. <bytes>true</bytes>
  396. <sentBytes>true</sentBytes>
  397. <threadCounts>true</threadCounts>
  398. <idleTime>true</idleTime>
  399. <connectTime>true</connectTime>
  400. </value>
  401. </objProp>
  402. <stringProp name="filename"></stringProp>
  403. </ResultCollector>
  404. <hashTree/>
  405. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  406. <hashTree>
  407. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  408. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  409. <stringProp name="mqtt.port">1883</stringProp>
  410. <stringProp name="mqtt.version">3.1</stringProp>
  411. <stringProp name="mqtt.conn_timeout">10</stringProp>
  412. <boolProp name="mqtt.private_protocol">false</boolProp>
  413. <stringProp name="mqtt.listener_timeout">10</stringProp>
  414. <stringProp name="mqtt.protocol">TCP</stringProp>
  415. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  416. <stringProp name="mqtt.keystore_file_path"></stringProp>
  417. <stringProp name="mqtt.keystore_password"></stringProp>
  418. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  419. <stringProp name="mqtt.clientcert_password"></stringProp>
  420. <stringProp name="mqtt.user_name"></stringProp>
  421. <stringProp name="mqtt.password"></stringProp>
  422. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  423. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  424. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  425. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  426. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  427. <stringProp name="mqtt.ws_path"></stringProp>
  428. <boolProp name="mqtt.conn_clean_session">true</boolProp>
  429. </net.xmeter.samplers.ConnectSampler>
  430. <hashTree/>
  431. </hashTree>
  432. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  433. <stringProp name="mqtt.topic_name">devices/result</stringProp>
  434. <stringProp name="mqtt.qos_level">0</stringProp>
  435. <boolProp name="mqtt.add_timestamp">false</boolProp>
  436. <boolProp name="mqtt.debug_response">true</boolProp>
  437. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  438. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  439. </net.xmeter.samplers.SubSampler>
  440. <hashTree>
  441. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="temperature Assertion" enabled="true">
  442. <stringProp name="JSON_PATH">$[0].temperature</stringProp>
  443. <stringProp name="EXPECTED_VALUE">16</stringProp>
  444. <boolProp name="JSONVALIDATION">true</boolProp>
  445. <boolProp name="EXPECT_NULL">false</boolProp>
  446. <boolProp name="INVERT">false</boolProp>
  447. <boolProp name="ISREGEX">false</boolProp>
  448. </JSONPathAssertion>
  449. <hashTree/>
  450. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="humidity Assertion" enabled="true">
  451. <stringProp name="JSON_PATH">$[0].humidity</stringProp>
  452. <stringProp name="EXPECTED_VALUE">16</stringProp>
  453. <boolProp name="JSONVALIDATION">true</boolProp>
  454. <boolProp name="EXPECT_NULL">false</boolProp>
  455. <boolProp name="INVERT">false</boolProp>
  456. <boolProp name="ISREGEX">false</boolProp>
  457. </JSONPathAssertion>
  458. <hashTree/>
  459. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="raw Assertion" enabled="true">
  460. <stringProp name="JSON_PATH">$[0].raw</stringProp>
  461. <stringProp name="EXPECTED_VALUE">SGVsbG8gV29ybGQ=</stringProp>
  462. <boolProp name="JSONVALIDATION">true</boolProp>
  463. <boolProp name="EXPECT_NULL">false</boolProp>
  464. <boolProp name="INVERT">false</boolProp>
  465. <boolProp name="ISREGEX">false</boolProp>
  466. </JSONPathAssertion>
  467. <hashTree/>
  468. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="name Assertion" enabled="true">
  469. <stringProp name="JSON_PATH">$[0].hdevice</stringProp>
  470. <stringProp name="EXPECTED_VALUE">Humidity sensor</stringProp>
  471. <boolProp name="JSONVALIDATION">true</boolProp>
  472. <boolProp name="EXPECT_NULL">false</boolProp>
  473. <boolProp name="INVERT">false</boolProp>
  474. <boolProp name="ISREGEX">false</boolProp>
  475. </JSONPathAssertion>
  476. <hashTree/>
  477. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="torigin Assertion" enabled="true">
  478. <stringProp name="JSON_PATH">$[0].torigin</stringProp>
  479. <stringProp name="EXPECTED_VALUE">48</stringProp>
  480. <boolProp name="JSONVALIDATION">true</boolProp>
  481. <boolProp name="EXPECT_NULL">false</boolProp>
  482. <boolProp name="INVERT">false</boolProp>
  483. <boolProp name="ISREGEX">false</boolProp>
  484. </JSONPathAssertion>
  485. <hashTree/>
  486. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="rawMedia Assertion" enabled="true">
  487. <stringProp name="JSON_PATH">$[0].rawMedia</stringProp>
  488. <stringProp name="EXPECTED_VALUE">application/text</stringProp>
  489. <boolProp name="JSONVALIDATION">true</boolProp>
  490. <boolProp name="EXPECT_NULL">false</boolProp>
  491. <boolProp name="INVERT">false</boolProp>
  492. <boolProp name="ISREGEX">false</boolProp>
  493. </JSONPathAssertion>
  494. <hashTree/>
  495. </hashTree>
  496. </hashTree>
  497. </hashTree>
  498. </hashTree>
  499. </jmeterTestPlan>