diff options
Diffstat (limited to 'performanceTests/environment/jmeterVM')
4 files changed, 296 insertions, 0 deletions
diff --git a/performanceTests/environment/jmeterVM/collectd/collectd.conf b/performanceTests/environment/jmeterVM/collectd/collectd.conf new file mode 100644 index 00000000..ddf15715 --- /dev/null +++ b/performanceTests/environment/jmeterVM/collectd/collectd.conf @@ -0,0 +1,30 @@ +FQDNLookup true + +LoadPlugin syslog +LoadPlugin cpu +LoadPlugin memory +LoadPlugin network + +<Plugin syslog> + LogLevel info +</Plugin> + +<Plugin cpu> + ReportByCpu false + ReportByState false + ValuesPercentage true + Interval 5 +</Plugin> + +<Plugin memory> + ValuesAbsolute false + ValuesPercentage true +</Plugin> + +<Plugin network> + Server WORKER_IP "30003" +</Plugin> + +<Include "/etc/collectd/collectd.conf.d"> + Filter "*.conf" +</Include> diff --git a/performanceTests/environment/jmeterVM/collectd/install_collectd.sh b/performanceTests/environment/jmeterVM/collectd/install_collectd.sh new file mode 100755 index 00000000..4c8ab593 --- /dev/null +++ b/performanceTests/environment/jmeterVM/collectd/install_collectd.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +sudo apt-get update && sudo apt-get install collectd -y +sudo cp vesPerformanceTestsEnv/collectd/collectd.conf /etc/collectd/collectd.conf +sudo service collectd restart + diff --git a/performanceTests/environment/jmeterVM/jmeter/run_jmeter.sh b/performanceTests/environment/jmeterVM/jmeter/run_jmeter.sh new file mode 100644 index 00000000..4b7477a7 --- /dev/null +++ b/performanceTests/environment/jmeterVM/jmeter/run_jmeter.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [ "$#" -ne 2 ]; then + echo "Illegal number of parameters. Expected two parameters - performance tests env directory name and test scenario file name" + exit 1 +fi + +performance_tests_env_directory=$1 +test_scenario_file=$2 + +docker pull justb4/jmeter +export volume_path=~/${performance_tests_env_directory}/jmeter && \ + export jmeter_path=/mnt/jmeter && \ + docker run \ + --volume "${volume_path}":${jmeter_path} \ + justb4/jmeter \ + -n -X \ + -t ${jmeter_path}/${test_scenario_file}
\ No newline at end of file diff --git a/performanceTests/environment/jmeterVM/jmeter/test_scenario.jmx b/performanceTests/environment/jmeterVM/jmeter/test_scenario.jmx new file mode 100644 index 00000000..6cfb08dc --- /dev/null +++ b/performanceTests/environment/jmeterVM/jmeter/test_scenario.jmx @@ -0,0 +1,242 @@ +<?xml version="1.0" encoding="UTF-8"?> +<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.3"> + <hashTree> + <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Https ves collector /eventlistener/v7 BasicAuth" 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> + <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true"> + <stringProp name="ThreadGroup.on_sample_error">startnextloop</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">250</stringProp> + <stringProp name="ThreadGroup.ramp_time">10</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> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" 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">{
 + "event": {
 + "commonEventHeader": {
 + "version": "4.0.1",
 + "vesEventListenerVersion": "7.0.1",
 + "domain": "fault",
 + "eventName": "Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion",
 + "eventId": "fault0000245",
 + "sequence": 1,
 + "priority": "High",
 + "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234",
 + "reportingEntityName": "ibcx0001vm002oam001",
 + "sourceId": "de305d54-75b4-431b-dupa-eb6b9e546014",
 + "sourceName": "scfx0001vm002cap001",
 + "nfVendorName": "SomeNamee",
 + "nfNamingCode": "scfx",
 + "nfcNamingCode": "ssc",
 + "startEpochMicrosec": 1413378172000000,
 + "lastEpochMicrosec": 1413378172000000,
 + "timeZoneOffset": "UTC-05:30"
 + },
 + "faultFields": {
 + "faultFieldsVersion": "4.0",
 + "alarmCondition": "PilotNumberPoolExhaustion",
 + "eventSourceType": "other",
 + "specificProblem": "Calls cannot complete - pilot numbers are unavailable",
 + "eventSeverity": "CRITICAL",
 + "vfStatus": "Active",
 + "alarmAdditionalInformation": {
 + "PilotNumberPoolSize": "1000"
 + }
 + }
 + }
 +}
 +</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + </collectionProp> + </elementProp> + <stringProp name="HTTPSampler.domain">WORKER_IP</stringProp> + <stringProp name="HTTPSampler.port">30417</stringProp> + <stringProp name="HTTPSampler.protocol">https</stringProp> + <stringProp name="HTTPSampler.contentEncoding"></stringProp> + <stringProp name="HTTPSampler.path">/eventListener/v7</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> + <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" 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/> + <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"></stringProp> + </ResultCollector> + <hashTree/> + </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">https://WORKER_IP:30417/eventListener/v7</stringProp> + <stringProp name="Authorization.username">sample1</stringProp> + <stringProp name="Authorization.password">sample1</stringProp> + <stringProp name="Authorization.domain"></stringProp> + <stringProp name="Authorization.realm"></stringProp> + </elementProp> + </collectionProp> + <boolProp name="AuthManager.controlledByThreadGroup">false</boolProp> + </AuthManager> + <hashTree/> + <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> + </collectionProp> + </HeaderManager> + <hashTree/> + <BackendListener guiclass="BackendListenerGui" testclass="BackendListener" testname="Backend Listener" enabled="true"> + <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true"> + <collectionProp name="Arguments.arguments"> + <elementProp name="influxdbMetricsSender" elementType="Argument"> + <stringProp name="Argument.name">influxdbMetricsSender</stringProp> + <stringProp name="Argument.value">org.apache.jmeter.visualizers.backend.influxdb.HttpMetricsSender</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="influxdbUrl" elementType="Argument"> + <stringProp name="Argument.name">influxdbUrl</stringProp> + <stringProp name="Argument.value">http://WORKER_IP:30002/write?db=jmeter</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="application" elementType="Argument"> + <stringProp name="Argument.name">application</stringProp> + <stringProp name="Argument.value">ves</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="measurement" elementType="Argument"> + <stringProp name="Argument.name">measurement</stringProp> + <stringProp name="Argument.value">jmeter</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="summaryOnly" elementType="Argument"> + <stringProp name="Argument.name">summaryOnly</stringProp> + <stringProp name="Argument.value">false</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="samplersRegex" elementType="Argument"> + <stringProp name="Argument.name">samplersRegex</stringProp> + <stringProp name="Argument.value">.*</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="percentiles" elementType="Argument"> + <stringProp name="Argument.name">percentiles</stringProp> + <stringProp name="Argument.value">90;95;99</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="testTitle" elementType="Argument"> + <stringProp name="Argument.name">testTitle</stringProp> + <stringProp name="Argument.value">Test name</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="eventTags" elementType="Argument"> + <stringProp name="Argument.name">eventTags</stringProp> + <stringProp name="Argument.value"></stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + </collectionProp> + </elementProp> + <stringProp name="classname">org.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient</stringProp> + </BackendListener> + <hashTree/> + </hashTree> + </hashTree> + </hashTree> +</jmeterTestPlan> |