-
Notifications
You must be signed in to change notification settings - Fork 1
New: [ELI-418] - Performance tests #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Karthikeyannhs
wants to merge
50
commits into
main
Choose a base branch
from
performance-testing-spike
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
43305f0
initial push
adam-wallernhs1 0665cf7
performance tests initial commit
Karthikeyannhs 640ee00
Chore: [ELI-605] - Changes to update nhsd-application-id to NHSE-Prod…
adam-wallernhs1 e5d2802
pytest integrated with performance tests
Karthikeyannhs c67004e
locust updated
Karthikeyannhs 68d6c4f
fixed the test cases
Karthikeyannhs 4471fe6
added test data
Karthikeyannhs 266f4bf
temp file for nhs numbers
Karthikeyannhs c73a920
fix
Karthikeyannhs 524c16f
html output
Karthikeyannhs 234a2fd
performance test workflow
Karthikeyannhs 0b5754b
test performance
Karthikeyannhs e15455f
added locust to poetry
Karthikeyannhs a105e09
certs file creation for performance tests
Karthikeyannhs 5b2b554
report.html as artifact
Karthikeyannhs 7a28e4d
reused eligibility client
Karthikeyannhs 156ba77
linting
Karthikeyannhs 293db37
formating
Karthikeyannhs 09e396c
workflow updated
Karthikeyannhs dde4459
Chore: [ELI-592] - NBS COVID Scenarios (#124)
adam-wallernhs1 bd14463
Chore: [ELI-9875] - allow the consumer mapping config in preprod (#125)
adam-wallernhs1 6f53bb9
Upgrade: [dependabot] - bump actions/checkout from 4 to 6 (#104)
dependabot[bot] 917539b
Upgrade: [dependabot] - bump npm from 11.6.2 to 11.6.3 (#103)
dependabot[bot] 2e79f2a
Upgrade: [dependabot] - bump asdf-vm/actions from 4.0.0 to 4.0.1 (#102)
dependabot[bot] 8e8e065
Merge branch 'main' into performance-testing-spike
Karthikeyannhs 23a6eb9
test commit
Karthikeyannhs b7ba794
pre-commit fixes
Karthikeyannhs af57e52
wip
Karthikeyannhs a08befd
revert last commit
Karthikeyannhs 0143f80
Upgrade: [dependabot] - bump boto3 from 1.40.50 to 1.40.62 (#97)
dependabot[bot] eaafc5b
Chore: [ELI-632] - multiple iterations with new text (#129)
adam-wallernhs1 48379eb
Chore: [ELI-9999] - Ensure NBS and My Vaccs configs Remain in preprod…
adam-wallernhs1 052e320
poetry lock
Karthikeyannhs 8190894
Merge branch 'main' into performance-testing-spike
Karthikeyannhs 45368af
poetry lock
Karthikeyannhs 8236f11
fixed locust error report
Karthikeyannhs 86301c7
headers from csv
Karthikeyannhs 18defe2
removed hardcodings
Karthikeyannhs dc4b552
assert based on response time
Karthikeyannhs f743177
example log query
TOEL2 976703a
WIP
TOEL2 732602c
WIP
TOEL2 1b6fe48
WIP output html for performance tests.
ayeshalshukri1-nhs 08fe8f0
WIP refactor metrics and added basic html table output.
ayeshalshukri1-nhs f7aaad9
WIP
TOEL2 25ed5a0
WIP
TOEL2 d65d7f8
linting
TOEL2 b3f08f3
WIP
TOEL2 51def89
refactor
TOEL2 1e3ce9b
refactor
TOEL2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| name: Performance Tests | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }} | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| environment: | ||
| description: 'Environment to run tests against' | ||
| type: environment | ||
| required: true | ||
| default: "dev" | ||
| users: | ||
| description: 'Number of users to simulate' | ||
| type: number | ||
| required: true | ||
| default: 100 | ||
| spawn_rate: | ||
| description: 'Rate to spawn users' | ||
| type: number | ||
| required: true | ||
| default: 20 | ||
| run_time: | ||
| description: 'Duration to run the test for (e.g. 1m, 30s, 1h)' | ||
| type: string | ||
| required: true | ||
| default: "30s" | ||
| github_tag: | ||
| description: 'The github tag to run the test pack from' | ||
TOEL2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| required: true | ||
| default: "main" | ||
|
|
||
| jobs: | ||
| performance_tests: | ||
| permissions: | ||
| id-token: write | ||
| issues: write | ||
| pull-requests: write | ||
| runs-on: ubuntu-22.04 | ||
| environment: ${{ inputs.environment }} | ||
| steps: | ||
| - name: show_input_parameters | ||
| env: | ||
| tags: "@performance" | ||
| environment: ${{ inputs.environment }} | ||
| log_level: "INFO" | ||
| id: "manual run" | ||
| github_tag: ${{ inputs.github_tag }} | ||
| run: | | ||
| echo "tags: ${tags}" | ||
| echo "environment: ${environment}" | ||
| echo "log_level: ${log_level}" | ||
| echo "id: ${id}" | ||
| echo "github_tag: ${github_tag}" | ||
| # output to summary | ||
| # shellcheck disable=SC2129 | ||
| echo "tags: ${tags}" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "environment: ${environment}" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "log_level: ${log_level}" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "id: ${id}" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "github_tag: ${github_tag}" >> "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| - name: ${{github.event.inputs.id}} | ||
| env: | ||
| ID: ${{github.event.inputs.id}} | ||
| ENV: ${{ inputs.environment }} | ||
| run: | | ||
| echo run identifier "$ID"-"$ENV" | ||
| echo run identifier "$ID"-"$ENV" >> "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
| with: | ||
| ref: ${{ inputs.github_tag }} | ||
|
|
||
| # using git commit sha for version of action to ensure we have stable version | ||
| - name: Install asdf | ||
TOEL2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302 | ||
| with: | ||
| asdf_version: 0.18.0 | ||
|
|
||
| - name: Cache asdf | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.asdf | ||
| key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }} | ||
|
|
||
| - name: Install asdf dependencies in .tool-versions | ||
| uses: asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302 | ||
| with: | ||
| asdf_version: 0.18.0 | ||
| env: | ||
| PYTHON_CONFIGURE_OPTS: --enable-shared | ||
|
|
||
| - name: Cache Virtualenv | ||
| uses: actions/cache@v4 | ||
| id: cache-venv | ||
| with: | ||
| path: .venv | ||
| key: ${{ runner.os }}-venv-${{ hashFiles('pyproject.toml') }} | ||
|
|
||
| - name: Install Dependencies | ||
| if: steps.cache-venv.outputs.cache-hit != 'true' | ||
| run: make install | ||
|
|
||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@v5.1.0 | ||
| with: | ||
| role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/Eligibility-Signposting-API-E2E-Regression-Tests | ||
| aws-region: eu-west-2 | ||
|
|
||
| - name: Performance Tests | ||
| id: tests | ||
| env: | ||
| ENVIRONMENT: ${{ inputs.environment }} | ||
| LOG_LEVEL: "INFO" | ||
| INPUT_TAG: "@performance" | ||
| USERS: ${{ inputs.users }} | ||
| SPAWN_RATE: ${{ inputs.spawn_rate }} | ||
| RUN_TIME: ${{ inputs.run_time }} | ||
| run: | | ||
| make run-performance-tests \ | ||
| env="$ENVIRONMENT" \ | ||
| log_level="$LOG_LEVEL" \ | ||
| users="$USERS" \ | ||
| spawn_rate="$SPAWN_RATE" \ | ||
| run_time="$RUN_TIME" | ||
|
|
||
| - name: Upload Locust Performance Report | ||
| if: always() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: performance-locust-report | ||
| path: temp/locust_report.html | ||
|
|
||
| - name: Upload AWS Logs Performance Report | ||
| if: always() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: performance-awslogs-report | ||
| path: temp/aws_logs_report.html | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.