Instantly share code, notes, and snippets.
Created
January 5, 2021 11:04
-
Star
(5)
5
You must be signed in to star a gist -
Fork
(3)
3
You must be signed in to fork a gist
-
Save malys/975ab3c38f8026b43a3f5b9d2d529be3 to your computer and use it in GitHub Desktop.
[Authorization code flow] #keycloak #jmeter
This file contains 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.2.1"> | |
<hashTree> | |
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Authorization Code Flow" enabled="true"> | |
<stringProp name="TestPlan.comments">add CookieManager.save.cookies=true to user.properties </stringProp> | |
<boolProp name="TestPlan.functional_mode">false</boolProp> | |
<boolProp name="TestPlan.serialize_threadgroups">true</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="scheme" elementType="Argument"> | |
<stringProp name="Argument.name">scheme</stringProp> | |
<stringProp name="Argument.value">https</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="host" elementType="Argument"> | |
<stringProp name="Argument.name">host</stringProp> | |
<stringProp name="Argument.value">keycloak host</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="scope" elementType="Argument"> | |
<stringProp name="Argument.name">scope</stringProp> | |
<stringProp name="Argument.value">openid profile</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="username" elementType="Argument"> | |
<stringProp name="Argument.name">username</stringProp> | |
<stringProp name="Argument.value"></stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="password" elementType="Argument"> | |
<stringProp name="Argument.name">password</stringProp> | |
<stringProp name="Argument.value"></stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="redirect_uri" elementType="Argument"> | |
<stringProp name="Argument.name">redirect_uri</stringProp> | |
<stringProp name="Argument.value">http://localhost</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="realm" elementType="Argument"> | |
<stringProp name="Argument.name">realm</stringProp> | |
<stringProp name="Argument.value"></stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="client_id" elementType="Argument"> | |
<stringProp name="Argument.name">client_id</stringProp> | |
<stringProp name="Argument.value"></stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="client_secret" elementType="Argument"> | |
<stringProp name="Argument.name">client_secret</stringProp> | |
<stringProp name="Argument.value"></stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="client_header" elementType="Argument"> | |
<stringProp name="Argument.name">client_header</stringProp> | |
<stringProp name="Argument.value">to_override_in_jsr223</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="base" elementType="Argument"> | |
<stringProp name="Argument.name">base</stringProp> | |
<stringProp name="Argument.value">/auth/realms/${realm}</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="host_resource" elementType="Argument"> | |
<stringProp name="Argument.name">host_resource</stringProp> | |
<stringProp name="Argument.value"></stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="path_resource" elementType="Argument"> | |
<stringProp name="Argument.name">path_resource</stringProp> | |
<stringProp name="Argument.value"></stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
</collectionProp> | |
</elementProp> | |
<stringProp name="TestPlan.user_define_classpath"></stringProp> | |
</TestPlan> | |
<hashTree> | |
<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">${host}</stringProp> | |
<stringProp name="HTTPSampler.port"></stringProp> | |
<stringProp name="HTTPSampler.protocol">https</stringProp> | |
<stringProp name="HTTPSampler.contentEncoding"></stringProp> | |
<stringProp name="HTTPSampler.path"></stringProp> | |
<stringProp name="HTTPSampler.concurrentPool">6</stringProp> | |
<stringProp name="HTTPSampler.connect_timeout"></stringProp> | |
<stringProp name="HTTPSampler.response_timeout"></stringProp> | |
</ConfigTestElement> | |
<hashTree/> | |
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" 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> | |
<longProp name="ThreadGroup.start_time">1479823133000</longProp> | |
<longProp name="ThreadGroup.end_time">1479823133000</longProp> | |
<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> | |
<GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Simple Controller" enabled="true"/> | |
<hashTree> | |
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true"> | |
<boolProp name="clearEachIteration">false</boolProp> | |
<boolProp name="useExpires">false</boolProp> | |
<boolProp name="CacheManager.controlledByThread">false</boolProp> | |
</CacheManager> | |
<hashTree/> | |
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true"> | |
<collectionProp name="CookieManager.cookies"/> | |
<boolProp name="CookieManager.clearEachIteration">false</boolProp> | |
<boolProp name="CookieManager.controlledByThreadGroup">false</boolProp> | |
<stringProp name="CookieManager.policy">netscape</stringProp> | |
</CookieManager> | |
<hashTree/> | |
<CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="session_state_counter" enabled="true"> | |
<stringProp name="CounterConfig.start">1</stringProp> | |
<stringProp name="CounterConfig.end"></stringProp> | |
<stringProp name="CounterConfig.incr">1</stringProp> | |
<stringProp name="CounterConfig.name">session_state_counter</stringProp> | |
<stringProp name="CounterConfig.format"></stringProp> | |
<boolProp name="CounterConfig.per_user">false</boolProp> | |
</CounterConfig> | |
<hashTree/> | |
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="authorize" enabled="true"> | |
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | |
<collectionProp name="Arguments.arguments"> | |
<elementProp name="scope" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">true</boolProp> | |
<stringProp name="Argument.value">${scope}</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">scope</stringProp> | |
</elementProp> | |
<elementProp name="response_type" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">false</boolProp> | |
<stringProp name="Argument.value">code</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">response_type</stringProp> | |
</elementProp> | |
<elementProp name="redirect_uri" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">true</boolProp> | |
<stringProp name="Argument.value">${redirect_uri}</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">redirect_uri</stringProp> | |
</elementProp> | |
<elementProp name="client_id" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">true</boolProp> | |
<stringProp name="Argument.value">${client_id}</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">client_id</stringProp> | |
</elementProp> | |
<elementProp name="state" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">false</boolProp> | |
<stringProp name="Argument.value">993bb8d7-323d-b5ee-db78-f976a59d8284</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">state</stringProp> | |
</elementProp> | |
<elementProp name="" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">false</boolProp> | |
<stringProp name="Argument.value"></stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
</elementProp> | |
</collectionProp> | |
</elementProp> | |
<stringProp name="HTTPSampler.domain">${host}</stringProp> | |
<stringProp name="HTTPSampler.port"></stringProp> | |
<stringProp name="HTTPSampler.protocol">${scheme}</stringProp> | |
<stringProp name="HTTPSampler.contentEncoding"></stringProp> | |
<stringProp name="HTTPSampler.path">${base}/protocol/openid-connect/auth</stringProp> | |
<stringProp name="HTTPSampler.method">GET</stringProp> | |
<boolProp name="HTTPSampler.follow_redirects">false</boolProp> | |
<boolProp name="HTTPSampler.auto_redirects">true</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> | |
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor : submit_url" enabled="true"> | |
<stringProp name="RegexExtractor.useHeaders">false</stringProp> | |
<stringProp name="RegexExtractor.refname">submit_url</stringProp> | |
<stringProp name="RegexExtractor.regex">action="(.+?)" </stringProp> | |
<stringProp name="RegexExtractor.template">$1$</stringProp> | |
<stringProp name="RegexExtractor.default"></stringProp> | |
<stringProp name="RegexExtractor.match_number"></stringProp> | |
</RegexExtractor> | |
<hashTree/> | |
<JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="Post-Processeur JSR223" enabled="true"> | |
<stringProp name="scriptLanguage">groovy</stringProp> | |
<stringProp name="parameters"></stringProp> | |
<stringProp name="filename"></stringProp> | |
<stringProp name="cacheKey">true</stringProp> | |
<stringProp name="script">vars.put("submit_url",vars.get("submit_url").replace("&amp;","&"));</stringProp> | |
</JSR223PostProcessor> | |
<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> | |
<threadCounts>true</threadCounts> | |
<idleTime>true</idleTime> | |
</value> | |
</objProp> | |
<stringProp name="filename"></stringProp> | |
</ResultCollector> | |
<hashTree/> | |
</hashTree> | |
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="code" enabled="true"> | |
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true"> | |
<collectionProp name="Arguments.arguments"> | |
<elementProp name="username" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">true</boolProp> | |
<stringProp name="Argument.name">username</stringProp> | |
<stringProp name="Argument.value">${username}</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
</elementProp> | |
<elementProp name="password" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">true</boolProp> | |
<stringProp name="Argument.name">password</stringProp> | |
<stringProp name="Argument.value">${password}</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
</elementProp> | |
</collectionProp> | |
</elementProp> | |
<stringProp name="HTTPSampler.domain">${host}</stringProp> | |
<stringProp name="HTTPSampler.port">443</stringProp> | |
<stringProp name="HTTPSampler.protocol">${scheme}</stringProp> | |
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp> | |
<stringProp name="HTTPSampler.path">${submit_url}</stringProp> | |
<stringProp name="HTTPSampler.method">POST</stringProp> | |
<boolProp name="HTTPSampler.follow_redirects">false</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">Detected the start of a redirect chain</stringProp> | |
</HTTPSamplerProxy> | |
<hashTree> | |
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> | |
<collectionProp name="HeaderManager.headers"> | |
<elementProp name="Content-Type" elementType="Header"> | |
<stringProp name="Header.name">Content-Type</stringProp> | |
<stringProp name="Header.value">application/x-www-form-urlencoded</stringProp> | |
</elementProp> | |
<elementProp name="Accept-Language" elementType="Header"> | |
<stringProp name="Header.name">Accept-Language</stringProp> | |
<stringProp name="Header.value">en-US,en;q=0.5</stringProp> | |
</elementProp> | |
<elementProp name="Accept" elementType="Header"> | |
<stringProp name="Header.name">Accept</stringProp> | |
<stringProp name="Header.value">text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</stringProp> | |
</elementProp> | |
<elementProp name="User-Agent" elementType="Header"> | |
<stringProp name="Header.name">User-Agent</stringProp> | |
<stringProp name="Header.value">Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0</stringProp> | |
</elementProp> | |
<elementProp name="Referer" elementType="Header"> | |
<stringProp name="Header.name">Referer</stringProp> | |
<stringProp name="Header.value">${base}/protocol/openid-connect/auth</stringProp> | |
</elementProp> | |
<elementProp name="Accept-Encoding" elementType="Header"> | |
<stringProp name="Header.name">Accept-Encoding</stringProp> | |
<stringProp name="Header.value">gzip, deflate</stringProp> | |
</elementProp> | |
</collectionProp> | |
</HeaderManager> | |
<hashTree/> | |
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor : location" enabled="true"> | |
<stringProp name="RegexExtractor.useHeaders">true</stringProp> | |
<stringProp name="RegexExtractor.refname">location</stringProp> | |
<stringProp name="RegexExtractor.regex">Location: .+\/(.*?)\n</stringProp> | |
<stringProp name="RegexExtractor.template">$1$</stringProp> | |
<stringProp name="RegexExtractor.default"></stringProp> | |
<stringProp name="RegexExtractor.match_number"></stringProp> | |
</RegexExtractor> | |
<hashTree/> | |
<JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="Post-Processeur JSR223" enabled="true"> | |
<stringProp name="scriptLanguage">groovy</stringProp> | |
<stringProp name="parameters"></stringProp> | |
<stringProp name="filename"></stringProp> | |
<stringProp name="cacheKey">true</stringProp> | |
<stringProp name="script">String[] tab=vars.get("location").split("code="); | |
vars.put("code",tab[1]);</stringProp> | |
</JSR223PostProcessor> | |
<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> | |
<threadCounts>true</threadCounts> | |
<idleTime>true</idleTime> | |
</value> | |
</objProp> | |
<stringProp name="filename"></stringProp> | |
</ResultCollector> | |
<hashTree/> | |
</hashTree> | |
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="access_token" enabled="true"> | |
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | |
<collectionProp name="Arguments.arguments"> | |
<elementProp name="code" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">false</boolProp> | |
<stringProp name="Argument.value">${code}</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">code</stringProp> | |
</elementProp> | |
<elementProp name="redirect_uri" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">true</boolProp> | |
<stringProp name="Argument.value">${redirect_uri}</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">redirect_uri</stringProp> | |
</elementProp> | |
<elementProp name="client_id" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">true</boolProp> | |
<stringProp name="Argument.value">${client_id}</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">client_id</stringProp> | |
</elementProp> | |
<elementProp name="state" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">false</boolProp> | |
<stringProp name="Argument.value">993bb8d7-323d-b5ee-db78-f976a59d8284</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">state</stringProp> | |
</elementProp> | |
<elementProp name="client_secret" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">false</boolProp> | |
<stringProp name="Argument.value">${client_secret}</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">client_secret</stringProp> | |
</elementProp> | |
<elementProp name="grant_type" elementType="HTTPArgument"> | |
<boolProp name="HTTPArgument.always_encode">false</boolProp> | |
<stringProp name="Argument.value">authorization_code</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
<boolProp name="HTTPArgument.use_equals">true</boolProp> | |
<stringProp name="Argument.name">grant_type</stringProp> | |
</elementProp> | |
</collectionProp> | |
</elementProp> | |
<stringProp name="HTTPSampler.domain">${host}</stringProp> | |
<stringProp name="HTTPSampler.port"></stringProp> | |
<stringProp name="HTTPSampler.protocol">${scheme}</stringProp> | |
<stringProp name="HTTPSampler.contentEncoding"></stringProp> | |
<stringProp name="HTTPSampler.path">${base}/protocol/openid-connect/token</stringProp> | |
<stringProp name="HTTPSampler.method">POST</stringProp> | |
<boolProp name="HTTPSampler.follow_redirects">false</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> | |
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> | |
<collectionProp name="HeaderManager.headers"> | |
<elementProp name="Content-Type" elementType="Header"> | |
<stringProp name="Header.name">Content-Type</stringProp> | |
<stringProp name="Header.value">application/x-www-form-urlencoded</stringProp> | |
</elementProp> | |
<elementProp name="Accept-Language" elementType="Header"> | |
<stringProp name="Header.name">Accept-Language</stringProp> | |
<stringProp name="Header.value">en-US,en;q=0.5</stringProp> | |
</elementProp> | |
<elementProp name="Accept" elementType="Header"> | |
<stringProp name="Header.name">Accept</stringProp> | |
<stringProp name="Header.value">text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</stringProp> | |
</elementProp> | |
<elementProp name="User-Agent" elementType="Header"> | |
<stringProp name="Header.name">User-Agent</stringProp> | |
<stringProp name="Header.value">Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0</stringProp> | |
</elementProp> | |
<elementProp name="Referer" elementType="Header"> | |
<stringProp name="Header.name">Referer</stringProp> | |
<stringProp name="Header.value">${base}/protocol/openid-connect/auth</stringProp> | |
</elementProp> | |
<elementProp name="Accept-Encoding" elementType="Header"> | |
<stringProp name="Header.name">Accept-Encoding</stringProp> | |
<stringProp name="Header.value">gzip, deflate</stringProp> | |
</elementProp> | |
</collectionProp> | |
</HeaderManager> | |
<hashTree/> | |
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor : access_token" enabled="true"> | |
<stringProp name="RegexExtractor.useHeaders">false</stringProp> | |
<stringProp name="RegexExtractor.refname">access_token</stringProp> | |
<stringProp name="RegexExtractor.regex">"access_token":"(.+?)"</stringProp> | |
<stringProp name="RegexExtractor.template">$1$</stringProp> | |
<stringProp name="RegexExtractor.default"></stringProp> | |
<stringProp name="RegexExtractor.match_number">1</stringProp> | |
</RegexExtractor> | |
<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> | |
<threadCounts>true</threadCounts> | |
<idleTime>true</idleTime> | |
</value> | |
</objProp> | |
<stringProp name="filename"></stringProp> | |
</ResultCollector> | |
<hashTree/> | |
</hashTree> | |
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="resources" enabled="true"> | |
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> | |
</elementProp> | |
<stringProp name="HTTPSampler.domain">${host_resource}</stringProp> | |
<stringProp name="HTTPSampler.port">443</stringProp> | |
<stringProp name="HTTPSampler.protocol">https${scheme}</stringProp> | |
<stringProp name="HTTPSampler.contentEncoding"></stringProp> | |
<stringProp name="HTTPSampler.path">${path_resource}</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> | |
<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/x-www-form-urlencoded</stringProp> | |
</elementProp> | |
</collectionProp> | |
</HeaderManager> | |
<hashTree/> | |
<JSR223PreProcessor guiclass="TestBeanGUI" testclass="JSR223PreProcessor" testname="Pré-Processeur JSR223" enabled="true"> | |
<stringProp name="scriptLanguage">groovy</stringProp> | |
<stringProp name="parameters"></stringProp> | |
<stringProp name="filename"></stringProp> | |
<stringProp name="cacheKey">true</stringProp> | |
<stringProp name="script">import org.apache.jmeter.protocol.http.control.Header; | |
sampler.getHeaderManager().add(new Header("Authorization","Bearer " + vars.get("access_token")));</stringProp> | |
</JSR223PreProcessor> | |
<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> | |
<threadCounts>true</threadCounts> | |
<idleTime>true</idleTime> | |
</value> | |
</objProp> | |
<stringProp name="filename"></stringProp> | |
</ResultCollector> | |
<hashTree/> | |
</hashTree> | |
</hashTree> | |
<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> | |
<threadCounts>true</threadCounts> | |
<idleTime>true</idleTime> | |
</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> | |
<threadCounts>true</threadCounts> | |
<idleTime>true</idleTime> | |
</value> | |
</objProp> | |
<stringProp name="filename"></stringProp> | |
</ResultCollector> | |
<hashTree/> | |
<ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="Graph Results" 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> | |
<threadCounts>true</threadCounts> | |
<idleTime>true</idleTime> | |
</value> | |
</objProp> | |
<stringProp name="filename"></stringProp> | |
</ResultCollector> | |
<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> | |
<threadCounts>true</threadCounts> | |
<idleTime>true</idleTime> | |
</value> | |
</objProp> | |
<stringProp name="filename"></stringProp> | |
</ResultCollector> | |
<hashTree/> | |
<ResultCollector guiclass="ObsoleteGui" testclass="ResultCollector" testname="Monitor Results" 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> | |
<threadCounts>true</threadCounts> | |
<idleTime>true</idleTime> | |
</value> | |
</objProp> | |
<stringProp name="filename"></stringProp> | |
</ResultCollector> | |
<hashTree/> | |
<Summariser guiclass="SummariserGui" testclass="Summariser" testname="Generate Summary Results" enabled="true"/> | |
<hashTree/> | |
</hashTree> | |
</hashTree> | |
</hashTree> | |
</jmeterTestPlan> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment