-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVerify_LOVE_Stress_Test.robot
42 lines (38 loc) · 2 KB
/
Verify_LOVE_Stress_Test.robot
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
*** Settings ***
Resource Global_Vars.resource
Resource CSC_Lists.resource
Resource Common_Keywords.resource
Library Collections
Library String
Force Tags love_stress_test
Suite Setup Check If Failed
*** Variables ***
${remotes} 26
${clients} 50
${num_msgs} 5000
*** Test Cases ***
Execute Kubernetes LOVE Stress Test
[Tags] execute k8s
# Set the 'test_env' variable to 'bts' if running on the BTS, otherwise, set it to 'tts'.
${test_env}= Set Variable If "${env_efd}" == "base_efd" bts tts
${scripts} ${states}= Execute Integration Test love_stress_test ${test_env} --k8s
Verify Scripts Completed Successfully ${scripts} ${states}
Verify Script Kubernetes LogMessages
[Tags] robot:continue-on-failure k8s
${dataframe}= Get Recent Samples Script logevent_logMessage ["message",] 6 None
Log ${dataframe}
Should Be Equal As Strings ${dataframe.message.values}[5] Configure started
Should Be Equal As Strings ${dataframe.message.values}[4] Waiting for ${remotes} remotes to be ready
Should Be Equal As Strings ${dataframe.message.values}[3] Waiting for ${clients} Manager Clients to be ready
Should Match Regexp ${dataframe.message.values}[2] Received \\d*/${num_msgs} messages
Should Match Regexp ${dataframe.message.values}[1] LOVE stress test result: mean_latency_ms=\\d*\\.?\\d* num_messages=\\d*
Should Be Equal As Strings ${dataframe.message.values}[0] Setting final state to <ScriptState.DONE: 8>
Set Suite Variable ${latency_string} ${dataframe.message.values}[1]
Verify Mean Latency
[Tags] k8s
Set Test Variable ${latency_threshold} 1000 # 1000ms == 1s
Log ${latency_string}
@{words}= Split String ${latency_string} =
@{string}= Split String ${words}[1] ${SPACE}
Set Test Variable ${mean_latency} ${string}[0]
Should Be True ${mean_latency} < ${latency_threshold}