Created
June 10, 2016 09:26
-
-
Save uorat/97dbe4c529766c4a1c308b481032fb3e to your computer and use it in GitHub Desktop.
JMeter's Scenario for HLS live streaming
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="2.8" jmeter="2.13 r1665067"> | |
<hashTree> | |
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="hls-scenario" enabled="true"> | |
<stringProp name="TestPlan.comments"></stringProp> | |
<boolProp name="TestPlan.functional_mode">false</boolProp> | |
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp> | |
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="ユーザー定義変数" enabled="true"> | |
<collectionProp name="Arguments.arguments"> | |
<elementProp name="HOSTNAME" elementType="Argument"> | |
<stringProp name="Argument.name">HOSTNAME</stringProp> | |
<stringProp name="Argument.value">yourdomain.cdn.local</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="PORT" elementType="Argument"> | |
<stringProp name="Argument.name">PORT</stringProp> | |
<stringProp name="Argument.value">80</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="PATH" elementType="Argument"> | |
<stringProp name="Argument.name">PATH</stringProp> | |
<stringProp name="Argument.value">/live/xxxxxxx</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="MANIFEST" elementType="Argument"> | |
<stringProp name="Argument.name">MANIFEST</stringProp> | |
<stringProp name="Argument.value">/playlist.m3u8</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="SEGMENT" elementType="Argument"> | |
<stringProp name="Argument.name">SEGMENT</stringProp> | |
<stringProp name="Argument.value">2000</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="PROTO" elementType="Argument"> | |
<stringProp name="Argument.name">PROTO</stringProp> | |
<stringProp name="Argument.value">http</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
<elementProp name="TIMEOUT" elementType="Argument"> | |
<stringProp name="Argument.name">TIMEOUT</stringProp> | |
<stringProp name="Argument.value">2000</stringProp> | |
<stringProp name="Argument.metadata">=</stringProp> | |
</elementProp> | |
</collectionProp> | |
</elementProp> | |
<stringProp name="TestPlan.user_define_classpath"></stringProp> | |
</TestPlan> | |
<hashTree> | |
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread group1" enabled="true"> | |
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | |
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="ループコントローラ" 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">1455590300000</longProp> | |
<longProp name="ThreadGroup.end_time">1455590300000</longProp> | |
<boolProp name="ThreadGroup.scheduler">false</boolProp> | |
<stringProp name="ThreadGroup.duration"></stringProp> | |
<stringProp name="ThreadGroup.delay"></stringProp> | |
<boolProp name="ThreadGroup.delayedStart">true</boolProp> | |
</ThreadGroup> | |
<hashTree> | |
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true"> | |
<boolProp name="clearEachIteration">false</boolProp> | |
<boolProp name="useExpires">true</boolProp> | |
<intProp name="maxSize">1</intProp> | |
</CacheManager> | |
<hashTree/> | |
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> | |
<collectionProp name="HeaderManager.headers"> | |
<elementProp name="" elementType="Header"> | |
<stringProp name="Header.name">Accept-Encoding</stringProp> | |
<stringProp name="Header.value">gzip</stringProp> | |
</elementProp> | |
</collectionProp> | |
</HeaderManager> | |
<hashTree/> | |
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Initialization" enabled="true"> | |
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ユーザー定義変数" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> | |
</elementProp> | |
<stringProp name="HTTPSampler.domain">${HOSTNAME}</stringProp> | |
<stringProp name="HTTPSampler.port">${PORT}</stringProp> | |
<stringProp name="HTTPSampler.connect_timeout">${TIMEOUT}</stringProp> | |
<stringProp name="HTTPSampler.response_timeout"></stringProp> | |
<stringProp name="HTTPSampler.protocol">${PROTO}</stringProp> | |
<stringProp name="HTTPSampler.contentEncoding">utf8</stringProp> | |
<stringProp name="HTTPSampler.path"></stringProp> | |
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> | |
<stringProp name="HTTPSampler.concurrentPool">4</stringProp> | |
</ConfigTestElement> | |
<hashTree/> | |
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="get bandwidth (${MANIFEST})" enabled="true"> | |
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ユーザー定義変数" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> | |
</elementProp> | |
<stringProp name="HTTPSampler.domain"></stringProp> | |
<stringProp name="HTTPSampler.port"></stringProp> | |
<stringProp name="HTTPSampler.connect_timeout"></stringProp> | |
<stringProp name="HTTPSampler.response_timeout"></stringProp> | |
<stringProp name="HTTPSampler.protocol"></stringProp> | |
<stringProp name="HTTPSampler.contentEncoding"></stringProp> | |
<stringProp name="HTTPSampler.path">${PATH}${MANIFEST}</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> | |
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp> | |
<boolProp name="HTTPSampler.concurrentDwn">true</boolProp> | |
<boolProp name="HTTPSampler.monitor">true</boolProp> | |
<stringProp name="HTTPSampler.embedded_url_re">http.://load-www\.openrec\.tv/.*</stringProp> | |
</HTTPSamplerProxy> | |
<hashTree> | |
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="extract bandwidth" enabled="true"> | |
<stringProp name="RegexExtractor.useHeaders">false</stringProp> | |
<stringProp name="RegexExtractor.refname">bandwidth</stringProp> | |
<stringProp name="RegexExtractor.regex">chunklist_(.*?)\.m3u8</stringProp> | |
<stringProp name="RegexExtractor.template">$1$</stringProp> | |
<stringProp name="RegexExtractor.default"></stringProp> | |
<stringProp name="RegexExtractor.match_number">1</stringProp> | |
<stringProp name="Sample.scope">all</stringProp> | |
</RegexExtractor> | |
<hashTree/> | |
</hashTree> | |
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="loop for live streaming" enabled="true"> | |
<boolProp name="LoopController.continue_forever">true</boolProp> | |
<intProp name="LoopController.loops">-1</intProp> | |
</LoopController> | |
<hashTree> | |
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="get playlist (${bandwidth}.m3u8)" enabled="true"> | |
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ユーザー定義変数" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> | |
</elementProp> | |
<stringProp name="HTTPSampler.domain"></stringProp> | |
<stringProp name="HTTPSampler.port"></stringProp> | |
<stringProp name="HTTPSampler.connect_timeout"></stringProp> | |
<stringProp name="HTTPSampler.response_timeout"></stringProp> | |
<stringProp name="HTTPSampler.protocol"></stringProp> | |
<stringProp name="HTTPSampler.contentEncoding"></stringProp> | |
<stringProp name="HTTPSampler.path">${PATH}/chunklist_${bandwidth}.m3u8</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> | |
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp> | |
<boolProp name="HTTPSampler.concurrentDwn">true</boolProp> | |
<boolProp name="HTTPSampler.monitor">true</boolProp> | |
<stringProp name="HTTPSampler.embedded_url_re">http.://load-www\.openrec\.tv/.*</stringProp> | |
</HTTPSamplerProxy> | |
<hashTree> | |
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="wait for segment length" enabled="true"> | |
<stringProp name="ConstantTimer.delay">${SEGMENT}</stringProp> | |
</ConstantTimer> | |
<hashTree/> | |
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="extract chunk file" enabled="true"> | |
<stringProp name="RegexExtractor.useHeaders">false</stringProp> | |
<stringProp name="RegexExtractor.refname">chunk</stringProp> | |
<stringProp name="RegexExtractor.regex">media-(.*?)\.ts</stringProp> | |
<stringProp name="RegexExtractor.template">$1$</stringProp> | |
<stringProp name="RegexExtractor.default"></stringProp> | |
<stringProp name="RegexExtractor.match_number">5</stringProp> | |
<stringProp name="Sample.scope">all</stringProp> | |
</RegexExtractor> | |
<hashTree/> | |
</hashTree> | |
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="get chunkfile (${chunk}.ts)" enabled="true"> | |
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="ユーザー定義変数" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> | |
</elementProp> | |
<stringProp name="HTTPSampler.domain"></stringProp> | |
<stringProp name="HTTPSampler.port"></stringProp> | |
<stringProp name="HTTPSampler.connect_timeout"></stringProp> | |
<stringProp name="HTTPSampler.response_timeout"></stringProp> | |
<stringProp name="HTTPSampler.protocol"></stringProp> | |
<stringProp name="HTTPSampler.contentEncoding"></stringProp> | |
<stringProp name="HTTPSampler.path">${PATH}/media-${chunk}.ts</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> | |
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp> | |
<boolProp name="HTTPSampler.concurrentDwn">true</boolProp> | |
<boolProp name="HTTPSampler.monitor">true</boolProp> | |
<stringProp name="HTTPSampler.embedded_url_re">http.://load-www\.openrec\.tv/.*</stringProp> | |
</HTTPSamplerProxy> | |
<hashTree/> | |
</hashTree> | |
</hashTree> | |
<ResultCollector guiclass="StatVisualizer" 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>false</fieldNames> | |
<responseHeaders>false</responseHeaders> | |
<requestHeaders>false</requestHeaders> | |
<responseDataOnError>false</responseDataOnError> | |
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> | |
<assertionsResultsToSave>0</assertionsResultsToSave> | |
<bytes>true</bytes> | |
<threadCounts>true</threadCounts> | |
</value> | |
</objProp> | |
<stringProp name="filename"></stringProp> | |
<boolProp name="useGroupName">true</boolProp> | |
</ResultCollector> | |
<hashTree/> | |
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="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>false</fieldNames> | |
<responseHeaders>false</responseHeaders> | |
<requestHeaders>false</requestHeaders> | |
<responseDataOnError>false</responseDataOnError> | |
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> | |
<assertionsResultsToSave>0</assertionsResultsToSave> | |
<bytes>true</bytes> | |
<threadCounts>true</threadCounts> | |
</value> | |
</objProp> | |
<stringProp name="filename"></stringProp> | |
</ResultCollector> | |
<hashTree/> | |
</hashTree> | |
</hashTree> | |
</jmeterTestPlan> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment