Skip to content

Commit

Permalink
setup stage test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
clauyan committed Nov 19, 2024
1 parent b825bcb commit 52d0954
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/trigger-loadtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
description: "Branch to take test code and helm/cron setup from"
required: false
type: string
default: main
default: "SPSH-1389"
branch_img:
description: "Branch to take Dockerfile/img from"
required: false
Expand All @@ -18,12 +18,12 @@ on:
description: "sets PATTERN env var used as k6 input"
required: false
type: string
default: "login"
default: "saml"
config:
description: "sets CONFIG env var used as k6 input"
required: false
type: string
default: "debug"
default: "plateau"
max_vus:
description: "sets the maximum number of virtual users"
required: false
Expand All @@ -33,12 +33,12 @@ on:
description: "name of test scenario defined in values.yaml"
type: string
required: true
default: dev-scenario
default: staging-scenario
execute:
description: "execute cronjob scenario after install"
type: boolean
required: true
default: false
default: true

jobs:
install_loadtest:
Expand Down
12 changes: 12 additions & 0 deletions loadtest/util/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export enum CONFIG {
SPIKE = "spike",
STRESS = "stress",
BREAKPOINT = "breakpoint",
PLATEAU = "plateau",
DEBUG = "debug",
}
export function getConfig(): CONFIG {
Expand Down Expand Up @@ -48,6 +49,17 @@ export function getDefaultOptions() {
http_req_duration: [{ threshold: "p(95)<5000", abortOnFail: true }],
},
};
case CONFIG.PLATEAU:
return {
stages: [
// ramp up
{ duration: "1m", target: maxVUs },
// plateau
{ duration: "5m", target: maxVUs },
// ramp down
{ duration: "1m", target: 0 },
],
};
case CONFIG.DEBUG:
return {
stages: [{ duration: "1s", target: maxVUs }],
Expand Down

0 comments on commit 52d0954

Please sign in to comment.