- Install Jmeter and add Jmeter/bin to PATH env variables
- Execute following command from project root
jmeter -n -t Jmeter/SnowTemp.jmx -l result.jtl
Created
September 9, 2025 03:30
-
-
Save adiralashiva8/b6b3f2b74c6bdc992b1470b993dc990b to your computer and use it in GitHub Desktop.
Jmeter script for servicenow performance testing on list of tables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.3"> | |
<hashTree> | |
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="ServiceNow Table Performance Testing" 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="environment" elementType="Argument"> | |
<stringProp name="Argument.name">environment</stringProp> | |
<stringProp name="Argument.value">iceqa.service-now.com</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
</collectionProp> | |
</Arguments> | |
<hashTree/> | |
<kg.apc.jmeter.threads.SteppingThreadGroup guiclass="kg.apc.jmeter.threads.SteppingThreadGroupGui" testclass="kg.apc.jmeter.threads.SteppingThreadGroup" testname="Load Tables In Step Pattern" enabled="true"> | |
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | |
<stringProp name="ThreadGroup.num_threads">50</stringProp> | |
<stringProp name="Threads initial delay">0</stringProp> | |
<stringProp name="Start users count">10</stringProp> | |
<stringProp name="Start users count burst">0</stringProp> | |
<stringProp name="Start users period">10</stringProp> | |
<stringProp name="Stop users count">10</stringProp> | |
<stringProp name="Stop users period">10</stringProp> | |
<stringProp name="flighttime">120</stringProp> | |
<stringProp name="rampUp">1</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> | |
</kg.apc.jmeter.threads.SteppingThreadGroup> | |
<hashTree> | |
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true"> | |
<stringProp name="filename">C:/robotframework/snowrf/Jmeter/users.csv</stringProp> | |
<stringProp name="fileEncoding"></stringProp> | |
<stringProp name="variableNames"></stringProp> | |
<boolProp name="ignoreFirstLine">false</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/> | |
<AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true"> | |
<collectionProp name="AuthManager.auth_list"> | |
<elementProp name="" elementType="Authorization"> | |
<stringProp name="Authorization.url"></stringProp> | |
<stringProp name="Authorization.username">${username}</stringProp> | |
<stringProp name="Authorization.password">${password}</stringProp> | |
<stringProp name="Authorization.domain"></stringProp> | |
<stringProp name="Authorization.realm"></stringProp> | |
</elementProp> | |
</collectionProp> | |
<boolProp name="AuthManager.controlledByThreadGroup">false</boolProp> | |
</AuthManager> | |
<hashTree/> | |
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true"> | |
<stringProp name="filename">C:/robotframework/snowrf/Jmeter/tables.csv</stringProp> | |
<stringProp name="fileEncoding"></stringProp> | |
<stringProp name="variableNames"></stringProp> | |
<boolProp name="ignoreFirstLine">false</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/> | |
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="${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">${environment}</stringProp> | |
<stringProp name="HTTPSampler.port"></stringProp> | |
<stringProp name="HTTPSampler.protocol">https</stringProp> | |
<stringProp name="HTTPSampler.contentEncoding"></stringProp> | |
<stringProp name="HTTPSampler.path">api/now/table/${table}</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> | |
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Code Should Be 200" enabled="true"> | |
<collectionProp name="Asserion.test_strings"> | |
<stringProp name="49586">200</stringProp> | |
</collectionProp> | |
<stringProp name="Assertion.custom_message"></stringProp> | |
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp> | |
<boolProp name="Assertion.assume_success">false</boolProp> | |
<intProp name="Assertion.test_type">8</intProp> | |
</ResponseAssertion> | |
<hashTree/> | |
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Body Shoud Contain Sys ID" enabled="true"> | |
<collectionProp name="Asserion.test_strings"> | |
<stringProp name="-887348275">sys_id</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">2</intProp> | |
</ResponseAssertion> | |
<hashTree/> | |
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> | |
<stringProp name="ConstantTimer.delay">500</stringProp> | |
</ConstantTimer> | |
<hashTree/> | |
</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> | |
<url>true</url> | |
<threadCounts>true</threadCounts> | |
<idleTime>true</idleTime> | |
<connectTime>true</connectTime> | |
</value> | |
</objProp> | |
<stringProp name="filename">C:\robotframework\snowrf\result.jtl</stringProp> | |
</ResultCollector> | |
<hashTree/> | |
<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">C:\robotframework\snowrf\result.jtl</stringProp> | |
</ResultCollector> | |
<hashTree/> | |
<kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.HitsPerSecondGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="jp@gc - Hits per Second" 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">C:\robotframework\snowrf\qa\devtemp_result_50.jtl</stringProp> | |
<longProp name="interval_grouping">1000</longProp> | |
<boolProp name="graph_aggregated">false</boolProp> | |
<stringProp name="include_sample_labels"></stringProp> | |
<stringProp name="exclude_sample_labels"></stringProp> | |
<stringProp name="start_offset"></stringProp> | |
<stringProp name="end_offset"></stringProp> | |
<boolProp name="include_checkbox_state">false</boolProp> | |
<boolProp name="exclude_checkbox_state">false</boolProp> | |
</kg.apc.jmeter.vizualizers.CorrectedResultCollector> | |
<hashTree/> | |
<kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.ThreadsStateOverTimeGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="jp@gc - Active Threads Over Time" 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">C:\robotframework\snowrf\qa\devtemp_result_50.jtl</stringProp> | |
<longProp name="interval_grouping">500</longProp> | |
<boolProp name="graph_aggregated">false</boolProp> | |
<stringProp name="include_sample_labels"></stringProp> | |
<stringProp name="exclude_sample_labels"></stringProp> | |
<stringProp name="start_offset"></stringProp> | |
<stringProp name="end_offset"></stringProp> | |
<boolProp name="include_checkbox_state">false</boolProp> | |
<boolProp name="exclude_checkbox_state">false</boolProp> | |
</kg.apc.jmeter.vizualizers.CorrectedResultCollector> | |
<hashTree/> | |
</hashTree> | |
</hashTree> | |
</hashTree> | |
</jmeterTestPlan> |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table | |
u_access_request | |
u_customer_contact | |
ticket | |
u_ice_incident |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username | password | |
---|---|---|
abc | 12343 | |
def | 23456 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment