change_rule_status.jmx 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414">
  3. <hashTree>
  4. <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
  5. <stringProp name="TestPlan.comments"></stringProp>
  6. <boolProp name="TestPlan.functional_mode">false</boolProp>
  7. <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
  8. <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
  9. <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  10. <collectionProp name="Arguments.arguments"/>
  11. </elementProp>
  12. <stringProp name="TestPlan.user_define_classpath"></stringProp>
  13. </TestPlan>
  14. <hashTree>
  15. <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  16. <collectionProp name="Arguments.arguments">
  17. <elementProp name="srv" elementType="Argument">
  18. <stringProp name="Argument.name">srv</stringProp>
  19. <stringProp name="Argument.value">127.0.0.1</stringProp>
  20. <stringProp name="Argument.metadata">=</stringProp>
  21. </elementProp>
  22. <elementProp name="rest_port" elementType="Argument">
  23. <stringProp name="Argument.name">rest_port</stringProp>
  24. <stringProp name="Argument.value">9081</stringProp>
  25. <stringProp name="Argument.metadata">=</stringProp>
  26. </elementProp>
  27. <elementProp name="mqtt_srv" elementType="Argument">
  28. <stringProp name="Argument.name">mqtt_srv</stringProp>
  29. <stringProp name="Argument.value">127.0.0.1</stringProp>
  30. <stringProp name="Argument.metadata">=</stringProp>
  31. </elementProp>
  32. </collectionProp>
  33. </Arguments>
  34. <hashTree/>
  35. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Rules" enabled="true">
  36. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  37. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  38. <boolProp name="LoopController.continue_forever">false</boolProp>
  39. <stringProp name="LoopController.loops">1</stringProp>
  40. </elementProp>
  41. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  42. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  43. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  44. <stringProp name="ThreadGroup.duration"></stringProp>
  45. <stringProp name="ThreadGroup.delay"></stringProp>
  46. </ThreadGroup>
  47. <hashTree>
  48. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  49. <boolProp name="ResultCollector.error_logging">false</boolProp>
  50. <objProp>
  51. <name>saveConfig</name>
  52. <value class="SampleSaveConfiguration">
  53. <time>true</time>
  54. <latency>true</latency>
  55. <timestamp>true</timestamp>
  56. <success>true</success>
  57. <label>true</label>
  58. <code>true</code>
  59. <message>true</message>
  60. <threadName>true</threadName>
  61. <dataType>true</dataType>
  62. <encoding>false</encoding>
  63. <assertions>true</assertions>
  64. <subresults>true</subresults>
  65. <responseData>false</responseData>
  66. <samplerData>false</samplerData>
  67. <xml>false</xml>
  68. <fieldNames>true</fieldNames>
  69. <responseHeaders>false</responseHeaders>
  70. <requestHeaders>false</requestHeaders>
  71. <responseDataOnError>false</responseDataOnError>
  72. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  73. <assertionsResultsToSave>0</assertionsResultsToSave>
  74. <bytes>true</bytes>
  75. <sentBytes>true</sentBytes>
  76. <threadCounts>true</threadCounts>
  77. <idleTime>true</idleTime>
  78. <connectTime>true</connectTime>
  79. </value>
  80. </objProp>
  81. <stringProp name="filename"></stringProp>
  82. </ResultCollector>
  83. <hashTree/>
  84. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  85. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  86. <stringProp name="mqtt.port">1883</stringProp>
  87. <stringProp name="mqtt.version">3.1</stringProp>
  88. <stringProp name="mqtt.conn_timeout">10</stringProp>
  89. <boolProp name="mqtt.private_protocol">false</boolProp>
  90. <stringProp name="mqtt.listener_timeout">10</stringProp>
  91. <stringProp name="mqtt.protocol">TCP</stringProp>
  92. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  93. <stringProp name="mqtt.keystore_file_path"></stringProp>
  94. <stringProp name="mqtt.keystore_password"></stringProp>
  95. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  96. <stringProp name="mqtt.clientcert_password"></stringProp>
  97. <stringProp name="mqtt.user_name"></stringProp>
  98. <stringProp name="mqtt.password"></stringProp>
  99. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  100. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  101. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  102. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  103. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  104. </net.xmeter.samplers.ConnectSampler>
  105. <hashTree/>
  106. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="CreateStreamAndRule" enabled="true">
  107. <boolProp name="TransactionController.includeTimers">false</boolProp>
  108. <boolProp name="TransactionController.parent">false</boolProp>
  109. </TransactionController>
  110. <hashTree>
  111. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateStream" enabled="true">
  112. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  113. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  114. <collectionProp name="Arguments.arguments">
  115. <elementProp name="" elementType="HTTPArgument">
  116. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  117. <stringProp name="Argument.value">{&#xd;
  118. &quot;sql&quot; : &quot;create stream demo (temperature float, humidity bigint) WITH (FORMAT=\&quot;JSON\&quot;, DATASOURCE=\&quot;devices/+/messages\&quot; )&quot;&#xd;
  119. }</stringProp>
  120. <stringProp name="Argument.metadata">=</stringProp>
  121. </elementProp>
  122. </collectionProp>
  123. </elementProp>
  124. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  125. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  126. <stringProp name="HTTPSampler.protocol"></stringProp>
  127. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  128. <stringProp name="HTTPSampler.path">/streams</stringProp>
  129. <stringProp name="HTTPSampler.method">POST</stringProp>
  130. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  131. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  132. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  133. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  134. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  135. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  136. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  137. </HTTPSamplerProxy>
  138. <hashTree>
  139. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  140. <collectionProp name="Asserion.test_strings">
  141. <stringProp name="-1754954177">Stream demo is created.</stringProp>
  142. </collectionProp>
  143. <stringProp name="Assertion.custom_message"></stringProp>
  144. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  145. <boolProp name="Assertion.assume_success">true</boolProp>
  146. <intProp name="Assertion.test_type">16</intProp>
  147. </ResponseAssertion>
  148. <hashTree/>
  149. </hashTree>
  150. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_CreateRule" enabled="true">
  151. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  152. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  153. <collectionProp name="Arguments.arguments">
  154. <elementProp name="" elementType="HTTPArgument">
  155. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  156. <stringProp name="Argument.value">{&#xd;
  157. &quot;id&quot;: &quot;rule1&quot;,&#xd;
  158. &quot;sql&quot;: &quot;SELECT * FROM demo&quot;,&#xd;
  159. &quot;actions&quot;: [&#xd;
  160. {&#xd;
  161. &quot;mqtt&quot;: {&#xd;
  162. &quot;server&quot;: &quot;tcp://${mqtt_srv}:1883&quot;,&#xd;
  163. &quot;topic&quot;: &quot;devices/result&quot;,&#xd;
  164. &quot;qos&quot;: 1,&#xd;
  165. &quot;clientId&quot;: &quot;demo_001&quot;&#xd;
  166. }&#xd;
  167. }&#xd;
  168. ]&#xd;
  169. }</stringProp>
  170. <stringProp name="Argument.metadata">=</stringProp>
  171. </elementProp>
  172. </collectionProp>
  173. </elementProp>
  174. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  175. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  176. <stringProp name="HTTPSampler.protocol"></stringProp>
  177. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  178. <stringProp name="HTTPSampler.path">/rules</stringProp>
  179. <stringProp name="HTTPSampler.method">POST</stringProp>
  180. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  181. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  182. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  183. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  184. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  185. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  186. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  187. </HTTPSamplerProxy>
  188. <hashTree>
  189. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  190. <collectionProp name="Asserion.test_strings">
  191. <stringProp name="-2022196798">Rule rule1 was created</stringProp>
  192. </collectionProp>
  193. <stringProp name="Assertion.custom_message"></stringProp>
  194. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  195. <boolProp name="Assertion.assume_success">true</boolProp>
  196. <intProp name="Assertion.test_type">16</intProp>
  197. </ResponseAssertion>
  198. <hashTree/>
  199. </hashTree>
  200. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StartRuleAlreadyStarted" enabled="true">
  201. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  202. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  203. <collectionProp name="Arguments.arguments">
  204. <elementProp name="" elementType="HTTPArgument">
  205. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  206. <stringProp name="Argument.value"></stringProp>
  207. <stringProp name="Argument.metadata">=</stringProp>
  208. </elementProp>
  209. </collectionProp>
  210. </elementProp>
  211. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  212. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  213. <stringProp name="HTTPSampler.protocol"></stringProp>
  214. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  215. <stringProp name="HTTPSampler.path">/rules/rule1/start</stringProp>
  216. <stringProp name="HTTPSampler.method">POST</stringProp>
  217. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  218. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  219. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  220. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  221. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  222. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  223. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  224. </HTTPSamplerProxy>
  225. <hashTree>
  226. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  227. <collectionProp name="Asserion.test_strings">
  228. <stringProp name="-652969125">Rule rule1 was started</stringProp>
  229. </collectionProp>
  230. <stringProp name="Assertion.custom_message"></stringProp>
  231. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  232. <boolProp name="Assertion.assume_success">true</boolProp>
  233. <intProp name="Assertion.test_type">16</intProp>
  234. </ResponseAssertion>
  235. <hashTree/>
  236. </hashTree>
  237. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  238. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  239. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  240. <collectionProp name="Arguments.arguments">
  241. <elementProp name="" elementType="HTTPArgument">
  242. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  243. <stringProp name="Argument.value"></stringProp>
  244. <stringProp name="Argument.metadata">=</stringProp>
  245. </elementProp>
  246. </collectionProp>
  247. </elementProp>
  248. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  249. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  250. <stringProp name="HTTPSampler.protocol"></stringProp>
  251. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  252. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  253. <stringProp name="HTTPSampler.method">GET</stringProp>
  254. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  255. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  256. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  257. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  258. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  259. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  260. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  261. </HTTPSamplerProxy>
  262. <hashTree>
  263. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  264. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  265. <stringProp name="EXPECTED_VALUE">0</stringProp>
  266. <boolProp name="JSONVALIDATION">true</boolProp>
  267. <boolProp name="EXPECT_NULL">false</boolProp>
  268. <boolProp name="INVERT">false</boolProp>
  269. <boolProp name="ISREGEX">false</boolProp>
  270. </JSONPathAssertion>
  271. <hashTree/>
  272. </hashTree>
  273. </hashTree>
  274. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="RunPubStopRule" enabled="true">
  275. <boolProp name="TransactionController.includeTimers">false</boolProp>
  276. <boolProp name="TransactionController.parent">false</boolProp>
  277. </TransactionController>
  278. <hashTree>
  279. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_1" enabled="true">
  280. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  281. <stringProp name="mqtt.qos_level">0</stringProp>
  282. <boolProp name="mqtt.add_timestamp">false</boolProp>
  283. <stringProp name="mqtt.message_type">String</stringProp>
  284. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  285. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,50,)}, &quot;humidity&quot; : ${__Random(1,80,)}}</stringProp>
  286. </net.xmeter.samplers.PubSampler>
  287. <hashTree/>
  288. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  289. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  290. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  291. <collectionProp name="Arguments.arguments">
  292. <elementProp name="" elementType="HTTPArgument">
  293. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  294. <stringProp name="Argument.value"></stringProp>
  295. <stringProp name="Argument.metadata">=</stringProp>
  296. </elementProp>
  297. </collectionProp>
  298. </elementProp>
  299. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  300. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  301. <stringProp name="HTTPSampler.protocol"></stringProp>
  302. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  303. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  304. <stringProp name="HTTPSampler.method">GET</stringProp>
  305. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  306. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  307. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  308. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  309. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  310. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  311. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  312. </HTTPSamplerProxy>
  313. <hashTree>
  314. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  315. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  316. <stringProp name="EXPECTED_VALUE">1</stringProp>
  317. <boolProp name="JSONVALIDATION">true</boolProp>
  318. <boolProp name="EXPECT_NULL">false</boolProp>
  319. <boolProp name="INVERT">false</boolProp>
  320. <boolProp name="ISREGEX">false</boolProp>
  321. </JSONPathAssertion>
  322. <hashTree/>
  323. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  324. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  325. <stringProp name="EXPECTED_VALUE">1</stringProp>
  326. <boolProp name="JSONVALIDATION">true</boolProp>
  327. <boolProp name="EXPECT_NULL">false</boolProp>
  328. <boolProp name="INVERT">false</boolProp>
  329. <boolProp name="ISREGEX">false</boolProp>
  330. </JSONPathAssertion>
  331. <hashTree/>
  332. </hashTree>
  333. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StopRule" enabled="true">
  334. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  335. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  336. <collectionProp name="Arguments.arguments">
  337. <elementProp name="" elementType="HTTPArgument">
  338. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  339. <stringProp name="Argument.value"></stringProp>
  340. <stringProp name="Argument.metadata">=</stringProp>
  341. </elementProp>
  342. </collectionProp>
  343. </elementProp>
  344. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  345. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  346. <stringProp name="HTTPSampler.protocol"></stringProp>
  347. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  348. <stringProp name="HTTPSampler.path">/rules/rule1/stop</stringProp>
  349. <stringProp name="HTTPSampler.method">POST</stringProp>
  350. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  351. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  352. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  353. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  354. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  355. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  356. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  357. </HTTPSamplerProxy>
  358. <hashTree>
  359. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  360. <collectionProp name="Asserion.test_strings">
  361. <stringProp name="1631635559">Rule rule1 was stopped.</stringProp>
  362. </collectionProp>
  363. <stringProp name="Assertion.custom_message"></stringProp>
  364. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  365. <boolProp name="Assertion.assume_success">true</boolProp>
  366. <intProp name="Assertion.test_type">16</intProp>
  367. </ResponseAssertion>
  368. <hashTree/>
  369. </hashTree>
  370. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  371. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  372. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  373. <collectionProp name="Arguments.arguments">
  374. <elementProp name="" elementType="HTTPArgument">
  375. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  376. <stringProp name="Argument.value"></stringProp>
  377. <stringProp name="Argument.metadata">=</stringProp>
  378. </elementProp>
  379. </collectionProp>
  380. </elementProp>
  381. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  382. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  383. <stringProp name="HTTPSampler.protocol"></stringProp>
  384. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  385. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  386. <stringProp name="HTTPSampler.method">GET</stringProp>
  387. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  388. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  389. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  390. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  391. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  392. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  393. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  394. </HTTPSamplerProxy>
  395. <hashTree>
  396. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  397. <collectionProp name="Asserion.test_strings">
  398. <stringProp name="1607612103">Stopped: canceled manually or by error.</stringProp>
  399. </collectionProp>
  400. <stringProp name="Assertion.custom_message"></stringProp>
  401. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  402. <boolProp name="Assertion.assume_success">false</boolProp>
  403. <intProp name="Assertion.test_type">16</intProp>
  404. </ResponseAssertion>
  405. <hashTree/>
  406. </hashTree>
  407. </hashTree>
  408. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="StartAndRun" enabled="true">
  409. <boolProp name="TransactionController.includeTimers">false</boolProp>
  410. <boolProp name="TransactionController.parent">false</boolProp>
  411. </TransactionController>
  412. <hashTree>
  413. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StartRule" enabled="true">
  414. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  415. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  416. <collectionProp name="Arguments.arguments">
  417. <elementProp name="" elementType="HTTPArgument">
  418. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  419. <stringProp name="Argument.value"></stringProp>
  420. <stringProp name="Argument.metadata">=</stringProp>
  421. </elementProp>
  422. </collectionProp>
  423. </elementProp>
  424. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  425. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  426. <stringProp name="HTTPSampler.protocol"></stringProp>
  427. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  428. <stringProp name="HTTPSampler.path">/rules/rule1/start</stringProp>
  429. <stringProp name="HTTPSampler.method">POST</stringProp>
  430. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  431. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  432. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  433. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  434. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  435. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  436. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  437. </HTTPSamplerProxy>
  438. <hashTree>
  439. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  440. <collectionProp name="Asserion.test_strings">
  441. <stringProp name="-652969125">Rule rule1 was started</stringProp>
  442. </collectionProp>
  443. <stringProp name="Assertion.custom_message"></stringProp>
  444. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  445. <boolProp name="Assertion.assume_success">true</boolProp>
  446. <intProp name="Assertion.test_type">16</intProp>
  447. </ResponseAssertion>
  448. <hashTree/>
  449. </hashTree>
  450. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_2" enabled="true">
  451. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  452. <stringProp name="mqtt.qos_level">0</stringProp>
  453. <boolProp name="mqtt.add_timestamp">false</boolProp>
  454. <stringProp name="mqtt.message_type">String</stringProp>
  455. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  456. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,50,)}, &quot;humidity&quot; : ${__Random(1,80,)}}</stringProp>
  457. </net.xmeter.samplers.PubSampler>
  458. <hashTree/>
  459. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_3" enabled="true">
  460. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  461. <stringProp name="mqtt.qos_level">0</stringProp>
  462. <boolProp name="mqtt.add_timestamp">false</boolProp>
  463. <stringProp name="mqtt.message_type">String</stringProp>
  464. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  465. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,50,)}, &quot;humidity&quot; : ${__Random(1,80,)}}</stringProp>
  466. </net.xmeter.samplers.PubSampler>
  467. <hashTree/>
  468. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  469. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  470. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  471. <collectionProp name="Arguments.arguments">
  472. <elementProp name="" elementType="HTTPArgument">
  473. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  474. <stringProp name="Argument.value"></stringProp>
  475. <stringProp name="Argument.metadata">=</stringProp>
  476. </elementProp>
  477. </collectionProp>
  478. </elementProp>
  479. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  480. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  481. <stringProp name="HTTPSampler.protocol"></stringProp>
  482. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  483. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  484. <stringProp name="HTTPSampler.method">GET</stringProp>
  485. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  486. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  487. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  488. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  489. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  490. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  491. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  492. </HTTPSamplerProxy>
  493. <hashTree>
  494. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  495. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  496. <stringProp name="EXPECTED_VALUE">2</stringProp>
  497. <boolProp name="JSONVALIDATION">true</boolProp>
  498. <boolProp name="EXPECT_NULL">false</boolProp>
  499. <boolProp name="INVERT">false</boolProp>
  500. <boolProp name="ISREGEX">false</boolProp>
  501. </JSONPathAssertion>
  502. <hashTree/>
  503. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  504. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  505. <stringProp name="EXPECTED_VALUE">2</stringProp>
  506. <boolProp name="JSONVALIDATION">true</boolProp>
  507. <boolProp name="EXPECT_NULL">false</boolProp>
  508. <boolProp name="INVERT">false</boolProp>
  509. <boolProp name="ISREGEX">false</boolProp>
  510. </JSONPathAssertion>
  511. <hashTree/>
  512. </hashTree>
  513. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StopRule" enabled="true">
  514. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  515. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  516. <collectionProp name="Arguments.arguments">
  517. <elementProp name="" elementType="HTTPArgument">
  518. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  519. <stringProp name="Argument.value"></stringProp>
  520. <stringProp name="Argument.metadata">=</stringProp>
  521. </elementProp>
  522. </collectionProp>
  523. </elementProp>
  524. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  525. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  526. <stringProp name="HTTPSampler.protocol"></stringProp>
  527. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  528. <stringProp name="HTTPSampler.path">/rules/rule1/stop</stringProp>
  529. <stringProp name="HTTPSampler.method">POST</stringProp>
  530. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  531. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  532. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  533. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  534. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  535. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  536. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  537. </HTTPSamplerProxy>
  538. <hashTree>
  539. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  540. <collectionProp name="Asserion.test_strings">
  541. <stringProp name="1631635559">Rule rule1 was stopped.</stringProp>
  542. </collectionProp>
  543. <stringProp name="Assertion.custom_message"></stringProp>
  544. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  545. <boolProp name="Assertion.assume_success">true</boolProp>
  546. <intProp name="Assertion.test_type">16</intProp>
  547. </ResponseAssertion>
  548. <hashTree/>
  549. </hashTree>
  550. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  551. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  552. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  553. <collectionProp name="Arguments.arguments">
  554. <elementProp name="" elementType="HTTPArgument">
  555. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  556. <stringProp name="Argument.value"></stringProp>
  557. <stringProp name="Argument.metadata">=</stringProp>
  558. </elementProp>
  559. </collectionProp>
  560. </elementProp>
  561. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  562. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  563. <stringProp name="HTTPSampler.protocol"></stringProp>
  564. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  565. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  566. <stringProp name="HTTPSampler.method">GET</stringProp>
  567. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  568. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  569. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  570. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  571. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  572. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  573. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  574. </HTTPSamplerProxy>
  575. <hashTree>
  576. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  577. <collectionProp name="Asserion.test_strings">
  578. <stringProp name="1607612103">Stopped: canceled manually or by error.</stringProp>
  579. </collectionProp>
  580. <stringProp name="Assertion.custom_message"></stringProp>
  581. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  582. <boolProp name="Assertion.assume_success">false</boolProp>
  583. <intProp name="Assertion.test_type">16</intProp>
  584. </ResponseAssertion>
  585. <hashTree/>
  586. </hashTree>
  587. </hashTree>
  588. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="RestartAndRun" enabled="true">
  589. <boolProp name="TransactionController.includeTimers">false</boolProp>
  590. <boolProp name="TransactionController.parent">false</boolProp>
  591. </TransactionController>
  592. <hashTree>
  593. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StartRule" enabled="true">
  594. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  595. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  596. <collectionProp name="Arguments.arguments">
  597. <elementProp name="" elementType="HTTPArgument">
  598. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  599. <stringProp name="Argument.value"></stringProp>
  600. <stringProp name="Argument.metadata">=</stringProp>
  601. </elementProp>
  602. </collectionProp>
  603. </elementProp>
  604. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  605. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  606. <stringProp name="HTTPSampler.protocol"></stringProp>
  607. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  608. <stringProp name="HTTPSampler.path">/rules/rule1/start</stringProp>
  609. <stringProp name="HTTPSampler.method">POST</stringProp>
  610. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  611. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  612. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  613. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  614. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  615. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  616. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  617. </HTTPSamplerProxy>
  618. <hashTree>
  619. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  620. <collectionProp name="Asserion.test_strings">
  621. <stringProp name="-652969125">Rule rule1 was started</stringProp>
  622. </collectionProp>
  623. <stringProp name="Assertion.custom_message"></stringProp>
  624. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  625. <boolProp name="Assertion.assume_success">true</boolProp>
  626. <intProp name="Assertion.test_type">16</intProp>
  627. </ResponseAssertion>
  628. <hashTree/>
  629. </hashTree>
  630. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_RestartRule" enabled="true">
  631. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  632. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  633. <collectionProp name="Arguments.arguments">
  634. <elementProp name="" elementType="HTTPArgument">
  635. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  636. <stringProp name="Argument.value"></stringProp>
  637. <stringProp name="Argument.metadata">=</stringProp>
  638. </elementProp>
  639. </collectionProp>
  640. </elementProp>
  641. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  642. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  643. <stringProp name="HTTPSampler.protocol"></stringProp>
  644. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  645. <stringProp name="HTTPSampler.path">/rules/rule1/restart</stringProp>
  646. <stringProp name="HTTPSampler.method">POST</stringProp>
  647. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  648. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  649. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  650. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  651. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  652. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  653. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  654. </HTTPSamplerProxy>
  655. <hashTree>
  656. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  657. <collectionProp name="Asserion.test_strings">
  658. <stringProp name="-167686328">Rule rule1 was restarted</stringProp>
  659. </collectionProp>
  660. <stringProp name="Assertion.custom_message"></stringProp>
  661. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  662. <boolProp name="Assertion.assume_success">true</boolProp>
  663. <intProp name="Assertion.test_type">16</intProp>
  664. </ResponseAssertion>
  665. <hashTree/>
  666. </hashTree>
  667. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  668. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  669. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  670. <collectionProp name="Arguments.arguments">
  671. <elementProp name="" elementType="HTTPArgument">
  672. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  673. <stringProp name="Argument.value"></stringProp>
  674. <stringProp name="Argument.metadata">=</stringProp>
  675. </elementProp>
  676. </collectionProp>
  677. </elementProp>
  678. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  679. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  680. <stringProp name="HTTPSampler.protocol"></stringProp>
  681. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  682. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  683. <stringProp name="HTTPSampler.method">GET</stringProp>
  684. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  685. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  686. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  687. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  688. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  689. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  690. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  691. </HTTPSamplerProxy>
  692. <hashTree>
  693. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  694. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  695. <stringProp name="EXPECTED_VALUE">0</stringProp>
  696. <boolProp name="JSONVALIDATION">true</boolProp>
  697. <boolProp name="EXPECT_NULL">false</boolProp>
  698. <boolProp name="INVERT">false</boolProp>
  699. <boolProp name="ISREGEX">false</boolProp>
  700. </JSONPathAssertion>
  701. <hashTree/>
  702. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  703. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  704. <stringProp name="EXPECTED_VALUE">0</stringProp>
  705. <boolProp name="JSONVALIDATION">true</boolProp>
  706. <boolProp name="EXPECT_NULL">false</boolProp>
  707. <boolProp name="INVERT">false</boolProp>
  708. <boolProp name="ISREGEX">false</boolProp>
  709. </JSONPathAssertion>
  710. <hashTree/>
  711. </hashTree>
  712. <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT_Pub_4" enabled="true">
  713. <stringProp name="mqtt.topic_name">devices/${device_id}/messages</stringProp>
  714. <stringProp name="mqtt.qos_level">0</stringProp>
  715. <boolProp name="mqtt.add_timestamp">false</boolProp>
  716. <stringProp name="mqtt.message_type">String</stringProp>
  717. <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
  718. <stringProp name="mqtt.message_to_sent">{&quot;temperature&quot;: ${__Random(1,50,)}, &quot;humidity&quot; : ${__Random(1,80,)}}</stringProp>
  719. </net.xmeter.samplers.PubSampler>
  720. <hashTree/>
  721. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  722. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  723. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  724. <collectionProp name="Arguments.arguments">
  725. <elementProp name="" elementType="HTTPArgument">
  726. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  727. <stringProp name="Argument.value"></stringProp>
  728. <stringProp name="Argument.metadata">=</stringProp>
  729. </elementProp>
  730. </collectionProp>
  731. </elementProp>
  732. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  733. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  734. <stringProp name="HTTPSampler.protocol"></stringProp>
  735. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  736. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  737. <stringProp name="HTTPSampler.method">GET</stringProp>
  738. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  739. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  740. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  741. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  742. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  743. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  744. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  745. </HTTPSamplerProxy>
  746. <hashTree>
  747. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  748. <stringProp name="JSON_PATH">$.source_demo_0_records_in_total</stringProp>
  749. <stringProp name="EXPECTED_VALUE">1</stringProp>
  750. <boolProp name="JSONVALIDATION">true</boolProp>
  751. <boolProp name="EXPECT_NULL">false</boolProp>
  752. <boolProp name="INVERT">false</boolProp>
  753. <boolProp name="ISREGEX">false</boolProp>
  754. </JSONPathAssertion>
  755. <hashTree/>
  756. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
  757. <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_in_total</stringProp>
  758. <stringProp name="EXPECTED_VALUE">1</stringProp>
  759. <boolProp name="JSONVALIDATION">true</boolProp>
  760. <boolProp name="EXPECT_NULL">false</boolProp>
  761. <boolProp name="INVERT">false</boolProp>
  762. <boolProp name="ISREGEX">false</boolProp>
  763. </JSONPathAssertion>
  764. <hashTree/>
  765. </hashTree>
  766. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_StopRule" enabled="true">
  767. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  768. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  769. <collectionProp name="Arguments.arguments">
  770. <elementProp name="" elementType="HTTPArgument">
  771. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  772. <stringProp name="Argument.value"></stringProp>
  773. <stringProp name="Argument.metadata">=</stringProp>
  774. </elementProp>
  775. </collectionProp>
  776. </elementProp>
  777. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  778. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  779. <stringProp name="HTTPSampler.protocol"></stringProp>
  780. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  781. <stringProp name="HTTPSampler.path">/rules/rule1/stop</stringProp>
  782. <stringProp name="HTTPSampler.method">POST</stringProp>
  783. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  784. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  785. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  786. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  787. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  788. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  789. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  790. </HTTPSamplerProxy>
  791. <hashTree>
  792. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  793. <collectionProp name="Asserion.test_strings">
  794. <stringProp name="1631635559">Rule rule1 was stopped.</stringProp>
  795. </collectionProp>
  796. <stringProp name="Assertion.custom_message"></stringProp>
  797. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  798. <boolProp name="Assertion.assume_success">true</boolProp>
  799. <intProp name="Assertion.test_type">16</intProp>
  800. </ResponseAssertion>
  801. <hashTree/>
  802. </hashTree>
  803. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
  804. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  805. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  806. <collectionProp name="Arguments.arguments">
  807. <elementProp name="" elementType="HTTPArgument">
  808. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  809. <stringProp name="Argument.value"></stringProp>
  810. <stringProp name="Argument.metadata">=</stringProp>
  811. </elementProp>
  812. </collectionProp>
  813. </elementProp>
  814. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  815. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  816. <stringProp name="HTTPSampler.protocol"></stringProp>
  817. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  818. <stringProp name="HTTPSampler.path">/rules/rule1/status</stringProp>
  819. <stringProp name="HTTPSampler.method">GET</stringProp>
  820. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  821. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  822. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  823. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  824. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  825. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  826. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  827. </HTTPSamplerProxy>
  828. <hashTree>
  829. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  830. <collectionProp name="Asserion.test_strings">
  831. <stringProp name="1607612103">Stopped: canceled manually or by error.</stringProp>
  832. </collectionProp>
  833. <stringProp name="Assertion.custom_message"></stringProp>
  834. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  835. <boolProp name="Assertion.assume_success">false</boolProp>
  836. <intProp name="Assertion.test_type">16</intProp>
  837. </ResponseAssertion>
  838. <hashTree/>
  839. </hashTree>
  840. </hashTree>
  841. <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Drop" enabled="true">
  842. <boolProp name="TransactionController.includeTimers">false</boolProp>
  843. <boolProp name="TransactionController.parent">false</boolProp>
  844. </TransactionController>
  845. <hashTree>
  846. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
  847. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  848. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  849. <collectionProp name="Arguments.arguments">
  850. <elementProp name="" elementType="HTTPArgument">
  851. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  852. <stringProp name="Argument.value"></stringProp>
  853. <stringProp name="Argument.metadata">=</stringProp>
  854. </elementProp>
  855. </collectionProp>
  856. </elementProp>
  857. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  858. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  859. <stringProp name="HTTPSampler.protocol"></stringProp>
  860. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  861. <stringProp name="HTTPSampler.path">/rules/rule1</stringProp>
  862. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  863. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  864. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  865. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  866. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  867. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  868. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  869. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  870. </HTTPSamplerProxy>
  871. <hashTree>
  872. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  873. <collectionProp name="Asserion.test_strings">
  874. <stringProp name="717250485">Rule rule1 is dropped.</stringProp>
  875. </collectionProp>
  876. <stringProp name="Assertion.custom_message"></stringProp>
  877. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  878. <boolProp name="Assertion.assume_success">false</boolProp>
  879. <intProp name="Assertion.test_type">16</intProp>
  880. </ResponseAssertion>
  881. <hashTree/>
  882. </hashTree>
  883. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
  884. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  885. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  886. <collectionProp name="Arguments.arguments">
  887. <elementProp name="" elementType="HTTPArgument">
  888. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  889. <stringProp name="Argument.value"></stringProp>
  890. <stringProp name="Argument.metadata">=</stringProp>
  891. </elementProp>
  892. </collectionProp>
  893. </elementProp>
  894. <stringProp name="HTTPSampler.domain">${srv}</stringProp>
  895. <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
  896. <stringProp name="HTTPSampler.protocol"></stringProp>
  897. <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  898. <stringProp name="HTTPSampler.path">/streams/demo</stringProp>
  899. <stringProp name="HTTPSampler.method">DELETE</stringProp>
  900. <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  901. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  902. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  903. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  904. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  905. <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  906. <stringProp name="HTTPSampler.response_timeout"></stringProp>
  907. </HTTPSamplerProxy>
  908. <hashTree>
  909. <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
  910. <collectionProp name="Asserion.test_strings">
  911. <stringProp name="287881319">Stream demo is dropped.</stringProp>
  912. </collectionProp>
  913. <stringProp name="Assertion.custom_message"></stringProp>
  914. <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  915. <boolProp name="Assertion.assume_success">false</boolProp>
  916. <intProp name="Assertion.test_type">16</intProp>
  917. </ResponseAssertion>
  918. <hashTree/>
  919. </hashTree>
  920. </hashTree>
  921. <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
  922. <stringProp name="ConstantTimer.delay">500</stringProp>
  923. </ConstantTimer>
  924. <hashTree/>
  925. </hashTree>
  926. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
  927. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  928. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  929. <boolProp name="LoopController.continue_forever">false</boolProp>
  930. <stringProp name="LoopController.loops">4</stringProp>
  931. </elementProp>
  932. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  933. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  934. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  935. <stringProp name="ThreadGroup.duration"></stringProp>
  936. <stringProp name="ThreadGroup.delay"></stringProp>
  937. </ThreadGroup>
  938. <hashTree>
  939. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  940. <boolProp name="ResultCollector.error_logging">false</boolProp>
  941. <objProp>
  942. <name>saveConfig</name>
  943. <value class="SampleSaveConfiguration">
  944. <time>true</time>
  945. <latency>true</latency>
  946. <timestamp>true</timestamp>
  947. <success>true</success>
  948. <label>true</label>
  949. <code>true</code>
  950. <message>true</message>
  951. <threadName>true</threadName>
  952. <dataType>true</dataType>
  953. <encoding>false</encoding>
  954. <assertions>true</assertions>
  955. <subresults>true</subresults>
  956. <responseData>false</responseData>
  957. <samplerData>false</samplerData>
  958. <xml>false</xml>
  959. <fieldNames>true</fieldNames>
  960. <responseHeaders>false</responseHeaders>
  961. <requestHeaders>false</requestHeaders>
  962. <responseDataOnError>false</responseDataOnError>
  963. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  964. <assertionsResultsToSave>0</assertionsResultsToSave>
  965. <bytes>true</bytes>
  966. <sentBytes>true</sentBytes>
  967. <threadCounts>true</threadCounts>
  968. <idleTime>true</idleTime>
  969. <connectTime>true</connectTime>
  970. </value>
  971. </objProp>
  972. <stringProp name="filename"></stringProp>
  973. </ResultCollector>
  974. <hashTree/>
  975. <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
  976. <hashTree>
  977. <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
  978. <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
  979. <stringProp name="mqtt.port">1883</stringProp>
  980. <stringProp name="mqtt.version">3.1</stringProp>
  981. <stringProp name="mqtt.conn_timeout">10</stringProp>
  982. <boolProp name="mqtt.private_protocol">false</boolProp>
  983. <stringProp name="mqtt.listener_timeout">10</stringProp>
  984. <stringProp name="mqtt.protocol">TCP</stringProp>
  985. <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
  986. <stringProp name="mqtt.keystore_file_path"></stringProp>
  987. <stringProp name="mqtt.keystore_password"></stringProp>
  988. <stringProp name="mqtt.clientcert_file_path"></stringProp>
  989. <stringProp name="mqtt.clientcert_password"></stringProp>
  990. <stringProp name="mqtt.user_name"></stringProp>
  991. <stringProp name="mqtt.password"></stringProp>
  992. <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
  993. <boolProp name="mqtt.client_id_suffix">true</boolProp>
  994. <stringProp name="mqtt.conn_keep_alive">300</stringProp>
  995. <stringProp name="mqtt.conn_attampt_max">0</stringProp>
  996. <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
  997. </net.xmeter.samplers.ConnectSampler>
  998. <hashTree/>
  999. </hashTree>
  1000. <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
  1001. <stringProp name="mqtt.topic_name">devices/result</stringProp>
  1002. <stringProp name="mqtt.qos_level">0</stringProp>
  1003. <boolProp name="mqtt.add_timestamp">false</boolProp>
  1004. <boolProp name="mqtt.debug_response">true</boolProp>
  1005. <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
  1006. <stringProp name="mqtt.sample_condition_value">1</stringProp>
  1007. </net.xmeter.samplers.SubSampler>
  1008. <hashTree>
  1009. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="temperature Assertion" enabled="true">
  1010. <stringProp name="JSON_PATH">$[0].temperature</stringProp>
  1011. <stringProp name="EXPECTED_VALUE"></stringProp>
  1012. <boolProp name="JSONVALIDATION">false</boolProp>
  1013. <boolProp name="EXPECT_NULL">false</boolProp>
  1014. <boolProp name="INVERT">false</boolProp>
  1015. <boolProp name="ISREGEX">false</boolProp>
  1016. </JSONPathAssertion>
  1017. <hashTree/>
  1018. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="humidity Assertion" enabled="true">
  1019. <stringProp name="JSON_PATH">$[0].humidity</stringProp>
  1020. <stringProp name="EXPECTED_VALUE"></stringProp>
  1021. <boolProp name="JSONVALIDATION">false</boolProp>
  1022. <boolProp name="EXPECT_NULL">false</boolProp>
  1023. <boolProp name="INVERT">false</boolProp>
  1024. <boolProp name="ISREGEX">false</boolProp>
  1025. </JSONPathAssertion>
  1026. <hashTree/>
  1027. </hashTree>
  1028. </hashTree>
  1029. </hashTree>
  1030. </hashTree>
  1031. </jmeterTestPlan>