Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
58e23cd
using performance.yaml to test sts
simonnorris1 Sep 24, 2025
ddf66c7
new sts consent journey
simonnorris1 Sep 24, 2025
d1ac16a
move new lines away from cache
simonnorris1 Sep 24, 2025
8a71556
Rename STS plugin
simonnorris1 Sep 24, 2025
93ac577
typo
simonnorris1 Sep 24, 2025
01e5d3d
Wrong filepath
simonnorris1 Sep 24, 2025
1586ab2
Add missing Tika dependency
simonnorris1 Sep 24, 2025
1db3074
Wrong curl option
simonnorris1 Sep 24, 2025
5bc2f25
get jmeter as an artifact to check file contents
simonnorris1 Sep 24, 2025
823a0e3
change groovy file path
simonnorris1 Sep 24, 2025
cf63968
Fix stupid typo yet again
simonnorris1 Sep 24, 2025
6ea7917
New nurse journey
simonnorris1 Sep 25, 2025
f08271e
Add nurse journey
simonnorris1 Sep 25, 2025
c13fdc3
Delete performance-tests/STS/nurse-journey-new-data-source.jmx
simonnorris1 Sep 25, 2025
8a81dbf
Delete performance-tests/STS/consent-journey-new-data-source.jmx
simonnorris1 Sep 25, 2025
b7cbacc
Fresh file set
simonnorris1 Sep 25, 2025
837e02a
Full workflow
simonnorris1 Sep 25, 2025
c557757
Use parameters for a scheduled finish
simonnorris1 Sep 25, 2025
15ebde6
update to fix error
simonnorris1 Sep 25, 2025
9f93b27
Reporting tidy up
simonnorris1 Sep 25, 2025
3269e4b
Threads now drop off as data is exhausted
simonnorris1 Sep 25, 2025
9babce2
Fix parameter issues
simonnorris1 Sep 25, 2025
c1dca35
Tweak to allow hyphenated names
simonnorris1 Sep 26, 2025
b93f12f
Tweak consents and restore GH Pages summary
simonnorris1 Sep 26, 2025
08f48b3
Missed a commit?
simonnorris1 Sep 26, 2025
c54af63
Split file import
simonnorris1 Sep 29, 2025
cf54883
Delete performance-tests/give-or-refuse-consent-journey.jmx
simonnorris1 Sep 29, 2025
2d5120c
Delete performance-tests/nurse-journey.jmx
simonnorris1 Sep 29, 2025
3ff6de2
Delete performance-tests/perf-test-cohort-import-A9A5A-hpv.csv
simonnorris1 Sep 29, 2025
798d2e7
Delete performance-tests/record-offline-all.jmx
simonnorris1 Sep 29, 2025
d3949e2
Delete performance-tests/record-offline.jmx
simonnorris1 Sep 29, 2025
ab7182f
Delete performance-tests/reporting-journey.jmx
simonnorris1 Sep 29, 2025
edfe912
Delete performance-tests/run-nurse-journey.sh
simonnorris1 Sep 29, 2025
735c1c5
Delete performance-tests/upload-cohort-data.jmx
simonnorris1 Sep 29, 2025
811ffaf
Delete performance-tests/urn-mapping.csv
simonnorris1 Sep 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 102 additions & 59 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,58 @@ on:

workflow_dispatch:
inputs:
testToRun:
description: "Test to run"
type: choice
options:
- consent-journey
- nurse-journey
runImport:
description: "Create and import a cohort (not needed if there are already enough patients)"
required: true
type: boolean
default: true
runConsent:
description: "Run consent journey"
required: true
type: boolean
default: true
runNurse:
description: "Run the nurse journey"
required: true
type: boolean
default: true
URN:
description: "Required: what URN to run the test against."
required: true
type: string
duration:
description: "Optional (default 3600) Duration of selected test in seconds. This will include ramp-up."
description: "Optional (default 3600) Duration of nurse journey test, in seconds. This will include ramp-up."
required: false
type: number
type: string
default: '3600'
threads:
description: "Optional (default 70) Threads to run."
description: "Optional (default 70) Threads to run. Equivalent to the number of nurses using the system."
required: false
type: number
type: string
default: '70'
ramp_up:
description: "Optional (default 900) Ramp-up time in seconds. Threads will be gradually started up over this time."
required: false
type: number
type: string
default: '900'
vaccination_loop:
description: "Optional (default 20) Vaccination loop (nurse journey only). The number of vaccinations each nurse will perform before logging and back in again."
description: "Optional (default 20) Vaccination loop. The number of vaccinations each nurse will perform before logging and back in again."
required: false
type: number
type: string
default: '20'
row_count:
description: "Optional (default 1000) number of rows in the cohort file."
required: false
type: string
default: '1000'
user:
description: "Optional (default Nurse Jackie) user."
required: true
type: string
default: '[email protected]'


# env:
# JMETER_PLUGIN_INSTALL_LIST: "jpgc-udp,jpgc-graphs-basic,jpgc-dummy,bzm-random-csv"

# Added run-name information so it's easier to see what was run
run-name: Test ${{inputs.testToRun}} run with ${{inputs.threads}} threads for ${{inputs.duration}} seconds and ${{inputs.ramp_up}} ramp up
jobs:
performance_test:
nurse_journey_performance_test:
runs-on: ubuntu-latest

if: ${{ github.event_name == 'workflow_dispatch' }}
Expand All @@ -54,13 +67,27 @@ jobs:
jmeter_version: 5.6.3
cmdrunner_version: 2.3
jmeter_plugins_manager_version: 1.7.0
jmeter_plugins: jpgc-udp,jpgc-graphs-basic,jpgc-dummy,bzm-random-csv
jmeter_plugins: jpgc-udp,jpgc-graphs-basic,jpgc-dummy,bzm-random-csv,jpgc-sts
# jmeter_home: ${{ github.workspace }}/jmeter-${{ env.jmeter_version }}

steps:
- uses: actions/checkout@v5

- name: Cache jmeter
id: cache-jmeter
uses: actions/cache@v4
env:
cache-name: cache-jmeter
with:
path: jmeter
key: jmeter

#Having run each step separately, it's only the curl request that takes time. So including the unzip and move means I can cache the 'jmeter' folder entirely
#STS also requires some files in the jmeter folder, but I don't want those cached so the 'touch' commands are being included in the plugins step
#Finally move some of the report generator options into the jmeter folder to simplify the jmeter command in each execution step

- name: Install JMeter
if: ${{ steps.cache-jmeter.outputs.cache-hit != 'true'}}
run: |
curl -sSO https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-${{ env.jmeter_version }}.tgz
tar xzf apache-jmeter-${{ env.jmeter_version }}.tgz
Expand All @@ -69,8 +96,7 @@ jobs:
curl -LsS --output jmeter/lib/ext/jmeter-plugins-manager-${{ env.jmeter_plugins_manager_version }}.jar https://jmeter-plugins.org/get/
java -cp jmeter/lib/ext/jmeter-plugins-manager-${{ env.jmeter_plugins_manager_version }}.jar org.jmeterplugins.repository.PluginManagerCMDInstaller
chmod +x jmeter/bin/PluginsManagerCMD.sh
sed -i '/<Logger name="org.apache.jmeter.junit" level="debug" \/>/a \ <Logger name="org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase" level="info" additivity="false"\/>' jmeter/bin/log4j2.xml


- name: Install JMeter plugins
if: env.jmeter_plugins != ''
run: |
Expand All @@ -84,89 +110,106 @@ jobs:
jmeter/bin/PluginsManagerCMD.sh install $plugin
done
fi
curl -sSO --output-dir jmeter/lib https://repo1.maven.org/maven2/org/apache/tika/tika-app/1.28.5/tika-app-1.28.5.jar
sed -i '/<Logger name="org.apache.jmeter.junit" level="debug" \/>/a \ <Logger name="org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase" level="info" additivity="false"\/>' jmeter/bin/log4j2.xml
sed -i '$ajmeterPlugin.sts.loadAndRunOnStartup=true \njmeterPlugin.sts.port=9191 \njmeterPlugin.sts.daemon=false \njsr223.init.file=jmeter/bin/simple-table-server.groovy' jmeter/bin/user.properties
sed -i '$ajmeter.reportgenerator.report_title="MAVIS test report" \njmeter.reportgenerator.overall_granularity=10000 \njmeter.reportgenerator.sample_filter="^.*[^0-9]$"' jmeter/bin/user.properties
touch jmeter/consents.txt
touch jmeter/vaccinations.txt

- name: Set timestamp
id: timestamp
run: echo "timestamp=$(date '+%Y%m%d%H%M%S')" >> $GITHUB_ENV

- name: Create new cohort file
if: inputs.runImport == true
run: |
mkdir -p generate-cohort-output
generate_cohort_output_dir=generate-cohort-output
jmeter/bin/jmeter -n -t performance-tests/E2E/generate-cohort.jmx \
jmeter/bin/jmeter -n -t performance-tests/STS/generate-cohort.jmx \
-l $generate_cohort_output_dir/samples.jtl \
-j $generate_cohort_output_dir/jmeter.log \
-e -o $generate_cohort_output_dir/upload-report \
-JAuthToken=${{secrets.HTTP_AUTH_TOKEN_FOR_TESTS}} \
-JURN=${{inputs.URN}} \
-JRowCount=${{inputs.row_count}}

- name: Run file import for new file
if: inputs.runImport == true
run: |
mkdir -p import-output
import_output_dir=import-output
jmeter/bin/jmeter -n -t performance-tests/E2E/upload-cohort-data.jmx \
jmeter/bin/jmeter -n -t performance-tests/STS/upload-cohort-data.jmx \
-l $import_output_dir/samples.jtl \
-j $import_output_dir/jmeter.log \
-e -o $import_output_dir/upload-report \
-JAuthToken=${{secrets.HTTP_AUTH_TOKEN_FOR_TESTS}} \
-JUser=${{inputs.user}} \
-JInputFile="cohortnew.csv"

- name: Run Standalone Consent Journey
if: inputs.testToRun == 'consent-journey'
- name: Run Consent Journey
if: inputs.runConsent == true
run: |
mkdir -p consent-output
consent_output_dir=consent-output
jmeter/bin/jmeter -n -t performance-tests/E2E/consent-journey.jmx \
jmeter/bin/jmeter -n -t performance-tests/STS/consent-journey.jmx \
-l $consent_output_dir/samples.jtl \
-j $consent_output_dir/jmeter.log \
-e -o $consent_output_dir/consent-report \
-Jjmeter.reportgenerator.report_title="MAVIS test report" \
-Jjmeter.reportgenerator.overall_granularity=10000 \
-Jjmeter.reportgenerator.sample_filter="^.*[^0-9]$" \
-JAuthToken=${{secrets.HTTP_AUTH_TOKEN_FOR_TESTS}} \
-JLoops=-1 \
-JThreads=5 \
-JRampUp=60 \
-JDuration=${{inputs.duration}} \
-JThreads=${{inputs.threads}} \
-JRampUp=${{inputs.ramp_up}} \
-JInputFile="cohortnew.csv"
-JUser=${{inputs.user}} \
-JURN=${{inputs.URN}}

- name: Run Consent Journey for data prep only
if: inputs.testToRun == 'nurse-journey'
run: |
mkdir -p consent-output
consent_output_dir=consent-output
jmeter/bin/jmeter -n -t performance-tests/E2E/consent-journey.jmx \
-l $consent_output_dir/samples.jtl \
-j $consent_output_dir/jmeter.log \
-e -o $consent_output_dir/consent-report \
-JAuthToken=${{secrets.HTTP_AUTH_TOKEN_FOR_TESTS}} \
-JInputFile="cohortnew.csv"
- name: Upload consent journey JMeter output
uses: actions/upload-artifact@v4
with:
name: jmeter-consent-journey-output-${{ env.timestamp }}
path: consent-output
if-no-files-found: warn

- name: Run nurse journey JMeter test
if: inputs.testToRun == 'nurse-journey'
- name: Run nurse Journey
if: inputs.runNurse == true
run: |
mkdir -p nurse-output
nurse_output_dir=nurse-output
jmeter/bin/jmeter -n -t performance-tests/E2E/nurse-journey.jmx \
jmeter/bin/jmeter -n -t performance-tests/STS/nurse-journey.jmx \
-l $nurse_output_dir/samples.jtl \
-j $nurse_output_dir/jmeter.log \
-e -o $nurse_output_dir/report \
-Jjmeter.reportgenerator.report_title="MAVIS test report" \
-Jjmeter.reportgenerator.overall_granularity=10000 \
-Jjmeter.reportgenerator.sample_filter="^.*[^0-9]$" \
-JAuthToken=${{secrets.HTTP_AUTH_TOKEN_FOR_TESTS}} \
-JDuration=${{inputs.duration}} \
-JLoops=-1 \
-JThreads=${{inputs.threads}} \
-JRampUp=${{inputs.ramp_up}} \
-JVaccinationLoop=${{inputs.vaccination_loop}} \
-JInputFile="cohortnew.csv"

- name: Upload consent journey JMeter output
if: inputs.testToRun == 'consent-journey'
uses: actions/upload-artifact@v4
with:
name: jmeter-consent-journey-output-${{ env.timestamp }}
path: consent-output
if-no-files-found: warn
-JRampUp=${{inputs.ramp_up}} \
-JDuration=${{inputs.duration}} \
-JUser=${{inputs.user}} \
-JURN=${{inputs.URN}}

- name: Upload nurse journey JMeter output
if: inputs.testToRun == 'nurse-journey'
uses: actions/upload-artifact@v4
with:
name: jmeter-nurse-journey-output-${{ env.timestamp }}
path: nurse-output
if-no-files-found: warn

- name: Publish report to GH Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: nurse-output/report
destination_dir: JMeter/report-${{ env.timestamp }}
keep_files: true

- name: Set Job Summary
run: |
echo "Test report URL is https://nhsdigital.github.io/manage-vaccinations-in-schools-testing/JMeter/report-${{ env.timestamp }}/" >> $GITHUB_STEP_SUMMARY

Loading
Loading