diff --git a/.github/workflows/performance.yaml b/.github/workflows/performance.yaml
index a7afb43f5f9..39caa9d955a 100644
--- a/.github/workflows/performance.yaml
+++ b/.github/workflows/performance.yaml
@@ -11,7 +11,7 @@ on:
description: "Create and import a cohort (not needed if there are already enough patients)"
required: true
type: boolean
- default: true
+ default: false
runConsent:
description: "Run consent journey"
required: true
@@ -52,10 +52,10 @@ on:
type: string
default: '1000'
user:
- description: "Optional (default Nurse Jackie) user."
+ description: "Optional (default Nurse perftest) user."
required: true
type: string
- default: 'nurse.jackie@example.org'
+ default: 'nurse.perftest@example.com'
jobs:
nurse_journey_performance_test:
@@ -166,6 +166,7 @@ jobs:
-JURN=${{inputs.URN}}
- name: Upload consent journey JMeter output
+ if: inputs.runConsent == true
uses: actions/upload-artifact@v4
with:
name: jmeter-consent-journey-output-${{ env.timestamp }}
@@ -194,6 +195,7 @@ jobs:
-JURN=${{inputs.URN}}
- name: Upload nurse journey JMeter output
+ if: inputs.runNurse == true
uses: actions/upload-artifact@v4
with:
name: jmeter-nurse-journey-output-${{ env.timestamp }}
@@ -201,6 +203,7 @@ jobs:
if-no-files-found: warn
- name: Publish report to GH Pages
+ if: inputs.runNurse == true
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -212,4 +215,4 @@ jobs:
- 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
-
\ No newline at end of file
+
diff --git a/performance-tests/STS/nurse-journey.jmx b/performance-tests/STS/nurse-journey.jmx
index 7f5566d637b..fe63449c4a3 100644
--- a/performance-tests/STS/nurse-journey.jmx
+++ b/performance-tests/STS/nurse-journey.jmx
@@ -39,6 +39,10 @@
Authorization
Basic ${AuthToken}
+
+ Content-Type
+ application/x-www-form-urlencoded
+
@@ -114,7 +118,7 @@
Loops
- ${__P(Loops, 2)}
+ ${__P(Loops, 5)}
=
How many loops total (must be multiple times higher than vaccinationloop)
@@ -145,16 +149,14 @@
${__P(User, nurse.perftest@example.com)}
=
-
- URN
- ${__P(URN, 108657)}
- =
-
User ${__P(User, nurse.perftest@example.com)}
+ true
+ true
+ 6
qa.mavistesting.com
https
@@ -208,411 +210,381 @@
-
- Login, get all sessions for a particular URN
- false
-
+
+
+ Test Plan
+ Mavis_NURSE - 4.4.0
+ Get patients for processing
+
+
+
+
+
+ ${Threads}
+ ${RampUp}
+ ${Duration}
+ true
+ true
+ continue
+
+ ${Loops}
+ false
+
+
+
+
+
+ Test Plan
+ Mavis_NURSE - 4.4.0
+ Vaccinate patients
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ 9191
+ true
+ C:\apache-jmeter-5.6.3\bin
+
+
+
+
+
+ groovy
+
+
+ true
+ props.put("VaccineCount_flu","0")
+props.put("VaccineCount_hpv","0")
+props.put("VaccineCount_menacwy","0")
+props.put("VaccineCount_td_ipv","0")
+
+
+
-
- start
- true
- GET
- true
- false
-
-
-
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- users/sign-in
- true
- GET
- true
- false
-
-
-
-
-
-
- false
- Authenticity_Token
- <input type="hidden" name="authenticity_token" value="
- " autocomplete="off" />
- Authenticity_Token_NotFound_01
- false
- 1
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- users/sign-in
- true
- POST
- true
- false
-
-
-
- true
- user[email]
- ${User}
- =
- true
-
-
- true
- user[password]
- ${User}
- =
- true
-
-
- true
- authenticity_token
- ${Authenticity_Token}
- =
- true
-
-
-
-
-
-
-
-
- Content-Type
- application/x-www-form-urlencoded
-
-
-
-
-
- false
- Authenticity_Token
- <form action="/users/teams" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="
- " autocomplete="off" />
- Authenticity_Token_NotFound_02
- false
- 1
-
-
-
- false
- organisationId
- class="nhsuk-radios__input" type="radio" value="(.*?)"
- $1$
- orgNotFound
- false
-
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- false
-
-
-
- Temporarily remove the 'open' filter &status=open
- api/testing/locations?type=school
- true
- GET
- true
- false
-
-
-
-
-
-
- false
- schoolName
- "id":[0-9]{0,7}?,"name":"(.{0,40}?)","address_line_1":".{0,40}?","address_line_2":".{0,40}?","address_town":".{0,40}?","address_postcode":".{0,30}?","url":null,"urn":"${URN}"
- $1$
- schoolNotFound
- false
- 1
- all
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- sessions
- true
- GET
- true
- false
-
-
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ localhost
+ 9191
+ http
+ /sts/RESET?FILENAME=vaccinations.txt
+ true
+ GET
+ true
+ false
+
+
+
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ localhost
+ 9191
+ http
+ /sts/INITFILE?FILENAME=vaccinations.txt
+ true
+ GET
+ true
+ false
+
+
+
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ start
+ true
+ GET
+ true
+ false
+
+
+
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ users/sign-in
+ true
+ GET
+ true
+ false
+
+
+
+
+
+
+ false
+ Authenticity_Token
+ <input type="hidden" name="authenticity_token" value="
+ " autocomplete="off" />
+ Authenticity_Token_NotFound_01
+ false
+ 1
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ users/sign-in
+ true
+ POST
+ true
+ false
+
+
+
+ true
+ user[email]
+ ${User}
+ =
+ true
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- sessions?q=${schoolName}&%5Bprogrammes%5D%5B%5D=&status=&type=
- true
- GET
- true
- false
-
-
+
+ true
+ user[password]
+ ${User}
+ =
+ true
-
-
-
- false
- SessionID
- sessions\/(.*?)"[\s\S]{1,400}nhsuk-tag nhsuk-tag--white">(.*?)<
- $1$
- SessionIDNotFound
- false
- -1
-
-
-
- false
- SessionVaccine
- sessions\/(.*?)"[\s\S]{1,400}nhsuk-tag nhsuk-tag--white">(.*?)<
- $2$
- SessionVaccineNotFound
- false
- -1
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- groovy
-
-
- true
- //Move individual session ID's into correctly named variables
-vaccineCount=vars.get("SessionID_matchNr").toInteger()
-if(vaccineCount>3){
- //This is to stop the search bringing back multiple schools worth of data
- vaccineCount=3
-}
-
-for(loop=1;loop<=vaccineCount;loop++){
- if(vars.get("SessionID_" + loop)!="SessionIDNotFound"){
- //Replace Td/IPV with MenACWY to cope with doubles in any order
- if(vars.get("SessionVaccine_" + loop)=="Td/IPV"){
- vars.put("SessionVaccine_" + loop,"MenACWY")
- }
- vars.put("VaccineSession_" + vars.get("SessionVaccine_" + loop),vars.get("SessionID_" + loop))
- props.put("VaccineSession_" + vars.get("SessionVaccine_" + loop),vars.get("SessionID_" + loop))
- log.info(vars.get("SessionID_" + loop))
- }
-}
-
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
-
- sessions
- true
- GET
- true
- false
-
-
-
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- localhost
- 9191
- http
- /sts/RESET?FILENAME=vaccinations.txt
- true
- GET
- true
- false
-
-
-
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- localhost
- 9191
- http
- /sts/INITFILE?FILENAME=vaccinations.txt
- true
- GET
- true
- false
-
-
-
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- 3
- Rather than loop through sessions to set them active (like consent journey does) this will loop through and get an offline import spreadsheet for each session ID. They will all be saved in the same STS, then the random search will filter on the vaccine type.
-
-
-
- groovy
-
-
- true
- //For each loop choose the next vaccine and associated session ID, to save in a common value so subsequent calls can be generic
-
-loop=vars.get("__jm__sessionLoop__idx").toInteger()
-log.info(loop.toString())
-
-switch(loop){
- case 0:
- vars.put("SessionId",vars.get("VaccineSession_Flu"));
- log.info(vars.get("SessionId") + " For Flu");
- break;
- case 1:
- vars.put("SessionId",vars.get("VaccineSession_HPV"));
- log.info(vars.get("SessionId") + " For HPV");
- break;
- case 2:
- vars.put("SessionId",vars.get("VaccineSession_MenACWY"));
- log.info(vars.get("SessionId") + " For MenACWY");
- break;
- default:
- log.info("loop failed, value is " + loop.toString());
-}
-
-
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- sessions/${SessionId}
- true
- GET
- true
- false
-
-
+
+ true
+ authenticity_token
+ ${Authenticity_Token}
+ =
+ true
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
- sessions/${SessionId}.xlsx
- true
- GET
- true
- false
-
-
+
+
+
+
+
+
+
+ Content-Type
+ application/x-www-form-urlencoded
-
-
-
- groovy
-
-
- true
- import org.apache.jmeter.threads.JMeterVariables;
+
+
+
+
+ false
+ Authenticity_Token
+ <form action="/users/teams" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="
+ " autocomplete="off" />
+ Authenticity_Token_NotFound_02
+ false
+ 1
+
+
+
+ false
+ organisationId
+ class="nhsuk-radios__input" type="radio" value="(.*?)"
+ $1$
+ orgNotFound
+ false
+
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ sessions
+ true
+ GET
+ true
+ false
+
+
+
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ (assuming they all fit on one page)
+ sessions?q=&%5Bprogrammes%5D%5B%5D=&status=scheduled&type=school
+ true
+ GET
+ true
+ false
+
+
+
+
+
+
+ false
+ SessionID
+ sessions\/(.*?)"[\s\S]{1,400}nhsuk-tag nhsuk-tag--white">(.*?)<
+ $1$
+ SessionIDNotFound
+ false
+ -1
+
+
+
+ false
+ SessionVaccine
+ sessions\/(.*?)"[\s\S]{1,400}nhsuk-tag nhsuk-tag--white">(.*?)<
+ $2$
+ SessionVaccineNotFound
+ false
+ -1
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ SessionID
+ CurrentSessionID
+ true
+
+
+
+ sessions/${CurrentSessionID}
+ true
+ GET
+ true
+ false
+
+
+
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ false
+ true
+ false
+
+
+
+ sessions/${CurrentSessionID}.xlsx
+ true
+ GET
+ true
+ false
+
+
+
+
+
+
+ groovy
+
+
+ true
+ import org.apache.jmeter.threads.JMeterVariables;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
@@ -627,6 +599,8 @@ in.close();
Sheet sheet1 = wb.getSheet("Vaccinations");
int vaccinationCount=0;
+String PROGRAMME="";
+
for(Row row : sheet1){
String randomString = RandomStringUtils.random(9, true, false).toLowerCase();
String randomInt = RandomStringUtils.random(3, false, true)
@@ -642,7 +616,10 @@ for(Row row : sheet1){
String CONSENT_DETAILS = row.getCell(14).getStringCellValue();
String VACCINATED = row.getCell(24).getStringCellValue();
- String PROGRAMME = row.getCell(27).getStringCellValue();
+ PROGRAMME = row.getCell(27).getStringCellValue().toLowerCase(); //Sorts out Flu and HPV
+ if(PROGRAMME == "3-in-1"){PROGRAMME = "td_ipv"};
+ if(PROGRAMME == "acwyx4"){PROGRAMME = "menacwy"};
+ propertyName = "VaccineCount_" + PROGRAMME;
String PARENT_1_NAME = randomString + " " + PERSON_SURNAME;
String PARENT_1_RELATIONSHIP = "father";
@@ -658,16 +635,69 @@ for(Row row : sheet1){
if(!ready_for_consent&&ready_for_vaccination){
vars.put("vaccination_" + vaccinationCount.toString(),
- PROGRAMME + "," + PERSON_FORENAME + "," + PERSON_SURNAME + "," + PERSON_DOB + "," + PERSON_ADDRESS_LINE_1 + "," + PERSON_POSTCODE + "," + PARENT_1_NAME + "," + PARENT_1_RELATIONSHIP + "," + PARENT_1_EMAIL + "," + PARENT_1_PHONE);
+ PROGRAMME + "," + PERSON_FORENAME + "," + PERSON_SURNAME + "," + PERSON_DOB + "," + PERSON_ADDRESS_LINE_1 + "," + PERSON_POSTCODE + "," + PARENT_1_NAME + "," + PARENT_1_RELATIONSHIP + "," + PARENT_1_EMAIL + "," + PARENT_1_PHONE + "," + vars.get("CurrentSessionID"));
vaccinationCount++;
+ tempCount = Integer.parseInt(props.get(propertyName)) + 1;
+ props.put(propertyName,tempCount.toString());
}
}
}
-log.info("Total Vaccinations found for " + vars.get("SessionId") + ": " + vaccinationCount.toString());
-
+//log.info("Total Vaccinations found for " + vars.get("CurrentSessionID") + " + " + PROGRAMME + ": " + vaccinationCount.toString());
+log.info("After sessionID : " + vars.get("CurrentSessionID") + " Totals are : " + props.get("VaccineCount_flu") + ":" + props.get("VaccineCount_hpv") + ":" + props.get("VaccineCount_menacwy") + ":" + props.get("VaccineCount_td_ipv"))
-
-
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ vaccination
+ currentVaccination
+ true
+
+
+
+ localhost
+ 9191
+ http
+ /sts/ADD
+ true
+ POST
+ true
+ false
+
+
+
+ false
+ vaccinations.txt
+ =
+ true
+ FILENAME
+
+
+ false
+ LAST
+ =
+ true
+ ADD_MODE
+
+
+ false
+ -${currentVaccination}
+ =
+ true
+ LINE
+
+
+
+
+
groovy
@@ -677,73 +707,79 @@ log.info("Total Vaccinations found for " + vars.get("SessionId&qu
-
- vaccination
- currentVaccination
- true
-
-
-
- localhost
- 9191
- http
- /sts/ADD
- true
- POST
- true
- false
-
-
-
- false
- vaccinations.txt
- =
- true
- FILENAME
-
-
- false
- LAST
- =
- true
- ADD_MODE
-
-
- false
- ${currentVaccination}
- =
- true
- LINE
-
-
-
-
-
-
- groovy
-
-
- true
- prev.setIgnore()
-
-
-
-
+
+ groovy
+
+
+ true
+ var i=1;
+
+while(vars.get("vaccination_" + i)){
+ vars.remove("vaccination_" + i)
+ i++;
+}
+
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
+
+
+ localhost
+ 9191
+ http
+ /sts/STATUS
+ true
+ GET
+ true
+ false
+
+
+
+
+
+
+ true
+
+
+ prev.setIgnore();
+ groovy
+
+
+
+
+
+ localhost
+ 9191
+ http
+ /sts/SAVE?FILENAME=vaccinations.txt&ADD_TIMESTAMP=false
+ true
+ GET
+ true
+ false
+
+
+
+
+
+
+ groovy
+
+
+ true
+ prev.setIgnore()
+
+
-
- ${Threads}
- ${RampUp}
- ${Duration}
- true
- true
- continue
-
- ${Loops}
- false
-
-
+
false
@@ -883,34 +919,29 @@ log.info("Total Vaccinations found for " + vars.get("SessionId&qu
Threadnum=ctx.getThreadNum().toInteger()
//Threadnum=3 // Use to override a vaccine if needed
-//Divide threads equally between the three sessions, each nurse stays in session
-//This means that each patient only attends one session, and the test data gets used up three times faster
+//Divide threads equally between the four programmes, each nurse stays with the programme (might bias it towards Flu at some point)
switch(Threadnum%4){
case 0:
- vars.put("SessionId",props.get("VaccineSession_Flu"));
vars.put("Programme","Flu")
vars.put("VaccineName","flu")
break;
case 1:
- vars.put("SessionId",props.get("VaccineSession_HPV"));
vars.put("Programme","HPV")
vars.put("VaccineName","hpv")
break;
case 2:
- vars.put("SessionId",props.get("VaccineSession_MenACWY"));
vars.put("Programme","ACWYX4")
vars.put("VaccineName","menacwy")
break;
case 3:
- vars.put("SessionId",props.get("VaccineSession_MenACWY"));
vars.put("Programme","3-in-1")
vars.put("VaccineName","td_ipv")
break;
default:
log.info("loop failed, value is " + loop.toString());
}
-log.info("for thread " + Threadnum.toString() + " session ID is " + vars.get("SessionId") + " & programme is " + vars.get("Programme"));
+log.info("for thread " + Threadnum.toString() + " & VaccineName is " + vars.get("VaccineName"));
Divide it four ways given the data that has been added to STS
@@ -929,7 +960,7 @@ log.info("for thread " + Threadnum.toString() + " session ID is &
localhost
9191
http
- /sts/FIND?FILENAME=vaccinations.txt&LINE=${Programme}&KEEP=FALSE
+ /sts/FIND?FILENAME=vaccinations.txt&LINE=-${VaccineName}%2C&KEEP=FALSE
true
GET
true
@@ -952,7 +983,7 @@ log.info("for thread " + Threadnum.toString() + " session ID is &
false
PROGRAMME
- <body>(.*?),
+ <body>-(.*?),
$1$
NoMoreVaccinations
false
@@ -1039,7 +1070,27 @@ log.info("for thread " + Threadnum.toString() + " session ID is &
1
-
+
+ false
+ PARENT_1_PHONE
+ <body>.*?,.*?,.*?,.*?,.*?,.*?,.*?,.*?,.*?,(.*?),
+ $1$
+ NoMoreVaccinations
+ false
+ 1
+
+
+
+ false
+ SessionId
+ <body>.*?,.*?,.*?,.*?,.*?,.*?,.*?,.*?,.*?,.*?,(.*?)<
+ $1$
+ NoMoreVaccinations
+ false
+ 1
+
+
+
groovy
@@ -1048,12 +1099,6 @@ log.info("for thread " + Threadnum.toString() + " session ID is &
-
- false
- true
- false
-
-
${__jexl3("${Result}" == "KO")}
false
@@ -1392,6 +1437,12 @@ for(loop=1;loop<=PatientCount;loop++){
+
+ false
+ true
+ false
+
+
sessions/${SessionId}/patients/${PatientId}/${VaccineName}?return_to=consent
true
@@ -1449,7 +1500,7 @@ for(loop=1;loop<=PatientCount;loop++){
false
Vaccinate_Authenticity_Token
- vaccinations" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="(.+?)" autocomplete="off" \/>
+ vaccinations.*?authenticity_token" value="(.*?)"
$1$
Vaccinate_Authenticity_Token_NotFound_07
false
@@ -1507,24 +1558,8 @@ vars.put("vaccineCount",vaccineCount.toString())
1
-
- false
- Vaccinate_Authenticity_Token
- vaccinations" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="(.+?)" autocomplete="off" \/>
- $1$
- Vaccinate_Authenticity_Token_NotFound_07
- false
- 1
-
-
-
- false
- true
- false
-
-
//From Flu it's 'Consent given for nasal spray'
//From others it's 'Consent given'
@@ -2663,49 +2698,6 @@ if(vars.get("BatchId")=="BatchId_NotFound"){
-
- false
-
- saveConfig
-
-
- true
- true
- true
-
- true
- true
- true
- true
- false
- true
- true
- false
- false
- false
- true
- false
- false
- false
- true
- 0
- true
- true
- true
- true
- true
- true
-
-
-
-
-
-
- 9191
- true
- C:\apache-jmeter-5.6.3\bin
-
-