This commit is contained in:
Nikita Nallamothu 2023-01-08 14:23:44 +05:30
Родитель fad5834043
Коммит 6bb456553b
7 изменённых файлов: 259 добавлений и 5 удалений

10
.github/workflows/podcast-loadtest.yml поставляемый
Просмотреть файл

@ -7,8 +7,8 @@ on:
workflow_dispatch:
env:
LOAD_TEST_RESOURCE: "podcast-alt"
LOAD_TEST_RESOURCE_GROUP: "podcast-alt-rg"
LOAD_TEST_RESOURCE: "Demo-Podcast-EUS"
LOAD_TEST_RESOURCE_GROUP: "demo-podcast"
LOAD_TEST_LOCATION: "East US"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
@ -40,13 +40,13 @@ jobs:
uses: azure/arm-deploy@v1
with:
resourceGroupName: ${{ env.LOAD_TEST_RESOURCE_GROUP }}
template: ./loadTest/template.json
parameters: ./loadTest/parameters.json name=${{ env.LOAD_TEST_RESOURCE }} location="${{ env.LOAD_TEST_LOCATION }}"
template: ./loadTest/ARM Template/template.json
parameters: ./loadTest/ARM Template/parameters.json name=${{ env.LOAD_TEST_RESOURCE }} location="${{ env.LOAD_TEST_LOCATION }}"
- name: 'Azure Load Testing'
uses: azure/load-testing@v1
with:
loadTestConfigFile: 'podcast-load.yml'
loadTestConfigFile: 'loadTest/podcast-load.yml'
loadTestResource: ${{ env.LOAD_TEST_RESOURCE }}
resourceGroup: ${{ env.LOAD_TEST_RESOURCE_GROUP }}

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -0,0 +1,222 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.5">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Demo Podcast Test" enabled="true">
<stringProp name="TestPlan.comments">This test plan was created by the BlazeMeter converter v.3.1.23. Please contact support@blazemeter.com for further support.</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" 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="BASE_URL_1" elementType="Argument">
<stringProp name="Argument.name">BASE_URL_1</stringProp>
<stringProp name="Argument.value">demo-podcastwebapp.azurewebsites.net</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="BASE_URL_2" elementType="Argument">
<stringProp name="Argument.name">BASE_URL_2</stringProp>
<stringProp name="Argument.value">dotnetpodcasts.azurewebsites.net</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="BASE_URL_3" elementType="Argument">
<stringProp name="Argument.name">BASE_URL_3</stringProp>
<stringProp name="Argument.value">demopodcastapica.greenpond-f6ebfedd.eastus.azurecontainerapps.io</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</Arguments>
<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" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<intProp name="LoopController.loops">-1</intProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">${__P(threadCount,1)}</stringProp>
<stringProp name="ThreadGroup.ramp_time">${__P(rampUpSeconds,1)}</stringProp>
<boolProp name="ThreadGroup.scheduler">true</boolProp>
<stringProp name="ThreadGroup.duration">${__P(durationSeconds,30)}</stringProp>
<stringProp name="ThreadGroup.delay">0</stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Podcast page" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${BASE_URL_1}</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">show/${Id}</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="api-version" elementType="Header">
<stringProp name="Header.name">api-version</stringProp>
<stringProp name="Header.value">1.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">*/*</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Homepage" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${BASE_URL_1}</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.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="Upgrade-Insecure-Requests" elementType="Header">
<stringProp name="Header.name">Upgrade-Insecure-Requests</stringProp>
<stringProp name="Header.value">1</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,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="Uniform Random Timer" enabled="true">
<stringProp name="RandomTimer.range">0.0</stringProp>
<stringProp name="ConstantTimer.delay">0</stringProp>
<stringProp name="TestPlan.comments">Recorded time was 0 milliseconds</stringProp>
</UniformRandomTimer>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Discover page" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${BASE_URL_1}</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">discover</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="Upgrade-Insecure-Requests" elementType="Header">
<stringProp name="Header.name">Upgrade-Insecure-Requests</stringProp>
<stringProp name="Header.value">1</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,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="Uniform Random Timer" enabled="true">
<stringProp name="RandomTimer.range">11255.0</stringProp>
<stringProp name="ConstantTimer.delay">5627.5</stringProp>
<stringProp name="TestPlan.comments">Recorded time was 11255 milliseconds</stringProp>
</UniformRandomTimer>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Search page" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="limit" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.name">limit</stringProp>
<stringProp name="Argument.value">10</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
</elementProp>
<elementProp name="term" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.name">term</stringProp>
<stringProp name="Argument.value">${Name}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${BASE_URL_1}</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">shows</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="api-version" elementType="Header">
<stringProp name="Header.name">api-version</stringProp>
<stringProp name="Header.value">1.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">*/*</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
<stringProp name="delimiter">,</stringProp>
<stringProp name="fileEncoding"></stringProp>
<stringProp name="filename">Shows.csv</stringProp>
<boolProp name="ignoreFirstLine">false</boolProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="variableNames">Name,Id</stringProp>
</CSVDataSet>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>

10
loadTest/Shows.csv Normal file
Просмотреть файл

@ -0,0 +1,10 @@
Merge,facd94eb-8ef9-414a-e72a-08dae7f770f7
Rocks,f3bfb1cf-395a-4c15-e724-08dae7f770f7
CodeNewbie,191e2d48-6722-4f75-e728-08dae7f770f7
Hanselminutes,e5a6f6c9-feec-4883-e722-08dae7f770f7
Mobile,4d812eab-e7c6-4ed9-e71c-08dae7f770f7
Adventures,9c4751d2-d102-4947-e71f-08dae7f770f7
future,01c23abf-8211-422a-e72b-08dae7f770f7
MAUI,8617def2-5021-49e7-e726-08dae7f770f7
Monsters,0befb23c-5991-4e2c-e727-08dae7f770f7
Microsoft,e0f61f7f-79c4-47a6-e723-08dae7f770f7
1 Merge facd94eb-8ef9-414a-e72a-08dae7f770f7
2 Rocks f3bfb1cf-395a-4c15-e724-08dae7f770f7
3 CodeNewbie 191e2d48-6722-4f75-e728-08dae7f770f7
4 Hanselminutes e5a6f6c9-feec-4883-e722-08dae7f770f7
5 Mobile 4d812eab-e7c6-4ed9-e71c-08dae7f770f7
6 Adventures 9c4751d2-d102-4947-e71f-08dae7f770f7
7 future 01c23abf-8211-422a-e72b-08dae7f770f7
8 MAUI 8617def2-5021-49e7-e726-08dae7f770f7
9 Monsters 0befb23c-5991-4e2c-e727-08dae7f770f7
10 Microsoft e0f61f7f-79c4-47a6-e723-08dae7f770f7

14
loadTest/config.yaml Normal file
Просмотреть файл

@ -0,0 +1,14 @@
testName: demo-podcast-vnet
testPlan: Demo podcast test.jmx
description: ''
engineInstances: 5
subnetId: /subscriptions/7c71b563-0dc0-4bc0-bcf6-06f8f0516c7a/resourceGroups/demo-podcast/providers/Microsoft.Network/virtualNetworks/demo-podcast-vnet/subnets/default
splitAllCSVs: True
configurationFiles:
- Shows.csv
failureCriteria: []
properties:
userPropertyFile: load.properties
certificates:
- name: podcastcert
value: https://demo-podcast-akv.vault.azure.net/certificates/podcastcert

8
loadTest/load.properties Normal file
Просмотреть файл

@ -0,0 +1,8 @@
# peak-load.properties
# User properties for testing peak load
threadCount=75
rampUpSeconds=90
durationSeconds=300
# Override default JMeter properties
jmeter.save.saveservice.url=true