change_rule_status.jmx 64 KB

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