Skip to content

Commit 8e4cba6

Browse files
authored
Script fixes and consistency changes
Update nurse-journey to use an import file, and update consent-journey to be more consistent with nurse-journey
1 parent 47dd398 commit 8e4cba6

File tree

2 files changed

+3398
-32
lines changed

2 files changed

+3398
-32
lines changed

performance-tests/E2E/consent-journey.jmx

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
<stringProp name="filename">${BaseDirectory}${InputFile}</stringProp>
2727
<boolProp name="ignoreFirstLine">true</boolProp>
2828
<boolProp name="quotedData">false</boolProp>
29-
<boolProp name="recycle">true</boolProp>
29+
<boolProp name="recycle">false</boolProp>
3030
<stringProp name="shareMode">shareMode.all</stringProp>
31-
<boolProp name="stopThread">false</boolProp>
31+
<boolProp name="stopThread">true</boolProp>
3232
<stringProp name="variableNames"></stringProp>
3333
</CSVDataSet>
3434
<hashTree/>
@@ -56,7 +56,7 @@
5656
</elementProp>
5757
<elementProp name="RampUp" elementType="Argument">
5858
<stringProp name="Argument.name">RampUp</stringProp>
59-
<stringProp name="Argument.value">${__P(RampUp, 1)}</stringProp>
59+
<stringProp name="Argument.value">${__P(RampUp, 10)}</stringProp>
6060
<stringProp name="Argument.metadata">=</stringProp>
6161
</elementProp>
6262
<elementProp name="Loops" elementType="Argument">
@@ -76,7 +76,7 @@
7676
</elementProp>
7777
<elementProp name="URN" elementType="Argument">
7878
<stringProp name="Argument.name">URN</stringProp>
79-
<stringProp name="Argument.value">114624</stringProp>
79+
<stringProp name="Argument.value">${__P(URN, 114624)}</stringProp>
8080
<stringProp name="Argument.metadata">=</stringProp>
8181
</elementProp>
8282
</collectionProp>
@@ -116,26 +116,26 @@
116116
<stringProp name="HTTPSampler.implementation"></stringProp>
117117
</ConfigTestElement>
118118
<hashTree/>
119+
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
120+
<collectionProp name="CookieManager.cookies"/>
121+
<boolProp name="CookieManager.clearEachIteration">false</boolProp>
122+
<boolProp name="CookieManager.controlledByThreadGroup">false</boolProp>
123+
</CookieManager>
124+
<hashTree/>
119125
<DNSCacheManager guiclass="DNSCachePanel" testclass="DNSCacheManager" testname="DNS Cache Manager" enabled="true">
120126
<collectionProp name="DNSCacheManager.servers"/>
121127
<collectionProp name="DNSCacheManager.hosts"/>
122128
<boolProp name="DNSCacheManager.clearEachIteration">true</boolProp>
123129
<boolProp name="DNSCacheManager.isCustomResolver">false</boolProp>
124130
</DNSCacheManager>
125131
<hashTree/>
126-
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
127-
<collectionProp name="CookieManager.cookies"/>
128-
<boolProp name="CookieManager.clearEachIteration">true</boolProp>
129-
<boolProp name="CookieManager.controlledByThreadGroup">false</boolProp>
130-
</CookieManager>
131-
<hashTree/>
132132
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="HTTP Cache Manager" enabled="true">
133133
<boolProp name="clearEachIteration">true</boolProp>
134134
<boolProp name="useExpires">false</boolProp>
135135
<boolProp name="CacheManager.controlledByThread">false</boolProp>
136136
</CacheManager>
137137
<hashTree/>
138-
<SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="Open a consent session for tomorrow" enabled="true">
138+
<SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="Open a consent session for tomorrow">
139139
<intProp name="ThreadGroup.num_threads">1</intProp>
140140
<intProp name="ThreadGroup.ramp_time">1</intProp>
141141
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
@@ -146,7 +146,7 @@
146146
</elementProp>
147147
</SetupThreadGroup>
148148
<hashTree>
149-
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Calculate Slug" enabled="true">
149+
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Calculate Slug">
150150
<stringProp name="cacheKey">true</stringProp>
151151
<stringProp name="filename"></stringProp>
152152
<stringProp name="parameters"></stringProp>
@@ -190,21 +190,12 @@ vars.put(&quot;ConsentSession&quot;, cohortCodes.get(vars.get(&quot;URN&quot;)))
190190
</stringProp>
191191
<stringProp name="scriptLanguage">groovy</stringProp>
192192
</JSR223Sampler>
193-
<hashTree>
194-
<JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="JSR223 PostProcessor" enabled="true">
195-
<stringProp name="cacheKey">true</stringProp>
196-
<stringProp name="filename"></stringProp>
197-
<stringProp name="parameters"></stringProp>
198-
<stringProp name="script">prev.setIgnore();</stringProp>
199-
<stringProp name="scriptLanguage">groovy</stringProp>
200-
</JSR223PostProcessor>
201-
<hashTree/>
202-
</hashTree>
203-
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Homepage" enabled="true">
193+
<hashTree/>
194+
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Homepage">
204195
<boolProp name="TransactionController.includeTimers">false</boolProp>
205196
</TransactionController>
206197
<hashTree>
207-
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Homepage" enabled="true">
198+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Homepage">
208199
<stringProp name="HTTPSampler.port">0</stringProp>
209200
<stringProp name="HTTPSampler.protocol">https</stringProp>
210201
<stringProp name="HTTPSampler.path">start</stringProp>
@@ -222,7 +213,7 @@ vars.put(&quot;ConsentSession&quot;, cohortCodes.get(vars.get(&quot;URN&quot;)))
222213
<boolProp name="TransactionController.includeTimers">false</boolProp>
223214
</TransactionController>
224215
<hashTree>
225-
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Sign-in page" enabled="true">
216+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Sign-in page">
226217
<stringProp name="HTTPSampler.port">0</stringProp>
227218
<stringProp name="HTTPSampler.protocol">https</stringProp>
228219
<stringProp name="HTTPSampler.path">users/sign-in</stringProp>
@@ -251,7 +242,7 @@ vars.put(&quot;ConsentSession&quot;, cohortCodes.get(vars.get(&quot;URN&quot;)))
251242
<boolProp name="TransactionController.includeTimers">false</boolProp>
252243
</TransactionController>
253244
<hashTree>
254-
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Sign-in" enabled="true">
245+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Sign-in">
255246
<stringProp name="HTTPSampler.port">0</stringProp>
256247
<stringProp name="HTTPSampler.protocol">https</stringProp>
257248
<stringProp name="HTTPSampler.path">users/sign-in</stringProp>
@@ -311,7 +302,7 @@ vars.put(&quot;ConsentSession&quot;, cohortCodes.get(vars.get(&quot;URN&quot;)))
311302
<boolProp name="TransactionController.includeTimers">false</boolProp>
312303
</TransactionController>
313304
<hashTree>
314-
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Organisation" enabled="true">
305+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Organisation">
315306
<stringProp name="HTTPSampler.port">0</stringProp>
316307
<stringProp name="HTTPSampler.protocol">https</stringProp>
317308
<stringProp name="HTTPSampler.path">users/organisations</stringProp>
@@ -379,7 +370,7 @@ vars.put(&quot;ConsentSession&quot;, cohortCodes.get(vars.get(&quot;URN&quot;)))
379370
<hashTree/>
380371
</hashTree>
381372
</hashTree>
382-
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Edit session" enabled="true">
373+
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Edit session">
383374
<boolProp name="TransactionController.includeTimers">false</boolProp>
384375
</TransactionController>
385376
<hashTree>
@@ -647,7 +638,7 @@ vars.put(&quot;postbody&quot;,postbody);
647638
</stringProp>
648639
</JSR223PreProcessor>
649640
<hashTree/>
650-
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Authenticity_token regex" enabled="true">
641+
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Authenticity_token regex">
651642
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
652643
<stringProp name="RegexExtractor.refname">Authenticity_Token</stringProp>
653644
<stringProp name="RegexExtractor.regex">name=&quot;authenticity_token&quot; value=&quot;(.*?)&quot; </stringProp>
@@ -808,20 +799,32 @@ vars.put(&quot;postbody&quot;,postbody);
808799
</hashTree>
809800
</hashTree>
810801
</hashTree>
811-
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group">
802+
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
812803
<stringProp name="ThreadGroup.num_threads">${Threads}</stringProp>
813804
<stringProp name="ThreadGroup.ramp_time">${RampUp}</stringProp>
814805
<stringProp name="ThreadGroup.duration">${Duration}</stringProp>
815806
<longProp name="ThreadGroup.delay">0</longProp>
816807
<boolProp name="ThreadGroup.same_user_on_next_iteration">false</boolProp>
817-
<boolProp name="ThreadGroup.scheduler">true</boolProp>
818808
<stringProp name="ThreadGroup.on_sample_error">startnextloop</stringProp>
819809
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController">
820810
<stringProp name="LoopController.loops">${Loops}</stringProp>
821811
<boolProp name="LoopController.continue_forever">false</boolProp>
822812
</elementProp>
823813
</ThreadGroup>
824814
<hashTree>
815+
<UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="Uniform Random Timer" enabled="true">
816+
<stringProp name="ConstantTimer.delay">100</stringProp>
817+
<stringProp name="RandomTimer.range">100</stringProp>
818+
</UniformRandomTimer>
819+
<hashTree/>
820+
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Log name and address" enabled="true">
821+
<stringProp name="scriptLanguage">groovy</stringProp>
822+
<stringProp name="parameters"></stringProp>
823+
<stringProp name="filename"></stringProp>
824+
<stringProp name="cacheKey">true</stringProp>
825+
<stringProp name="script">log.info(vars.get(&quot;CHILD_LAST_NAME&quot;) + &quot; &quot; + vars.get(&quot;CHILD_FIRST_NAME&quot;));</stringProp>
826+
</JSR223Sampler>
827+
<hashTree/>
825828
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Calculate SchoolYear" enabled="true">
826829
<stringProp name="cacheKey">true</stringProp>
827830
<stringProp name="filename"></stringProp>
@@ -3749,7 +3752,7 @@ else
37493752
</hashTree>
37503753
</hashTree>
37513754
</hashTree>
3752-
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree">
3755+
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
37533756
<boolProp name="ResultCollector.error_logging">false</boolProp>
37543757
<objProp>
37553758
<name>saveConfig</name>

0 commit comments

Comments
 (0)