edgex_mqtt_sink_rule.jmx 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  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="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. </ThreadGroup>
  67. <hashTree>
  68. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  69. <boolProp name="ResultCollector.error_logging">false</boolProp>
  70. <objProp>
  71. <name>saveConfig</name>
  72. <value class="SampleSaveConfiguration">
  73. <time>true</time>
  74. <latency>true</latency>
  75. <timestamp>true</timestamp>
  76. <success>true</success>
  77. <label>true</label>
  78. <code>true</code>
  79. <message>true</message>
  80. <threadName>true</threadName>
  81. <dataType>true</dataType>
  82. <encoding>false</encoding>
  83. <assertions>true</assertions>
  84. <subresults>true</subresults>
  85. <responseData>false</responseData>
  86. <samplerData>false</samplerData>
  87. <xml>false</xml>
  88. <fieldNames>true</fieldNames>
  89. <responseHeaders>false</responseHeaders>
  90. <requestHeaders>false</requestHeaders>
  91. <responseDataOnError>false</responseDataOnError>
  92. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  93. <assertionsResultsToSave>0</assertionsResultsToSave>
  94. <bytes>true</bytes>
  95. <sentBytes>true</sentBytes>
  96. <threadCounts>true</threadCounts>
  97. <idleTime>true</idleTime>
  98. <connectTime>true</connectTime>
  99. </value>
  100. </objProp>
  101. <stringProp name="filename"></stringProp>
  102. </ResultCollector>
  103. <hashTree/>
  104. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Rule" enabled="true">
  105. <boolProp name="TransactionController.includeTimers">false</boolProp>
  106. <boolProp name="TransactionController.parent">false</boolProp>
  107. </TransactionController>
  108. <hashTree>
  109. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStream" enabled="true">
  110. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  111. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  112. <collectionProp name="Arguments.arguments">
  113. <elementProp name="" elementType="HTTPArgument">
  114. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  115. <stringProp name="Argument.value">{&#xd;
  116. &quot;sql&quot; : &quot;create stream demo () WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;edgex\&quot; Conf_key=\&quot;mqtt_conf\&quot;)&quot;&#xd;
  117. }</stringProp>
  118. <stringProp name="Argument.metadata">=</stringProp>
  119. </elementProp>
  120. </collectionProp>
  121. </elementProp>
  122. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  123. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  124. <stringProp name="HTTPSampler.protocol"></stringProp>
  125. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  126. <stringProp name="HTTPSampler.path">/streams</stringProp>
  127. <stringProp name="HTTPSampler.method">POST</stringProp>
  128. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  129. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  130. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  131. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  132. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  133. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  134. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  135. </HTTPSamplerProxy>
  136. <hashTree>
  137. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  138. <collectionProp name="Asserion.test_strings">
  139. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  140. </collectionProp>
  141. <stringProp name="Assertion.custom_message"></stringProp>
  142. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  143. <boolProp name="Assertion.assume_success">true</boolProp>
  144. <intProp name="Assertion.test_type">16</intProp>
  145. </ResponseAssertion>
  146. <hashTree/>
  147. </hashTree>
  148. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule" enabled="true">
  149. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  150. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  151. <collectionProp name="Arguments.arguments">
  152. <elementProp name="" elementType="HTTPArgument">
  153. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  154. <stringProp name="Argument.value">{&#xd;
  155. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  156. &quot;sql&quot;: &quot;SELECT meta(*) AS edgex_meta, temperature, humidity, humidity*2 as h1 FROM demo WHERE temperature = 20&quot;,&#xd;
  157. &quot;actions&quot;: [&#xd;
  158. {&#xd;
  159. &quot;edgex&quot;: {&#xd;
  160. &quot;protocol&quot;: &quot;tcp&quot;,&#xd;
  161. &quot;host&quot;: &quot;${mqtt_srv}&quot;,&#xd;
  162. &quot;port&quot;: 1883,&#xd;
  163. &quot;topic&quot;: &quot;result&quot;,&#xd;
  164. &quot;type&quot;: &quot;mqtt&quot;,&#xd;
  165. &quot;metadata&quot;: &quot;edgex_meta&quot;,&#xd;
  166. &quot;contentType&quot;: &quot;application/json&quot;,&#xd;
  167. &quot;messageType&quot;: &quot;request&quot;,&#xd;
  168. &quot;optional&quot;: {&#xd;
  169. &quot;ClientId&quot;: &quot;edgex_message_bus_001&quot;&#xd;
  170. }&#xd;
  171. }&#xd;
  172. },&#xd;
  173. {&#xd;
  174. &quot;log&quot;:{}&#xd;
  175. }&#xd;
  176. ]&#xd;
  177. }</stringProp>
  178. <stringProp name="Argument.metadata">=</stringProp>
  179. </elementProp>
  180. </collectionProp>
  181. </elementProp>
  182. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  183. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  184. <stringProp name="HTTPSampler.protocol"></stringProp>
  185. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  186. <stringProp name="HTTPSampler.path">/rules</stringProp>
  187. <stringProp name="HTTPSampler.method">POST</stringProp>
  188. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  189. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  190. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  191. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  192. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  193. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  194. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  195. </HTTPSamplerProxy>
  196. <hashTree>
  197. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  198. <collectionProp name="Asserion.test_strings">
  199. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  200. </collectionProp>
  201. <stringProp name="Assertion.custom_message"></stringProp>
  202. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  203. <boolProp name="Assertion.assume_success">true</boolProp>
  204. <intProp name="Assertion.test_type">16</intProp>
  205. </ResponseAssertion>
  206. <hashTree/>
  207. </hashTree>
  208. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  209. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  210. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  211. <collectionProp name="Arguments.arguments">
  212. <elementProp name="" elementType="HTTPArgument">
  213. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  214. <stringProp name="Argument.value"></stringProp>
  215. <stringProp name="Argument.metadata">=</stringProp>
  216. </elementProp>
  217. </collectionProp>
  218. </elementProp>
  219. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  220. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  221. <stringProp name="HTTPSampler.protocol"></stringProp>
  222. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  223. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  224. <stringProp name="HTTPSampler.method">GET</stringProp>
  225. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  226. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  227. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  228. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  229. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  230. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  231. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  232. </HTTPSamplerProxy>
  233. <hashTree>
  234. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  235. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  236. <stringProp name="EXPECTED_VALUE">0</stringProp>
  237. <boolProp name="JSONVALIDATION">true</boolProp>
  238. <boolProp name="EXPECT_NULL">false</boolProp>
  239. <boolProp name="INVERT">false</boolProp>
  240. <boolProp name="ISREGEX">false</boolProp>
  241. </JSONPathAssertion>
  242. <hashTree/>
  243. </hashTree>
  244. <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="OS Process Sampler" enabled="true">
  245. <boolProp name="SystemSampler.checkReturnCode">false</boolProp>
  246. <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
  247. <stringProp name="SystemSampler.command">test/edgex/pub</stringProp>
  248. <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  249. <collectionProp name="Arguments.arguments">
  250. <elementProp name="" elementType="Argument">
  251. <stringProp name="Argument.name"></stringProp>
  252. <stringProp name="Argument.value">mqtt</stringProp>
  253. <stringProp name="Argument.metadata">=</stringProp>
  254. </elementProp>
  255. <elementProp name="" elementType="Argument">
  256. <stringProp name="Argument.name"></stringProp>
  257. <stringProp name="Argument.value">${mqtt_srv}</stringProp>
  258. <stringProp name="Argument.metadata">=</stringProp>
  259. </elementProp>
  260. </collectionProp>
  261. </elementProp>
  262. <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  263. <collectionProp name="Arguments.arguments"/>
  264. </elementProp>
  265. <stringProp name="SystemSampler.directory">${__property(fvt,,)}</stringProp>
  266. </SystemSampler>
  267. <hashTree/>
  268. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  269. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  270. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  271. <collectionProp name="Arguments.arguments">
  272. <elementProp name="" elementType="HTTPArgument">
  273. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  274. <stringProp name="Argument.value"></stringProp>
  275. <stringProp name="Argument.metadata">=</stringProp>
  276. </elementProp>
  277. </collectionProp>
  278. </elementProp>
  279. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  280. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  281. <stringProp name="HTTPSampler.protocol"></stringProp>
  282. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  283. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  284. <stringProp name="HTTPSampler.method">GET</stringProp>
  285. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  286. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  287. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  288. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  289. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  290. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  291. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  292. </HTTPSamplerProxy>
  293. <hashTree>
  294. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  295. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  296. <stringProp name="EXPECTED_VALUE">1</stringProp>
  297. <boolProp name="JSONVALIDATION">true</boolProp>
  298. <boolProp name="EXPECT_NULL">false</boolProp>
  299. <boolProp name="INVERT">false</boolProp>
  300. <boolProp name="ISREGEX">false</boolProp>
  301. </JSONPathAssertion>
  302. <hashTree/>
  303. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
  304. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  305. <stringProp name="EXPECTED_VALUE">6</stringProp>
  306. <boolProp name="JSONVALIDATION">true</boolProp>
  307. <boolProp name="EXPECT_NULL">false</boolProp>
  308. <boolProp name="INVERT">false</boolProp>
  309. <boolProp name="ISREGEX">false</boolProp>
  310. </JSONPathAssertion>
  311. <hashTree/>
  312. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  313. <stringProp name="ConstantTimer.delay">5000</stringProp>
  314. </ConstantTimer>
  315. <hashTree/>
  316. </hashTree>
  317. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  318. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  319. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  320. <collectionProp name="Arguments.arguments">
  321. <elementProp name="" elementType="HTTPArgument">
  322. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  323. <stringProp name="Argument.value"></stringProp>
  324. <stringProp name="Argument.metadata">=</stringProp>
  325. </elementProp>
  326. </collectionProp>
  327. </elementProp>
  328. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  329. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  330. <stringProp name="HTTPSampler.protocol"></stringProp>
  331. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  332. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  333. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  334. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  335. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  336. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  337. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  338. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  339. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  340. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  341. </HTTPSamplerProxy>
  342. <hashTree>
  343. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  344. <collectionProp name="Asserion.test_strings">
  345. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  346. </collectionProp>
  347. <stringProp name="Assertion.custom_message"></stringProp>
  348. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  349. <boolProp name="Assertion.assume_success">false</boolProp>
  350. <intProp name="Assertion.test_type">16</intProp>
  351. </ResponseAssertion>
  352. <hashTree/>
  353. </hashTree>
  354. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  355. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  356. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  357. <collectionProp name="Arguments.arguments">
  358. <elementProp name="" elementType="HTTPArgument">
  359. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  360. <stringProp name="Argument.value"></stringProp>
  361. <stringProp name="Argument.metadata">=</stringProp>
  362. </elementProp>
  363. </collectionProp>
  364. </elementProp>
  365. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  366. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  367. <stringProp name="HTTPSampler.protocol"></stringProp>
  368. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  369. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  370. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  371. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  372. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  373. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  374. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  375. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  376. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  377. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  378. </HTTPSamplerProxy>
  379. <hashTree>
  380. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  381. <collectionProp name="Asserion.test_strings">
  382. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  383. </collectionProp>
  384. <stringProp name="Assertion.custom_message"></stringProp>
  385. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  386. <boolProp name="Assertion.assume_success">false</boolProp>
  387. <intProp name="Assertion.test_type">16</intProp>
  388. </ResponseAssertion>
  389. <hashTree/>
  390. </hashTree>
  391. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  392. <stringProp name="ConstantTimer.delay">500</stringProp>
  393. </ConstantTimer>
  394. <hashTree/>
  395. </hashTree>
  396. </hashTree>
  397. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  398. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  399. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  400. <boolProp name="LoopController.continue_forever">false</boolProp>
  401. <stringProp name="LoopController.loops">1</stringProp>
  402. </elementProp>
  403. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  404. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  405. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  406. <stringProp name="ThreadGroup.duration"></stringProp>
  407. <stringProp name="ThreadGroup.delay"></stringProp>
  408. </ThreadGroup>
  409. <hashTree>
  410. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  411. <boolProp name="ResultCollector.error_logging">false</boolProp>
  412. <objProp>
  413. <name>saveConfig</name>
  414. <value class="SampleSaveConfiguration">
  415. <time>true</time>
  416. <latency>true</latency>
  417. <timestamp>true</timestamp>
  418. <success>true</success>
  419. <label>true</label>
  420. <code>true</code>
  421. <message>true</message>
  422. <threadName>true</threadName>
  423. <dataType>true</dataType>
  424. <encoding>false</encoding>
  425. <assertions>true</assertions>
  426. <subresults>true</subresults>
  427. <responseData>false</responseData>
  428. <samplerData>false</samplerData>
  429. <xml>false</xml>
  430. <fieldNames>true</fieldNames>
  431. <responseHeaders>false</responseHeaders>
  432. <requestHeaders>false</requestHeaders>
  433. <responseDataOnError>false</responseDataOnError>
  434. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  435. <assertionsResultsToSave>0</assertionsResultsToSave>
  436. <bytes>true</bytes>
  437. <sentBytes>true</sentBytes>
  438. <threadCounts>true</threadCounts>
  439. <idleTime>true</idleTime>
  440. <connectTime>true</connectTime>
  441. </value>
  442. </objProp>
  443. <stringProp name="filename"></stringProp>
  444. </ResultCollector>
  445. <hashTree/>
  446. <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="OS Process Sampler" enabled="true">
  447. <boolProp name="SystemSampler.checkReturnCode">true</boolProp>
  448. <stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
  449. <stringProp name="SystemSampler.command">test/edgex/sub/sub</stringProp>
  450. <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  451. <collectionProp name="Arguments.arguments">
  452. <elementProp name="" elementType="Argument">
  453. <stringProp name="Argument.name"></stringProp>
  454. <stringProp name="Argument.value">mqtt</stringProp>
  455. <stringProp name="Argument.metadata">=</stringProp>
  456. </elementProp>
  457. <elementProp name="" elementType="Argument">
  458. <stringProp name="Argument.name"></stringProp>
  459. <stringProp name="Argument.value">${mqtt_srv}</stringProp>
  460. <stringProp name="Argument.metadata">=</stringProp>
  461. </elementProp>
  462. </collectionProp>
  463. </elementProp>
  464. <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  465. <collectionProp name="Arguments.arguments"/>
  466. </elementProp>
  467. <stringProp name="SystemSampler.directory">${__property(fvt,,)}</stringProp>
  468. </SystemSampler>
  469. <hashTree>
  470. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="device Assertion" enabled="true">
  471. <stringProp name="JSON_PATH">$.event.deviceName</stringProp>
  472. <stringProp name="EXPECTED_VALUE">demo1</stringProp>
  473. <boolProp name="JSONVALIDATION">true</boolProp>
  474. <boolProp name="EXPECT_NULL">false</boolProp>
  475. <boolProp name="INVERT">false</boolProp>
  476. <boolProp name="ISREGEX">false</boolProp>
  477. </JSONPathAssertion>
  478. <hashTree/>
  479. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="reading_0 Assertion" enabled="true">
  480. <stringProp name="JSON_PATH">$.event.readings[0].value</stringProp>
  481. <stringProp name="EXPECTED_VALUE">30</stringProp>
  482. <boolProp name="JSONVALIDATION">false</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="reading_1 Assertion" enabled="true">
  489. <stringProp name="JSON_PATH">$.event.readings[1].value</stringProp>
  490. <stringProp name="EXPECTED_VALUE">20</stringProp>
  491. <boolProp name="JSONVALIDATION">false</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="reading_2 Assertion" enabled="true">
  498. <stringProp name="JSON_PATH">$.event.readings[2].value</stringProp>
  499. <stringProp name="EXPECTED_VALUE">20</stringProp>
  500. <boolProp name="JSONVALIDATION">false</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. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="temperature name assertion" enabled="true">
  507. <collectionProp name="Asserion.test_strings">
  508. <stringProp name="321701236">temperature</stringProp>
  509. </collectionProp>
  510. <stringProp name="Assertion.custom_message"></stringProp>
  511. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  512. <boolProp name="Assertion.assume_success">false</boolProp>
  513. <intProp name="Assertion.test_type">2</intProp>
  514. </ResponseAssertion>
  515. <hashTree/>
  516. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="humidity name assertion" enabled="true">
  517. <collectionProp name="Asserion.test_strings">
  518. <stringProp name="548027571">humidity</stringProp>
  519. </collectionProp>
  520. <stringProp name="Assertion.custom_message"></stringProp>
  521. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  522. <boolProp name="Assertion.assume_success">false</boolProp>
  523. <intProp name="Assertion.test_type">2</intProp>
  524. </ResponseAssertion>
  525. <hashTree/>
  526. </hashTree>
  527. </hashTree>
  528. </hashTree>
  529. </hashTree>
  530. </jmeterTestPlan>