forked from microsoft/CopilotStudioSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMulti Group WebSocket.jmx
More file actions
597 lines (573 loc) · 32.7 KB
/
Multi Group WebSocket.jmx
File metadata and controls
597 lines (573 loc) · 32.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Directline WebSockets">
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Balance Check">
<intProp name="ThreadGroup.num_threads">5</intProp>
<intProp name="ThreadGroup.ramp_time">10</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">1</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="Utterance file for thread group" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="utterancesFilePath" elementType="Argument">
<stringProp name="Argument.name">utterancesFilePath</stringProp>
<stringProp name="Argument.value">check_account_balance_utterances.csv</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</Arguments>
<hashTree/>
<ModuleController guiclass="ModuleControllerGui" testclass="ModuleController" testname="Run main logic" enabled="true">
<collectionProp name="ModuleController.node_path">
<stringProp name="764597751">Test Plan</stringProp>
<stringProp name="-979894769">Directline WebSockets</stringProp>
<stringProp name="-1313007342">Connect to Direcline and run</stringProp>
</collectionProp>
</ModuleController>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Make payment" enabled="true">
<intProp name="ThreadGroup.num_threads">5</intProp>
<intProp name="ThreadGroup.ramp_time">10</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">1</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="Utterance file for thread group" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="utterancesFilePath" elementType="Argument">
<stringProp name="Argument.name">utterancesFilePath</stringProp>
<stringProp name="Argument.value">make_payment_utterances.csv</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</Arguments>
<hashTree/>
<ModuleController guiclass="ModuleControllerGui" testclass="ModuleController" testname="Run main logic" enabled="true">
<collectionProp name="ModuleController.node_path">
<stringProp name="764597751">Test Plan</stringProp>
<stringProp name="-979894769">Directline WebSockets</stringProp>
<stringProp name="-1313007342">Connect to Direcline and run</stringProp>
</collectionProp>
</ModuleController>
<hashTree/>
</hashTree>
<TestFragmentController guiclass="TestFragmentControllerGui" testclass="TestFragmentController" testname="Connect to Direcline and run" enabled="false"/>
<hashTree>
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="Init Shared Config Values">
<collectionProp name="Arguments.arguments">
<elementProp name="copilotTokenEndpoint" elementType="Argument">
<stringProp name="Argument.name">copilotTokenEndpoint</stringProp>
<stringProp name="Argument.value">see here for instructions: https://learn.microsoft.com/en-us/microsoft-copilot-studio/publication-connect-bot-to-custom-application#connect-your-copilot-to-a-web-based-app</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="directlineEndpoint" elementType="Argument">
<stringProp name="Argument.name">directlineEndpoint</stringProp>
<stringProp name="Argument.value">see here for instructions: https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-api-reference?view=azure-bot-service-4.0#base-uri</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="directLineSecret" elementType="Argument">
<stringProp name="Argument.name">directLineSecret</stringProp>
<stringProp name="Argument.value">see here for instructions: https://learn.microsoft.com/en-us/microsoft-copilot-studio/configure-web-security#enable-or-disable-web-channel-security</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</Arguments>
<hashTree/>
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="Use token endpoint?" enabled="true">
<stringProp name="IfController.condition">${__javaScript("${copilotTokenEndpoint}" != "")}</stringProp>
<boolProp name="IfController.evaluateAll">false</boolProp>
<boolProp name="IfController.useExpression">true</boolProp>
</IfController>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Fetch Token" enabled="true">
<stringProp name="HTTPSampler.domain">${urlDomain}</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">${urlPath}</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree>
<JSR223PreProcessor guiclass="TestBeanGUI" testclass="JSR223PreProcessor" testname="Extract domain and path from token endpoint" enabled="true">
<stringProp name="cacheKey">true</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="parameters"></stringProp>
<stringProp name="script">// Get the URL from a User Defined Variable
def fullUrl = vars.get("copilotTokenEndpoint")
// Define the regex patterns to extract parts of the URL
def domainPattern = /https:\/\/([^\/]+)/
def pathPattern = /https:\/\/[^\/]+(\/.*)/
// Extract domain and path using the patterns
def domainMatcher = (fullUrl =~ domainPattern)
def pathMatcher = (fullUrl =~ pathPattern)
// Check if matches are found and assign them to variables
if (domainMatcher) {
vars.put("urlDomain", domainMatcher[0][1])
} else {
vars.put("urlDomain", "not_found")
}
if (pathMatcher) {
vars.put("urlPath", pathMatcher[0][1])
} else {
vars.put("urlPath", "not_found")
}
// Log the results for verification
log.info("Extracted Domain: ${vars.get("urlDomain")}")
log.info("Extracted Path: ${vars.get("urlPath")}")
</stringProp>
<stringProp name="scriptLanguage">groovy</stringProp>
</JSR223PreProcessor>
<hashTree/>
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Extract Token" enabled="true">
<stringProp name="JSONPostProcessor.referenceNames">token</stringProp>
<stringProp name="JSONPostProcessor.jsonPathExprs">$.token</stringProp>
<stringProp name="JSONPostProcessor.match_numbers"></stringProp>
</JSONPostProcessor>
<hashTree/>
</hashTree>
</hashTree>
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="Use directline secret?" enabled="true">
<stringProp name="IfController.condition">${__javaScript("${copilotTokenEndpoint}" == "")}</stringProp>
<boolProp name="IfController.evaluateAll">false</boolProp>
<boolProp name="IfController.useExpression">true</boolProp>
</IfController>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="Set Directline Token in Header" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Authorization</stringProp>
<stringProp name="Header.value"> Bearer ${directLineSecret}</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Fetch Token with secret" enabled="true">
<stringProp name="HTTPSampler.domain">${directlineEndpoint}</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">v3/directline/tokens/generate</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree>
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Extract Token" enabled="true">
<stringProp name="JSONPostProcessor.referenceNames">token</stringProp>
<stringProp name="JSONPostProcessor.jsonPathExprs">$.token</stringProp>
<stringProp name="JSONPostProcessor.match_numbers"></stringProp>
</JSONPostProcessor>
<hashTree/>
</hashTree>
</hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="Set Authentication Header for Start Conversation" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Authorization</stringProp>
<stringProp name="Header.value">Bearer ${token}</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Start Conversation" enabled="true">
<stringProp name="HTTPSampler.domain">directline.botframework.com</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">/v3/directline/conversations</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
</HTTPSamplerProxy>
<hashTree>
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Extract Conversation Token & ID" enabled="true">
<stringProp name="JSONPostProcessor.referenceNames">conversationId; conversationToken; streamUrl</stringProp>
<stringProp name="JSONPostProcessor.jsonPathExprs">$.conversationId; $.token; $.streamUrl</stringProp>
<stringProp name="JSONPostProcessor.match_numbers"></stringProp>
<stringProp name="JSONPostProcessor.defaultValues">null;null;null</stringProp>
</JSONPostProcessor>
<hashTree/>
<JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="Parse Token Endpoint" enabled="true">
<stringProp name="scriptLanguage">groovy</stringProp>
<stringProp name="parameters"></stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="cacheKey">true</stringProp>
<stringProp name="script">def streamUrl = vars.get("streamUrl")
log.info(streamUrl)
// Remove the 'wss://' prefix
def urlWithoutProtocol = streamUrl.replaceFirst("wss://", "")
// Split the URL into hostname and path
def splitIndex = urlWithoutProtocol.indexOf('/')
def hostname = urlWithoutProtocol.substring(0, splitIndex)
def path = urlWithoutProtocol.substring(splitIndex)
log.info("Hostname: " + hostname)
log.info("Path: " + path)
// Store the values in variables for further use
vars.put("socketHostname", hostname)
vars.put("socketPath", path)
</stringProp>
</JSR223PostProcessor>
<hashTree/>
</hashTree>
<eu.luminis.jmeter.wssampler.OpenWebSocketSampler guiclass="eu.luminis.jmeter.wssampler.OpenWebSocketSamplerGui" testclass="eu.luminis.jmeter.wssampler.OpenWebSocketSampler" testname="WebSocket Open Connection" enabled="true">
<boolProp name="TLS">true</boolProp>
<stringProp name="server">${socketHostname}</stringProp>
<stringProp name="port">443</stringProp>
<stringProp name="path">${socketPath}</stringProp>
<stringProp name="connectTimeout">20000</stringProp>
<stringProp name="readTimeout">6000</stringProp>
</eu.luminis.jmeter.wssampler.OpenWebSocketSampler>
<hashTree/>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="Set Authentication Header for Sending Activities" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Authorization</stringProp>
<stringProp name="Header.value">Bearer ${conversationToken}</stringProp>
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Content-Type</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Loop over utterances from file" enabled="true">
<stringProp name="WhileController.condition">${__groovy(ctx.getVariables().get("utterance") != "<EOF>")}</stringProp>
</WhileController>
<hashTree>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Load utterances file" enabled="true">
<stringProp name="delimiter">,</stringProp>
<stringProp name="fileEncoding"></stringProp>
<stringProp name="filename">${utterancesFilePath}</stringProp>
<boolProp name="ignoreFirstLine">true</boolProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">false</boolProp>
<stringProp name="shareMode">shareMode.thread</stringProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="variableNames">utterance</stringProp>
</CSVDataSet>
<hashTree/>
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="If not end of file" enabled="true">
<stringProp name="IfController.condition">${__groovy(ctx.getVariables().get("utterance") != "<EOF>")}</stringProp>
<boolProp name="IfController.evaluateAll">false</boolProp>
<boolProp name="IfController.useExpression">true</boolProp>
</IfController>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Send utterance" enabled="true">
<stringProp name="HTTPSampler.domain">directline.botframework.com</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.path">/v3/directline/conversations/${conversationId}/activities</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{
"locale": "en-EN",
"type": "message",
"from": {
"id": "user1"
},
"text": "${utterance}"
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
</HTTPSamplerProxy>
<hashTree>
<JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="Log timestaps and active threads" enabled="true">
<stringProp name="scriptLanguage">groovy</stringProp>
<stringProp name="parameters"></stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="cacheKey">true</stringProp>
<stringProp name="script">// Get the previous SampleResult object
def prevSamplerResult = prev
// Get the start time of the previous sampler in milliseconds (epoch time)
long startTimeMillis = prevSamplerResult.getStartTime()
// Store the start time in a JMeter variable (if needed for future calculations)
vars.put("sendUtteranceStartTime", startTimeMillis.toString())
// Log the start time (optional)
log.info("Send utterance start time (milliseconds): " + startTimeMillis)</stringProp>
</JSR223PostProcessor>
<hashTree/>
</hashTree>
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Set websocketSuccess" enabled="true">
<stringProp name="scriptLanguage">groovy</stringProp>
<stringProp name="parameters"></stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="cacheKey">true</stringProp>
<stringProp name="script">vars.put("websocketSuccess", "true")</stringProp>
</JSR223Sampler>
<hashTree/>
<WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="WebSocket did not return error" enabled="true">
<stringProp name="WhileController.condition">${__javaScript(${websocketSuccess} == true)}</stringProp>
</WhileController>
<hashTree>
<eu.luminis.jmeter.wssampler.SingleReadWebSocketSampler guiclass="eu.luminis.jmeter.wssampler.SingleReadWebSocketSamplerGui" testclass="eu.luminis.jmeter.wssampler.SingleReadWebSocketSampler" testname="Read next frame" enabled="true">
<boolProp name="TLS">false</boolProp>
<stringProp name="server"></stringProp>
<stringProp name="port">80</stringProp>
<stringProp name="path"></stringProp>
<stringProp name="connectTimeout">20000</stringProp>
<stringProp name="dataType">Text</stringProp>
<boolProp name="createNewConnection">false</boolProp>
<stringProp name="readTimeout">10000</stringProp>
<boolProp name="optional">false</boolProp>
</eu.luminis.jmeter.wssampler.SingleReadWebSocketSampler>
<hashTree/>
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Check for websocket errors and write time diffs" enabled="true">
<stringProp name="scriptLanguage">groovy</stringProp>
<stringProp name="parameters"></stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="cacheKey">true</stringProp>
<stringProp name="script">// Check if the previous read from the WebSocket was successful
if (prev.isSuccessful()) {
// Calculate time diffs
// Retrieve the start time of the send utterance sampler from JMeter variables
long startTimeMillis = vars.get("sendUtteranceStartTime").toLong()
// Retrieve the end time of the last successful websocket sampler
long endTimeMillis = prev.getEndTime()
// Calculate the time difference (elapsed time)
long timeDifference = endTimeMillis - startTimeMillis
vars.put("tempTimeDifferenceMillis", timeDifference.toString())
vars.put("tempEndTimeMillis", endTimeMillis.toString())
} else {
// Get the response code (HTTP status or other protocol-specific code)
def responseCode = prev.getResponseCode()
// Get the response message (detailed message for the error)
def responseMessage = prev.getResponseMessage()
def timeDifferenceMillis = vars.get("tempTimeDifferenceMillis")
vars.put("timeDifferenceMillis",timeDifferenceMillis)
// Log the error details
log.error("Error occurred in the previous step.")
log.error("Response Code: " + responseCode)
log.error("Response Message: " + responseMessage)
vars.put("websocketSuccess", "false")
// Assuming last successfully read frame was the last Copilot response, based on the error code
if (responseCode == "Websocket I/O error")
{
SampleResult.setSampleLabel("Copilot Response")
log.info("sendUtteranceStartTime: " + vars.get("sendUtteranceStartTime") + " tempEndTimeMillis: " + vars.get("sendUtteranceStartTime") + " total tine: " + SampleResult.getTime())
SampleResult.setLatency(timeDifferenceMillis.toLong())
SampleResult.setStartTime(vars.get("sendUtteranceStartTime").toLong())
SampleResult.setEndTime(vars.get("tempEndTimeMillis").toLong())
SampleResult.setResponseMessage("copilot final message response time")
}
}
</stringProp>
</JSR223Sampler>
<hashTree/>
<DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="WebSocket Sampler" enabled="true">
<boolProp name="displayJMeterProperties">false</boolProp>
<boolProp name="displayJMeterVariables">true</boolProp>
<boolProp name="displaySystemProperties">false</boolProp>
</DebugSampler>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
<eu.luminis.jmeter.wssampler.CloseWebSocketSampler guiclass="eu.luminis.jmeter.wssampler.CloseWebSocketSamplerGui" testclass="eu.luminis.jmeter.wssampler.CloseWebSocketSampler" testname="WebSocket Close" enabled="true">
<stringProp name="statusCode">1000</stringProp>
<stringProp name="readTimeout">6000</stringProp>
</eu.luminis.jmeter.wssampler.CloseWebSocketSampler>
<hashTree/>
</hashTree>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
<ResultCollector guiclass="RespTimeGraphVisualizer" testclass="ResultCollector" testname="Response Time Graph">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
<stringProp name="RespTimeGraph.seriesselectionmatchlabel">Start Conversation</stringProp>
<boolProp name="ResultCollector.success_only_logging">true</boolProp>
<boolProp name="RespTimeGraph.seriesselection">true</boolProp>
</ResultCollector>
<hashTree/>
<kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.TimesVsThreadsGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="jp@gc - Response Times vs Threads">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
<longProp name="interval_grouping">500</longProp>
<boolProp name="graph_aggregated">false</boolProp>
<stringProp name="include_sample_labels"></stringProp>
<stringProp name="exclude_sample_labels"></stringProp>
<stringProp name="start_offset"></stringProp>
<stringProp name="end_offset"></stringProp>
<boolProp name="include_checkbox_state">false</boolProp>
<boolProp name="exclude_checkbox_state">false</boolProp>
<boolProp name="ResultCollector.success_only_logging">true</boolProp>
</kg.apc.jmeter.vizualizers.CorrectedResultCollector>
<hashTree/>
<kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.ThreadsStateOverTimeGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="jp@gc - Active Threads Over Time">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
<longProp name="interval_grouping">500</longProp>
<boolProp name="graph_aggregated">false</boolProp>
<stringProp name="include_sample_labels"></stringProp>
<stringProp name="exclude_sample_labels"></stringProp>
<stringProp name="start_offset"></stringProp>
<stringProp name="end_offset"></stringProp>
<boolProp name="include_checkbox_state">false</boolProp>
<boolProp name="exclude_checkbox_state">false</boolProp>
</kg.apc.jmeter.vizualizers.CorrectedResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</jmeterTestPlan>