|
@@ -0,0 +1,918 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!--
|
|
|
+ ~ Copyright 2022 EMQ Technologies Co., Ltd.
|
|
|
+ ~
|
|
|
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
+ ~ you may not use this file except in compliance with the License.
|
|
|
+ ~ You may obtain a copy of the License at
|
|
|
+ ~
|
|
|
+ ~ http://www.apache.org/licenses/LICENSE-2.0
|
|
|
+ ~
|
|
|
+ ~ Unless required by applicable law or agreed to in writing, software
|
|
|
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
+ ~ See the License for the specific language governing permissions and
|
|
|
+ ~ limitations under the License.
|
|
|
+ -->
|
|
|
+
|
|
|
+<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.3">
|
|
|
+ <hashTree>
|
|
|
+ <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
|
|
|
+ <stringProp name="TestPlan.comments"></stringProp>
|
|
|
+ <boolProp name="TestPlan.functional_mode">false</boolProp>
|
|
|
+ <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
|
|
|
+ <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
|
|
|
+ <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="TestPlan.user_define_classpath"></stringProp>
|
|
|
+ </TestPlan>
|
|
|
+ <hashTree>
|
|
|
+ <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments">
|
|
|
+ <elementProp name="srv" elementType="Argument">
|
|
|
+ <stringProp name="Argument.name">srv</stringProp>
|
|
|
+ <stringProp name="Argument.value">127.0.0.1</stringProp>
|
|
|
+ <stringProp name="Argument.metadata">=</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ <elementProp name="rest_port" elementType="Argument">
|
|
|
+ <stringProp name="Argument.name">rest_port</stringProp>
|
|
|
+ <stringProp name="Argument.value">9081</stringProp>
|
|
|
+ <stringProp name="Argument.metadata">=</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ <elementProp name="mqtt_srv" elementType="Argument">
|
|
|
+ <stringProp name="Argument.name">mqtt_srv</stringProp>
|
|
|
+ <stringProp name="Argument.value">127.0.0.1</stringProp>
|
|
|
+ <stringProp name="Argument.metadata">=</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ </collectionProp>
|
|
|
+ </Arguments>
|
|
|
+ <hashTree/>
|
|
|
+ <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Rules" enabled="true">
|
|
|
+ <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
|
|
+ <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
|
|
|
+ <boolProp name="LoopController.continue_forever">false</boolProp>
|
|
|
+ <stringProp name="LoopController.loops">1</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="ThreadGroup.num_threads">1</stringProp>
|
|
|
+ <stringProp name="ThreadGroup.ramp_time">1</stringProp>
|
|
|
+ <boolProp name="ThreadGroup.scheduler">false</boolProp>
|
|
|
+ <stringProp name="ThreadGroup.duration"></stringProp>
|
|
|
+ <stringProp name="ThreadGroup.delay"></stringProp>
|
|
|
+ <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
|
|
+ </ThreadGroup>
|
|
|
+ <hashTree>
|
|
|
+ <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
|
|
|
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
|
|
|
+ <objProp>
|
|
|
+ <name>saveConfig</name>
|
|
|
+ <value class="SampleSaveConfiguration">
|
|
|
+ <time>true</time>
|
|
|
+ <latency>true</latency>
|
|
|
+ <timestamp>true</timestamp>
|
|
|
+ <success>true</success>
|
|
|
+ <label>true</label>
|
|
|
+ <code>true</code>
|
|
|
+ <message>true</message>
|
|
|
+ <threadName>true</threadName>
|
|
|
+ <dataType>true</dataType>
|
|
|
+ <encoding>false</encoding>
|
|
|
+ <assertions>true</assertions>
|
|
|
+ <subresults>true</subresults>
|
|
|
+ <responseData>false</responseData>
|
|
|
+ <samplerData>false</samplerData>
|
|
|
+ <xml>false</xml>
|
|
|
+ <fieldNames>true</fieldNames>
|
|
|
+ <responseHeaders>false</responseHeaders>
|
|
|
+ <requestHeaders>false</requestHeaders>
|
|
|
+ <responseDataOnError>false</responseDataOnError>
|
|
|
+ <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
|
|
|
+ <assertionsResultsToSave>0</assertionsResultsToSave>
|
|
|
+ <bytes>true</bytes>
|
|
|
+ <sentBytes>true</sentBytes>
|
|
|
+ <threadCounts>true</threadCounts>
|
|
|
+ <idleTime>true</idleTime>
|
|
|
+ <connectTime>true</connectTime>
|
|
|
+ </value>
|
|
|
+ </objProp>
|
|
|
+ <stringProp name="filename"></stringProp>
|
|
|
+ </ResultCollector>
|
|
|
+ <hashTree/>
|
|
|
+ <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="API" enabled="true">
|
|
|
+ <boolProp name="TransactionController.includeTimers">false</boolProp>
|
|
|
+ <boolProp name="TransactionController.parent">false</boolProp>
|
|
|
+ </TransactionController>
|
|
|
+ <hashTree>
|
|
|
+ <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
|
|
|
+ <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
|
|
|
+ <stringProp name="mqtt.port">1883</stringProp>
|
|
|
+ <stringProp name="mqtt.version">3.1</stringProp>
|
|
|
+ <stringProp name="mqtt.conn_timeout">10</stringProp>
|
|
|
+ <boolProp name="mqtt.private_protocol">false</boolProp>
|
|
|
+ <stringProp name="mqtt.listener_timeout">10</stringProp>
|
|
|
+ <stringProp name="mqtt.protocol">TCP</stringProp>
|
|
|
+ <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
|
|
|
+ <stringProp name="mqtt.keystore_file_path"></stringProp>
|
|
|
+ <stringProp name="mqtt.keystore_password"></stringProp>
|
|
|
+ <stringProp name="mqtt.clientcert_file_path"></stringProp>
|
|
|
+ <stringProp name="mqtt.clientcert_password"></stringProp>
|
|
|
+ <stringProp name="mqtt.user_name"></stringProp>
|
|
|
+ <stringProp name="mqtt.password"></stringProp>
|
|
|
+ <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
|
|
|
+ <boolProp name="mqtt.client_id_suffix">true</boolProp>
|
|
|
+ <stringProp name="mqtt.conn_keep_alive">300</stringProp>
|
|
|
+ <stringProp name="mqtt.conn_attampt_max">0</stringProp>
|
|
|
+ <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
|
|
|
+ <boolProp name="mqtt.conn_clean_session">true</boolProp>
|
|
|
+ </net.xmeter.samplers.ConnectSampler>
|
|
|
+ <hashTree/>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateAlertSettingStream" enabled="true">
|
|
|
+ <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
|
+ <collectionProp name="Arguments.arguments">
|
|
|
+ <elementProp name="" elementType="HTTPArgument">
|
|
|
+ <boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
|
+ <stringProp name="Argument.value">{"sql":"CREATE STREAM alertStream() WITH (DATASOURCE=\"scene/alert\", FORMAT=\"json\", TYPE=\"mqtt\")"}</stringProp>
|
|
|
+ <stringProp name="Argument.metadata">=</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ </collectionProp>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/streams</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">POST</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ <stringProp name="TestPlan.comments">Create stream for alert setting actions</stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="2128378328">Stream alertStream is created.</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">true</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateRuleUpdateAlert" enabled="true">
|
|
|
+ <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
|
+ <collectionProp name="Arguments.arguments">
|
|
|
+ <elementProp name="" elementType="HTTPArgument">
|
|
|
+ <boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
|
+ <stringProp name="Argument.value">{
|
|
|
+ "id": "ruleUpdateAlert",
|
|
|
+ "sql":"SELECT * FROM alertStream",
|
|
|
+ "actions":[
|
|
|
+ {
|
|
|
+ "redis": {
|
|
|
+ "addr": "127.0.0.1:6379",
|
|
|
+ "dataType": "string",
|
|
|
+ "field": "id",
|
|
|
+ "rowkindField": "action",
|
|
|
+ "sendSingle": true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+}</stringProp>
|
|
|
+ <stringProp name="Argument.metadata">=</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ </collectionProp>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/rules</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">POST</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="-1451809660">Rule ruleUpdateAlert was created</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">true</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateDataStream" enabled="true">
|
|
|
+ <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
|
+ <collectionProp name="Arguments.arguments">
|
|
|
+ <elementProp name="" elementType="HTTPArgument">
|
|
|
+ <boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
|
+ <stringProp name="Argument.value">{"sql":"CREATE STREAM demoStream() WITH (DATASOURCE=\"scene/data\", FORMAT=\"json\", TYPE=\"mqtt\")"}</stringProp>
|
|
|
+ <stringProp name="Argument.metadata">=</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ </collectionProp>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/streams</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">POST</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ <stringProp name="TestPlan.comments">Create stream for alert setting actions</stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="-894755937">Stream demoStream is created.</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">true</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateRedisTable" enabled="true">
|
|
|
+ <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
|
+ <collectionProp name="Arguments.arguments">
|
|
|
+ <elementProp name="" elementType="HTTPArgument">
|
|
|
+ <boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
|
+ <stringProp name="Argument.value">{"sql":"CREATE TABLE alertTable() WITH (DATASOURCE=\"0\", TYPE=\"redis\", KIND=\"lookup\")"}</stringProp>
|
|
|
+ <stringProp name="Argument.metadata">=</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ </collectionProp>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/tables</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">POST</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="-1341540896">Table alertTable is created.</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">true</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateRuleAlert" enabled="true">
|
|
|
+ <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
|
+ <collectionProp name="Arguments.arguments">
|
|
|
+ <elementProp name="" elementType="HTTPArgument">
|
|
|
+ <boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
|
+ <stringProp name="Argument.value">{
|
|
|
+ "id": "ruleAlert",
|
|
|
+ "sql":"SELECT device, value FROM demoStream INNER JOIN alertTable ON demoStream.deviceKind = alertTable.id WHERE demoStream.value > alertTable.alarm",
|
|
|
+ "actions":[
|
|
|
+ {
|
|
|
+ "mqtt": {
|
|
|
+ "server": "tcp://${mqtt_srv}:1883",
|
|
|
+ "topic": "rule/alert",
|
|
|
+ "sendSingle": true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+}</stringProp>
|
|
|
+ <stringProp name="Argument.metadata">=</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ </collectionProp>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/rules</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">POST</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="-2079532467">Rule ruleAlert was created</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">true</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/rules/ruleAlert/status</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">GET</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
|
|
|
+ <stringProp name="JSON_PATH">$.source_demoStream_0_records_in_total</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">0</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="FeedTable" enabled="true">
|
|
|
+ <boolProp name="LoopController.continue_forever">true</boolProp>
|
|
|
+ <stringProp name="LoopController.loops">4</stringProp>
|
|
|
+ </LoopController>
|
|
|
+ <hashTree>
|
|
|
+ <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
|
|
|
+ <stringProp name="delimiter">,</stringProp>
|
|
|
+ <stringProp name="fileEncoding"></stringProp>
|
|
|
+ <stringProp name="filename">alert_init_data.txt</stringProp>
|
|
|
+ <boolProp name="ignoreFirstLine">false</boolProp>
|
|
|
+ <boolProp name="quotedData">false</boolProp>
|
|
|
+ <boolProp name="recycle">true</boolProp>
|
|
|
+ <stringProp name="shareMode">shareMode.thread</stringProp>
|
|
|
+ <boolProp name="stopThread">false</boolProp>
|
|
|
+ <stringProp name="variableNames">action,id,alarm</stringProp>
|
|
|
+ </CSVDataSet>
|
|
|
+ <hashTree/>
|
|
|
+ <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
|
|
|
+ <stringProp name="mqtt.topic_name">scene/alert</stringProp>
|
|
|
+ <stringProp name="mqtt.qos_level">0</stringProp>
|
|
|
+ <boolProp name="mqtt.add_timestamp">false</boolProp>
|
|
|
+ <stringProp name="mqtt.message_type">String</stringProp>
|
|
|
+ <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
|
|
|
+ <stringProp name="mqtt.message_to_sent">{"id": ${id}, "action": ${action}, "alarm" : ${alarm}}</stringProp>
|
|
|
+ <boolProp name="mqtt.retained_message">false</boolProp>
|
|
|
+ </net.xmeter.samplers.PubSampler>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GetTableRuleStatus" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/rules/ruleUpdateAlert/status</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">GET</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
|
|
|
+ <stringProp name="JSON_PATH">$.source_alertStream_0_records_in_total</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">4</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
|
|
|
+ <stringProp name="JSON_PATH">$.sink_memory_0_0_records_out_total</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">4</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
|
+ <stringProp name="ConstantTimer.delay">5000</stringProp>
|
|
|
+ </ConstantTimer>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="SendData" enabled="true">
|
|
|
+ <boolProp name="LoopController.continue_forever">true</boolProp>
|
|
|
+ <stringProp name="LoopController.loops">4</stringProp>
|
|
|
+ </LoopController>
|
|
|
+ <hashTree>
|
|
|
+ <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
|
|
|
+ <stringProp name="delimiter">,</stringProp>
|
|
|
+ <stringProp name="fileEncoding"></stringProp>
|
|
|
+ <stringProp name="filename">collect_data.txt</stringProp>
|
|
|
+ <boolProp name="ignoreFirstLine">false</boolProp>
|
|
|
+ <boolProp name="quotedData">false</boolProp>
|
|
|
+ <boolProp name="recycle">true</boolProp>
|
|
|
+ <stringProp name="shareMode">shareMode.thread</stringProp>
|
|
|
+ <boolProp name="stopThread">false</boolProp>
|
|
|
+ <stringProp name="variableNames">device,deviceKind,value</stringProp>
|
|
|
+ </CSVDataSet>
|
|
|
+ <hashTree/>
|
|
|
+ <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
|
|
|
+ <stringProp name="mqtt.topic_name">scene/data</stringProp>
|
|
|
+ <stringProp name="mqtt.qos_level">0</stringProp>
|
|
|
+ <boolProp name="mqtt.add_timestamp">false</boolProp>
|
|
|
+ <stringProp name="mqtt.message_type">String</stringProp>
|
|
|
+ <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
|
|
|
+ <stringProp name="mqtt.message_to_sent">{"deviceKind": ${deviceKind}, "device": ${device}, "value" : ${value}}</stringProp>
|
|
|
+ <boolProp name="mqtt.retained_message">false</boolProp>
|
|
|
+ </net.xmeter.samplers.PubSampler>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/rules/ruleAlert/status</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">GET</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
|
|
|
+ <stringProp name="JSON_PATH">$.source_demoStream_0_records_in_total</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">4</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
|
|
|
+ <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_out_total</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">2</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="UpdateTable" enabled="true">
|
|
|
+ <boolProp name="LoopController.continue_forever">true</boolProp>
|
|
|
+ <stringProp name="LoopController.loops">4</stringProp>
|
|
|
+ </LoopController>
|
|
|
+ <hashTree>
|
|
|
+ <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
|
|
|
+ <stringProp name="delimiter">,</stringProp>
|
|
|
+ <stringProp name="fileEncoding"></stringProp>
|
|
|
+ <stringProp name="filename">alert_update_data.txt</stringProp>
|
|
|
+ <boolProp name="ignoreFirstLine">false</boolProp>
|
|
|
+ <boolProp name="quotedData">false</boolProp>
|
|
|
+ <boolProp name="recycle">true</boolProp>
|
|
|
+ <stringProp name="shareMode">shareMode.thread</stringProp>
|
|
|
+ <boolProp name="stopThread">false</boolProp>
|
|
|
+ <stringProp name="variableNames">action,id,alarm</stringProp>
|
|
|
+ </CSVDataSet>
|
|
|
+ <hashTree/>
|
|
|
+ <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
|
|
|
+ <stringProp name="mqtt.topic_name">scene/alert</stringProp>
|
|
|
+ <stringProp name="mqtt.qos_level">0</stringProp>
|
|
|
+ <boolProp name="mqtt.add_timestamp">false</boolProp>
|
|
|
+ <stringProp name="mqtt.message_type">String</stringProp>
|
|
|
+ <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
|
|
|
+ <stringProp name="mqtt.message_to_sent">{"id": ${id}, "action": ${action}, "alarm" : ${alarm}}</stringProp>
|
|
|
+ <boolProp name="mqtt.retained_message">false</boolProp>
|
|
|
+ </net.xmeter.samplers.PubSampler>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GetTableRuleStatus" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/rules/ruleUpdateAlert/status</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">GET</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
|
|
|
+ <stringProp name="JSON_PATH">$.source_alertStream_0_records_in_total</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">8</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
|
|
|
+ <stringProp name="JSON_PATH">$.sink_memory_0_0_records_out_total</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">8</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
|
+ <stringProp name="ConstantTimer.delay">5000</stringProp>
|
|
|
+ </ConstantTimer>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="SendData" enabled="true">
|
|
|
+ <boolProp name="LoopController.continue_forever">true</boolProp>
|
|
|
+ <stringProp name="LoopController.loops">4</stringProp>
|
|
|
+ </LoopController>
|
|
|
+ <hashTree>
|
|
|
+ <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
|
|
|
+ <stringProp name="delimiter">,</stringProp>
|
|
|
+ <stringProp name="fileEncoding"></stringProp>
|
|
|
+ <stringProp name="filename">collect_data.txt</stringProp>
|
|
|
+ <boolProp name="ignoreFirstLine">false</boolProp>
|
|
|
+ <boolProp name="quotedData">false</boolProp>
|
|
|
+ <boolProp name="recycle">true</boolProp>
|
|
|
+ <stringProp name="shareMode">shareMode.thread</stringProp>
|
|
|
+ <boolProp name="stopThread">false</boolProp>
|
|
|
+ <stringProp name="variableNames">device,deviceKind,value</stringProp>
|
|
|
+ </CSVDataSet>
|
|
|
+ <hashTree/>
|
|
|
+ <net.xmeter.samplers.PubSampler guiclass="net.xmeter.gui.PubSamplerUI" testclass="net.xmeter.samplers.PubSampler" testname="MQTT Pub Sampler" enabled="true">
|
|
|
+ <stringProp name="mqtt.topic_name">scene/data</stringProp>
|
|
|
+ <stringProp name="mqtt.qos_level">0</stringProp>
|
|
|
+ <boolProp name="mqtt.add_timestamp">false</boolProp>
|
|
|
+ <stringProp name="mqtt.message_type">String</stringProp>
|
|
|
+ <stringProp name="mqtt.message_type_fixed_length">1024</stringProp>
|
|
|
+ <stringProp name="mqtt.message_to_sent">{"deviceKind": ${deviceKind}, "device": ${device}, "value" : ${value}}</stringProp>
|
|
|
+ <boolProp name="mqtt.retained_message">false</boolProp>
|
|
|
+ </net.xmeter.samplers.PubSampler>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_GetRuleStatus" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/rules/ruleAlert/status</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">GET</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="true">
|
|
|
+ <stringProp name="JSON_PATH">$.source_demoStream_0_records_in_total</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">8</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion" enabled="false">
|
|
|
+ <stringProp name="JSON_PATH">$.sink_mqtt_0_0_records_out_total</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">3</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/rules/ruleAlert</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">DELETE</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="659914816">Rule ruleAlert is dropped.</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">false</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/streams/demoStream</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">DELETE</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="1148079559">Stream demoStream is dropped.</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">false</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Table" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/tables/alertTable</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">DELETE</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="701294600">Table alertTable is dropped.</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">false</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_DropRule" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/rules/ruleUpdateAlert</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">DELETE</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="1287637623">Rule ruleUpdateAlert is dropped.</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">false</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="API_Drop_Stream" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">${srv}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port">${rest_port}</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/streams/alertStream</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.method">DELETE</stringProp>
|
|
|
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
|
|
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
|
|
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
|
|
|
+ </HTTPSamplerProxy>
|
|
|
+ <hashTree>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="-123753472">Stream alertStream is dropped.</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">false</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
|
|
|
+ <stringProp name="ConstantTimer.delay">500</stringProp>
|
|
|
+ </ConstantTimer>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ </hashTree>
|
|
|
+ <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Result" enabled="true">
|
|
|
+ <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
|
|
+ <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
|
|
|
+ <boolProp name="LoopController.continue_forever">false</boolProp>
|
|
|
+ <stringProp name="LoopController.loops">3</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="ThreadGroup.num_threads">1</stringProp>
|
|
|
+ <stringProp name="ThreadGroup.ramp_time">1</stringProp>
|
|
|
+ <boolProp name="ThreadGroup.scheduler">false</boolProp>
|
|
|
+ <stringProp name="ThreadGroup.duration"></stringProp>
|
|
|
+ <stringProp name="ThreadGroup.delay"></stringProp>
|
|
|
+ <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
|
|
+ </ThreadGroup>
|
|
|
+ <hashTree>
|
|
|
+ <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
|
|
|
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
|
|
|
+ <objProp>
|
|
|
+ <name>saveConfig</name>
|
|
|
+ <value class="SampleSaveConfiguration">
|
|
|
+ <time>true</time>
|
|
|
+ <latency>true</latency>
|
|
|
+ <timestamp>true</timestamp>
|
|
|
+ <success>true</success>
|
|
|
+ <label>true</label>
|
|
|
+ <code>true</code>
|
|
|
+ <message>true</message>
|
|
|
+ <threadName>true</threadName>
|
|
|
+ <dataType>true</dataType>
|
|
|
+ <encoding>false</encoding>
|
|
|
+ <assertions>true</assertions>
|
|
|
+ <subresults>true</subresults>
|
|
|
+ <responseData>false</responseData>
|
|
|
+ <samplerData>false</samplerData>
|
|
|
+ <xml>false</xml>
|
|
|
+ <fieldNames>true</fieldNames>
|
|
|
+ <responseHeaders>false</responseHeaders>
|
|
|
+ <requestHeaders>false</requestHeaders>
|
|
|
+ <responseDataOnError>false</responseDataOnError>
|
|
|
+ <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
|
|
|
+ <assertionsResultsToSave>0</assertionsResultsToSave>
|
|
|
+ <bytes>true</bytes>
|
|
|
+ <sentBytes>true</sentBytes>
|
|
|
+ <threadCounts>true</threadCounts>
|
|
|
+ <idleTime>true</idleTime>
|
|
|
+ <connectTime>true</connectTime>
|
|
|
+ </value>
|
|
|
+ </objProp>
|
|
|
+ <stringProp name="filename"></stringProp>
|
|
|
+ </ResultCollector>
|
|
|
+ <hashTree/>
|
|
|
+ <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
|
|
|
+ <hashTree>
|
|
|
+ <net.xmeter.samplers.ConnectSampler guiclass="net.xmeter.gui.ConnectSamplerUI" testclass="net.xmeter.samplers.ConnectSampler" testname="MQTT Connect" enabled="true">
|
|
|
+ <stringProp name="mqtt.server">${mqtt_srv}</stringProp>
|
|
|
+ <stringProp name="mqtt.port">1883</stringProp>
|
|
|
+ <stringProp name="mqtt.version">3.1</stringProp>
|
|
|
+ <stringProp name="mqtt.conn_timeout">10</stringProp>
|
|
|
+ <boolProp name="mqtt.private_protocol">false</boolProp>
|
|
|
+ <stringProp name="mqtt.listener_timeout">10</stringProp>
|
|
|
+ <stringProp name="mqtt.protocol">TCP</stringProp>
|
|
|
+ <boolProp name="mqtt.dual_ssl_authentication">false</boolProp>
|
|
|
+ <stringProp name="mqtt.keystore_file_path"></stringProp>
|
|
|
+ <stringProp name="mqtt.keystore_password"></stringProp>
|
|
|
+ <stringProp name="mqtt.clientcert_file_path"></stringProp>
|
|
|
+ <stringProp name="mqtt.clientcert_password"></stringProp>
|
|
|
+ <stringProp name="mqtt.user_name"></stringProp>
|
|
|
+ <stringProp name="mqtt.password"></stringProp>
|
|
|
+ <stringProp name="mqtt.client_id_prefix">conn_</stringProp>
|
|
|
+ <boolProp name="mqtt.client_id_suffix">true</boolProp>
|
|
|
+ <stringProp name="mqtt.conn_keep_alive">300</stringProp>
|
|
|
+ <stringProp name="mqtt.conn_attampt_max">0</stringProp>
|
|
|
+ <stringProp name="mqtt.reconn_attampt_max">0</stringProp>
|
|
|
+ <boolProp name="mqtt.conn_clean_session">true</boolProp>
|
|
|
+ </net.xmeter.samplers.ConnectSampler>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <net.xmeter.samplers.SubSampler guiclass="net.xmeter.gui.SubSamplerUI" testclass="net.xmeter.samplers.SubSampler" testname="AnalysisResult" enabled="true">
|
|
|
+ <stringProp name="mqtt.topic_name">rule/alert</stringProp>
|
|
|
+ <stringProp name="mqtt.qos_level">0</stringProp>
|
|
|
+ <boolProp name="mqtt.add_timestamp">false</boolProp>
|
|
|
+ <boolProp name="mqtt.debug_response">true</boolProp>
|
|
|
+ <stringProp name="mqtt.sample_condition">number of received messages</stringProp>
|
|
|
+ <stringProp name="mqtt.sample_condition_value">1</stringProp>
|
|
|
+ </net.xmeter.samplers.SubSampler>
|
|
|
+ <hashTree>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="value Assertion" enabled="true">
|
|
|
+ <stringProp name="JSON_PATH">$.value</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">${value}</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="device Assertion" enabled="true">
|
|
|
+ <stringProp name="JSON_PATH">$.device</stringProp>
|
|
|
+ <stringProp name="EXPECTED_VALUE">${device}</stringProp>
|
|
|
+ <boolProp name="JSONVALIDATION">true</boolProp>
|
|
|
+ <boolProp name="EXPECT_NULL">false</boolProp>
|
|
|
+ <boolProp name="INVERT">false</boolProp>
|
|
|
+ <boolProp name="ISREGEX">false</boolProp>
|
|
|
+ </JSONPathAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
|
|
|
+ <stringProp name="delimiter">,</stringProp>
|
|
|
+ <stringProp name="fileEncoding"></stringProp>
|
|
|
+ <stringProp name="filename">lookup_table_result_data.txt</stringProp>
|
|
|
+ <boolProp name="ignoreFirstLine">false</boolProp>
|
|
|
+ <boolProp name="quotedData">false</boolProp>
|
|
|
+ <boolProp name="recycle">true</boolProp>
|
|
|
+ <stringProp name="shareMode">shareMode.thread</stringProp>
|
|
|
+ <boolProp name="stopThread">false</boolProp>
|
|
|
+ <stringProp name="variableNames">device,value</stringProp>
|
|
|
+ </CSVDataSet>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ </hashTree>
|
|
|
+ </hashTree>
|
|
|
+</jmeterTestPlan>
|