0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-24 03:05:54 +02:00

load tests added for preproduction

This commit is contained in:
moslem-asaad 2025-03-02 11:24:58 +02:00
parent b55577fb1b
commit 50ce942d04
3 changed files with 90 additions and 2 deletions

View File

@ -3,8 +3,6 @@ name: Build and Test
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main ]
jobs:
build:

35
.github/workflows/load-test.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Load Testing with JMeter
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
actions: read
checks: write
jobs:
jmeter:
name: Run JMeter Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run JMeter Action on a test
uses: rbhadti94/apache-jmeter-action@v0.5.0
with:
testFilePath: tests/jmeter/gite-test-plan.jmx
outputReportsFolder: reports/
args: "--loglevel INFO"
- name: Upload JMeter Test Results
uses: actions/upload-artifact@v4
with:
name: jmeter-test-results
path: reports/

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Gitea test">
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="default-users">
<intProp name="ThreadGroup.num_threads">100</intProp>
<intProp name="ThreadGroup.ramp_time">25</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">1</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Home">
<stringProp name="HTTPSampler.path">/</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Moslem Page">
<stringProp name="HTTPSampler.path">/moslem</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree/>
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="gitea-load-tests">
<stringProp name="HTTPSampler.domain">fox-one-promptly.ngrok-free.app</stringProp>
<stringProp name="HTTPSampler.protocol">http</stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
</ConfigTestElement>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>