<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Load Test (4,000 RPS)" enabled="true">
<stringProp name="TestPlan.comments">MCP Gateway load test. Sustained 4,000 RPS mixed workload for 30 minutes to validate production capacity.</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 name="GATEWAY_URL" elementType="Argument">
<stringProp name="Argument.name">GATEWAY_URL</stringProp>
<stringProp name="Argument.value">${__P(GATEWAY_URL,http://localhost:8080)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="TOKEN" elementType="Argument">
<stringProp name="Argument.name">TOKEN</stringProp>
<stringProp name="Argument.value">${__P(TOKEN,)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="SERVER_ID" elementType="Argument">
<stringProp name="Argument.name">SERVER_ID</stringProp>
<stringProp name="Argument.value">${__P(SERVER_ID,)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="THREADS" elementType="Argument">
<stringProp name="Argument.name">THREADS</stringProp>
<stringProp name="Argument.value">${__P(THREADS,400)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="RAMP_UP" elementType="Argument">
<stringProp name="Argument.name">RAMP_UP</stringProp>
<stringProp name="Argument.value">${__P(RAMP_UP,120)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="DURATION" elementType="Argument">
<stringProp name="Argument.name">DURATION</stringProp>
<stringProp name="Argument.value">${__P(DURATION,1800)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="REST_MIX_MODE" elementType="Argument">
<stringProp name="Argument.name">REST_MIX_MODE</stringProp>
<stringProp name="Argument.value">${__P(REST_MIX_MODE,random)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="MCP_MIX_MODE" elementType="Argument">
<stringProp name="Argument.name">MCP_MIX_MODE</stringProp>
<stringProp name="Argument.value">${__P(MCP_MIX_MODE,random)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<!-- HTTP Request Defaults -->
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" 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">${__javaScript(new java.net.URL("${GATEWAY_URL}").getHost())}</stringProp>
<stringProp name="HTTPSampler.port">${__javaScript(new java.net.URL("${GATEWAY_URL}").getPort() == -1 ? (new java.net.URL("${GATEWAY_URL}").getProtocol() == "https" ? 443 : 80) : new java.net.URL("${GATEWAY_URL}").getPort())}</stringProp>
<stringProp name="HTTPSampler.protocol">${__javaScript(new java.net.URL("${GATEWAY_URL}").getProtocol())}</stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
<stringProp name="HTTPSampler.response_timeout">30000</stringProp>
</ConfigTestElement>
<hashTree/>
<!-- HTTP Header Manager -->
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Content-Type</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Authorization</stringProp>
<stringProp name="Header.value">Bearer ${TOKEN}</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<!-- CSV Data Set for Timezones -->
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Timezone Data" enabled="true">
<stringProp name="filename">tests/jmeter/data/timezones.csv</stringProp>
<stringProp name="fileEncoding">UTF-8</stringProp>
<stringProp name="variableNames">timezone</stringProp>
<boolProp name="ignoreFirstLine">true</boolProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<!-- REST API Thread Group (60%) -->
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="REST API Load (60%)" 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>
<intProp name="LoopController.loops">-1</intProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">${THREADS}</stringProp>
<stringProp name="ThreadGroup.ramp_time">${RAMP_UP}</stringProp>
<boolProp name="ThreadGroup.scheduler">true</boolProp>
<stringProp name="ThreadGroup.duration">${DURATION}</stringProp>
<stringProp name="ThreadGroup.delay">0</stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
</ThreadGroup>
<hashTree>
<!-- Shared REST Mix -->
<IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="Include REST Mix" enabled="true">
<stringProp name="IncludeController.includefile">${__P(JMETER_FRAGMENT_DIR,tests/jmeter/fragments)}/rest_mix.jmx</stringProp>
</IncludeController>
<hashTree/>
<!-- Constant Throughput Timer - disabled for flexibility, enable for strict RPS control -->
<ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="Target RPS (optional)" enabled="false">
<intProp name="calcMode">2</intProp>
<doubleProp>
<name>throughput</name>
<value>144000.0</value>
<savedValue>0.0</savedValue>
</doubleProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<!-- MCP JSON-RPC Thread Group (40%) -->
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="MCP JSON-RPC Load (40%)" 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>
<intProp name="LoopController.loops">-1</intProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">${THREADS}</stringProp>
<stringProp name="ThreadGroup.ramp_time">${RAMP_UP}</stringProp>
<boolProp name="ThreadGroup.scheduler">true</boolProp>
<stringProp name="ThreadGroup.duration">${DURATION}</stringProp>
<stringProp name="ThreadGroup.delay">0</stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
</ThreadGroup>
<hashTree>
<!-- Shared MCP Mix -->
<IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="Include MCP Mix" enabled="true">
<stringProp name="IncludeController.includefile">${__P(JMETER_FRAGMENT_DIR,tests/jmeter/fragments)}/mcp_mix.jmx</stringProp>
</IncludeController>
<hashTree/>
<!-- Constant Throughput Timer -->
<ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="Target RPS (optional)" enabled="false">
<intProp name="calcMode">2</intProp>
<doubleProp>
<name>throughput</name>
<value>96000.0</value>
<savedValue>0.0</savedValue>
</doubleProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<!-- Summary Report -->
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" 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>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
<!-- Aggregate Report -->
<ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" 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>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</jmeterTestPlan>