From 9c69810d08a74de83c206b10d1c71ab8c6547ab1 Mon Sep 17 00:00:00 2001 From: Martin Weidhofer Date: Mon, 27 Apr 2026 12:52:20 +0200 Subject: [PATCH 01/11] add new multi-purpose jmx for testprotocols --- csm/CsmServiceJMeterTests.jmx | 454 ++++++++++++++++++++++++++++++++++ 1 file changed, 454 insertions(+) create mode 100644 csm/CsmServiceJMeterTests.jmx diff --git a/csm/CsmServiceJMeterTests.jmx b/csm/CsmServiceJMeterTests.jmx new file mode 100644 index 00000000000..91c07fbc026 --- /dev/null +++ b/csm/CsmServiceJMeterTests.jmx @@ -0,0 +1,454 @@ + + + + + A collection of JMeter components to test generate traffic for different test cases of the csm-service. + +How to use this script: +1. Choose an environment by enabling exactly one of the respective components. ( naming -> "env:<ENVIRONMENT-NAME> (<domain>)" ) +2. Choose which types of messages to send by enabling one or more of the message components. ( naming -> "cmd:<COMMAND>" ) +3. OPTIONAL: Some tests require limiting the throughput to ensure that the correct counters are displayed / calculated. In order to do this activate the "Limit throughput to 50 Tx/s" component. + false + false + + + + DefaultCsmServicePort + 6813 + = + + + DefaultResponseTimeLimit + 60000 + = + + + DefaultThreadCount + 10 + = + + + DefaultTransactionLimit + 3000.0 + = + + + IncreasedTransactionLimit + 4800.0 + = + + + DefaultTcpImpl + BinaryTCPClientImpl + = + + + + + + + + 127.0.0.1 + false + ${DefaultCsmServicePort} + false + ${DefaultResponseTimeLimit} + + false + BinaryTCPClientImpl + Configures the traffic to go to a locally running instance of csm-service. + + + + hsmcli1office + false + ${DefaultCsmServicePort} + false + ${DefaultResponseTimeLimit} + + false + BinaryTCPClientImpl + Configures the traffic to go to the dev environment running on hsmcli1office. + + + + Limits the transaction rate to 50 per second. + +This allows us to ensure that csm-service calculates this rate correctly. + ${DefaultTransactionLimit} + 3 + + + + Limits the transaction rate to 80 per second. + +This allows us to ensure smooth operation during expected load. + ${IncreasedTransactionLimit} + 3 + + + + continue + + false + -1 + + ${DefaultThreadCount} + 1 + false + + + true + Sends CSM_PING messages to the selected environment. + true + + + + Sends a default ping message to the csm-service. + + false + + false + + 0f0843534d5f50494e470000000000 + false + + + + + + + 250000000000 + + The response of the ping request should start with 250000000000 + The return status of the ping response does not indicate success. + Assertion.response_data + false + 2 + + + + + + continue + + false + -1 + + ${DefaultThreadCount} + 1 + false + + + true + Sends CSM_VALIDATE_TAN messages to the selected environment. + true + + + + Sends a default validate tan message to the csm-service. + + false + + false + + 171043534d5f56414c49444154455f54414e09000000a500010354414e000000040299791f010207434152445f4e52000000080000000055206168020208353950414e5f494400000002050003010c4150505f4558505f444154450000000315123104020756455253494f4e000000010105030a53544f5245445f4154430000000200670602044d4f4445000000010007020a444154415f494e5055540000000100080204444154410000000f16740f623237353533323039303731 + false + + + + + + + 2d0000000000 + 535441545553000000010001 + + The response of the validate tan request should meet the following requirements: + +- should start with 2d0000000000, this indicates the operation was successful +- should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) + The return status of the validate tan response does not indicate success. + Assertion.response_data + false + 2 + + + + + Sends a default validate tan message to the csm-service. + + false + + false + + 171043534d5f56414c49444154455f54414e09000000b600010354414e000000040354799f010207434152445f4e5200000008d0576876fa16bb11020208353950414e5f494400000002080003010c4150505f4558505f444154450000000316123104020756455253494f4e000000010205030a53544f5245445f4154430000000200010602044d4f4445000000010007020a444154415f494e50555400000001010802044441544100000020ae248879fe52db2543e53cf445d3d828ce0bf5c560593d97278a59762dd0c2c9 + false + + + + + + + 2d0000000000 + 535441545553000000010101 + + The response of the validate tan request should meet the following requirements: + +- should start with 2d0000000000, this indicates the operation was successful +- should contain 535441545553000000010101, this translates to "STATUS = 1" (eg. tan is invalid) + The return status of the validate tan response does not indicate success. + Assertion.response_data + false + 2 + + + + + Sends a default validate tan message to the csm-service. + + false + + false + + 171043534d5f56414c49444154455f54414e09000000b600010354414e000000040368298f010207434152445f4e520000000877d430b29cff1fd1020208353950414e5f494400000002080003010c4150505f4558505f44415445000000031012318a020756455253494f4e000000010005030a53544f5245445f4154430000000200040602044d4f4445000000010007020a444154415f494e505554000000010108020444415441000000207f67e7edbc5c484e4ec3f2f1c38a6f459db6fda69b9ced2f3a5449d07a6bb9a0 + false + + + + + + + 2d0200000000 + + The response of the validate tan request should meet the following requirements: + +- should start with 2d0200000000, this indicates the operation was unsuccessful + The return status of the validate tan response does not indicate success. + Assertion.response_data + false + 2 + + + + + + continue + + false + -1 + + ${DefaultThreadCount} + 1 + false + + + true + Sends ONL_VALIDATE_TAN messages to the selected environment. This does not send a MAC in the request. + true + + + + Sends a default online validate tan message without mac to the csm-service. + + false + + false + + 17104f4e4c5f56414c49444154455f54414e03000000f75002064b45595f49440000000303000151020952414e444f4d5f4e52000000100708090a0b0c0d0e0f1011121314151652020b434f4d4d414e445f524551000000b5171043534d5f56414c49444154455f54414e090000009e00010354414e000000040323692f010207434152445f4e52000000080000000055228272020208353950414e5f494400000002030003010c4150505f4558505f444154450000000317123104020756455253494f4e000000010005030a53544f5245445f4154430000000200030602044d4f4445000000010007020a444154415f494e5055540000000100080204444154410000000854321f6138303132 + false + + + + + + + 2d0000000000 + 535441545553000000010001 + 472d0000000000 + + The response of the validate tan request should meet the following requirements: + +- should start with 2d0000000000, this indicates the operation was successful +- should contain 472d0000000000, this indicates the inner operation was successful +- should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) + The return status of the online validate tan response does not indicate success. + Assertion.response_data + false + 2 + + + + + + continue + + false + -1 + + ${DefaultThreadCount} + 1 + false + + + true + Sends ONL_VALIDATE_TAN messages to the selected environment. This does send a MAC in the request. + true + + + + Sends a default online validate tan message with mac to the csm-service. + + false + + false + + 17104f4e4c5f56414c49444154455f54414e04000001035002064b45595f49440000000306000151020952414e444f4d5f4e52000000102576ea7e70e09faa1fac7fb24bf581a952020b434f4d4d414e445f524551000000b3171043534d5f56414c49444154455f54414e090000009c00010354414e000000041487891f010207434152445f4e52000000080000000055276781020208353950414e5f494400000002080003010c4150505f4558505f444154450000000321123104020756455253494f4e000000010005030a53544f5245445f4154430000000200850602044d4f4445000000010107020a444154415f494e5055540000000100080204444154410000000699887f0124795302034d4143000000043e08c552 + false + + + + + + + 2d0000000000 + 535441545553000000010001 + 472d0000000000 + + The response of the validate tan request should meet the following requirements: + +- should start with 2d0000000000, this indicates the operation was successful +- should contain 472d0000000000, this indicates the inner operation was successful +- should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) + The return status of the online validate tan response does not indicate success. + Assertion.response_data + false + 2 + + + + + + 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 + + + Overall view of the results. + +WARNING: Stopping the test usually leads to a few errors, as their respective assertions fail on abort. + + + + + true + + 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 + + + Show the messages that returned non-success. + +Usually some errors will appear here once the test run is stopped. Keep that in mind when error rate is relevant to your tests. This is caused by the response assertion failing on aborted messages. + + + + + 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 + + + Graph to show response times over time. + + 1000 + Response time in 1 second steps + 1 + 4 + + + + + From 19bd6597c382b1f6b59663e1afdb44f85f0cdd58 Mon Sep 17 00:00:00 2001 From: Martin Weidhofer Date: Mon, 27 Apr 2026 16:55:19 +0200 Subject: [PATCH 02/11] update jmx and add sh/ps1/properties --- csm/CsmServiceJMeterTests.jmx | 58 +++++++++++++++------- csm/CsmServiceJMeterTests.properties | 74 ++++++++++++++++++++++++++++ csm/CsmServiceJMeterTests.ps1 | 25 ++++++++++ csm/CsmServiceJMeterTests.sh | 18 +++++++ 4 files changed, 156 insertions(+), 19 deletions(-) create mode 100644 csm/CsmServiceJMeterTests.properties create mode 100644 csm/CsmServiceJMeterTests.ps1 create mode 100644 csm/CsmServiceJMeterTests.sh diff --git a/csm/CsmServiceJMeterTests.jmx b/csm/CsmServiceJMeterTests.jmx index 91c07fbc026..ae3b142d10b 100644 --- a/csm/CsmServiceJMeterTests.jmx +++ b/csm/CsmServiceJMeterTests.jmx @@ -19,7 +19,7 @@ How to use this script: DefaultResponseTimeLimit - 60000 + 5000 = @@ -39,7 +39,12 @@ How to use this script: DefaultTcpImpl - BinaryTCPClientImpl + BinaryTCPClientSimpleImpl + = + + + DefaultConnectTimeLimit + 1000 = @@ -47,7 +52,7 @@ How to use this script: - + 127.0.0.1 false ${DefaultCsmServicePort} @@ -55,20 +60,21 @@ How to use this script: ${DefaultResponseTimeLimit} false - BinaryTCPClientImpl + ${DefaultTcpImpl} Configures the traffic to go to a locally running instance of csm-service. + ${DefaultConnectTimeLimit} - + hsmcli1office false ${DefaultCsmServicePort} false ${DefaultResponseTimeLimit} - false - BinaryTCPClientImpl + ${DefaultTcpImpl} Configures the traffic to go to the dev environment running on hsmcli1office. + ${DefaultConnectTimeLimit} @@ -79,7 +85,7 @@ This allows us to ensure that csm-service calculates this rate correctly.3 - + Limits the transaction rate to 80 per second. This allows us to ensure smooth operation during expected load. @@ -98,7 +104,7 @@ This allows us to ensure smooth operation during expected load. false - true + false Sends CSM_PING messages to the selected environment. true @@ -119,8 +125,12 @@ This allows us to ensure smooth operation during expected load. 250000000000 + 56455253494f4e00000008 - The response of the ping request should start with 250000000000 + The response of the ping request should meet the following requirements: + +- starts with 250000000000, indicates success +- contains 56455253494f4e00000008, which translates to "VERSION size 8 = x" (no actual version check, as it can check) The return status of the ping response does not indicate success. Assertion.response_data false @@ -129,7 +139,7 @@ This allows us to ensure smooth operation during expected load. - + continue false @@ -140,7 +150,7 @@ This allows us to ensure smooth operation during expected load. false - true + false Sends CSM_VALIDATE_TAN messages to the selected environment. true @@ -162,11 +172,13 @@ This allows us to ensure smooth operation during expected load. 2d0000000000 535441545553000000010001 + 415443000000020084 The response of the validate tan request should meet the following requirements: - should start with 2d0000000000, this indicates the operation was successful -- should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) +- should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) +- should containt 415443000000020084, this translates to "ATC = 132" (eg. end of message) The return status of the validate tan response does not indicate success. Assertion.response_data false @@ -191,11 +203,13 @@ This allows us to ensure smooth operation during expected load. 2d0000000000 535441545553000000010101 + 415443000000020002 The response of the validate tan request should meet the following requirements: - should start with 2d0000000000, this indicates the operation was successful -- should contain 535441545553000000010101, this translates to "STATUS = 1" (eg. tan is invalid) +- should contain 535441545553000000010101, this translates to "STATUS = 1" (eg. tan is invalid) +- should contain 415443000000020002, this translates to "ATC = 2" (eg. end of message) The return status of the validate tan response does not indicate success. Assertion.response_data false @@ -219,10 +233,12 @@ This allows us to ensure smooth operation during expected load. 2d0200000000 + 43534d5f56414c49444154455f54414e0000000000 The response of the validate tan request should meet the following requirements: -- should start with 2d0200000000, this indicates the operation was unsuccessful +- should start with 2d0200000000, this indicates the operation was unsuccessful +- should contain 43534d5f56414c49444154455f54414e0000000000, this indicates an empty CSM_VALIDATE_TAN response The return status of the validate tan response does not indicate success. Assertion.response_data false @@ -242,7 +258,7 @@ This allows us to ensure smooth operation during expected load. false - true + false Sends ONL_VALIDATE_TAN messages to the selected environment. This does not send a MAC in the request. true @@ -265,12 +281,14 @@ This allows us to ensure smooth operation during expected load. 2d0000000000 535441545553000000010001 472d0000000000 + 415443000000020004 The response of the validate tan request should meet the following requirements: - should start with 2d0000000000, this indicates the operation was successful - should contain 472d0000000000, this indicates the inner operation was successful -- should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) +- should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) +- should containt 415443000000020004, this translates to "ATC = 4" (eg. end of message) The return status of the online validate tan response does not indicate success. Assertion.response_data false @@ -290,7 +308,7 @@ This allows us to ensure smooth operation during expected load. false - true + false Sends ONL_VALIDATE_TAN messages to the selected environment. This does send a MAC in the request. true @@ -313,12 +331,14 @@ This allows us to ensure smooth operation during expected load. 2d0000000000 535441545553000000010001 472d0000000000 + 4d414300000004 The response of the validate tan request should meet the following requirements: - should start with 2d0000000000, this indicates the operation was successful - should contain 472d0000000000, this indicates the inner operation was successful -- should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) +- should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) +- should contain 4d414300000004, this is the parameter name MAC (4d 41 43) and mac size (00 00 00 04) / because MAC is random, this is the closest check to ensure the full response was received The return status of the online validate tan response does not indicate success. Assertion.response_data false diff --git a/csm/CsmServiceJMeterTests.properties b/csm/CsmServiceJMeterTests.properties new file mode 100644 index 00000000000..ae3b60815a0 --- /dev/null +++ b/csm/CsmServiceJMeterTests.properties @@ -0,0 +1,74 @@ +# Sample user.properties file +# +## Licensed to the Apache Software Foundation (ASF) under one or more +## contributor license agreements. See the NOTICE file distributed with +## this work for additional information regarding copyright ownership. +## The ASF licenses this file to You under the Apache License, Version 2.0 +## (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. + +#--------------------------------------------------------------------------- +# Classpath configuration +#--------------------------------------------------------------------------- +# +# List of paths (separated by ;) to search for additional JMeter plugin classes, +# for example new GUI elements and samplers. +# A path item can either be a jar file or a directory. +# Any jar file in such a directory will be automatically included, +# jar files in sub directories are ignored. +# The given value is in addition to any jars found in the lib/ext directory. +# Do not use this for utility ir plugin dependecy jars. +#search_paths=/app1/lib;/app2/lib + +# List of paths that JMeter will search for utility and plugin dependency classes. +# Use your platform path separator to separate multiple paths. +# A path item can either be a jar file or a directory. +# Any jar file in such a directory will be automatically included, +# jar files in sub directories are ignored. +# The given value is in addition to any jars found in the lib directory. +# All entries will be added to the class path of the system class loader +# and also to the path of the JMeter internal loader. +# Paths with spaces may cause problems for the JVM +#user.classpath=../classes;../lib;../app1/jar1.jar;../app2/jar2.jar + +# List of paths (separated by ;) that JMeter will search for utility +# and plugin dependency classes. +# A path item can either be a jar file or a directory. +# Any jar file in such a directory will be automatically included, +# jar files in sub directories are ignored. +# The given value is in addition to any jars found in the lib directory +# or given by the user.classpath property. +# All entries will be added to the path of the JMeter internal loader only. +# For plugin dependencies using plugin_dependency_paths should be preferred over +# user.classpath. +#plugin_dependency_paths=../dependencies/lib;../app1/jar1.jar;../app2/jar2.jar + +#--------------------------------------------------------------------------- +# Logging configuration +#--------------------------------------------------------------------------- +#log_level.jorphan.reflect=DEBUG +# Warning: enabling the next debug line causes javax.net.ssl.SSLException: Received fatal alert: unexpected_message +# for certain sites when used with the default HTTP Sampler +#log_level.jmeter.util.HttpSSLProtocolSocketFactory=DEBUG +#log_level.jmeter.util.JsseSSLManager=DEBUG + +# Enable Proxy request debug +#log_level.jmeter.protocol.http.proxy.HttpRequestHdr=DEBUG + + + +#The eomByte is really tricky. +#It gets compared with and also assigned to a java byte type +#A java byte type is a signed byte and has a range from -128 to 127 +#Although it is a binary type the eom byte must be given a deciaml number between -128 to 127 +#If you want a eomByte of 0xFF thant you have to use -128 +#If you want a eomByte of 0x84 which is 132 you have to use -124 +tcp.BinaryTCPClient.eomByte=13 \ No newline at end of file diff --git a/csm/CsmServiceJMeterTests.ps1 b/csm/CsmServiceJMeterTests.ps1 new file mode 100644 index 00000000000..7003c850d3d --- /dev/null +++ b/csm/CsmServiceJMeterTests.ps1 @@ -0,0 +1,25 @@ +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +$jmeterExe = "$PSScriptRoot\apache-jmeter-5.6.3\bin\jmeter.bat" + +#$PSScriptRoot is the path of the current script +$arguments = @() +$arguments += "--addprop $PSScriptRoot\CsmServiceJMeterTests.properties" +$arguments += "--testfile $PSScriptRoot\CsmServiceJMeterTests.jmx" + +Start-Process -FilePath $jmeterExe -ArgumentList $arguments -NoNewWindow \ No newline at end of file diff --git a/csm/CsmServiceJMeterTests.sh b/csm/CsmServiceJMeterTests.sh new file mode 100644 index 00000000000..12df1425bf4 --- /dev/null +++ b/csm/CsmServiceJMeterTests.sh @@ -0,0 +1,18 @@ +#! /bin/bash + +# Copyright 2015 the original author or authors. +# Licensed under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0) + +# Set the script root directory (directory of this script) +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Path to JMeter executable (adjust if needed) +JMETER_BIN="/home/johannes/dev/jmeter/bin/jmeter.sh" + +# Arguments +ARGUMENTS=() +ARGUMENTS+=("--addprop" "$SCRIPT_DIR/CsmServiceJMeterTests.properties") +ARGUMENTS+=("--testfile" "$SCRIPT_DIR/CsmServiceJMeterTests.jmx") + +# Execute JMeter +"$JMETER_BIN" "${ARGUMENTS[@]}" From 9df0b70580307c7e2e096c5ea1dae9a8e815b985 Mon Sep 17 00:00:00 2001 From: Martin Weidhofer Date: Tue, 28 Apr 2026 10:49:56 +0200 Subject: [PATCH 03/11] update props and jmx --- csm/CsmServiceJMeterTests.jmx | 2 +- csm/CsmServiceJMeterTests.properties | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/csm/CsmServiceJMeterTests.jmx b/csm/CsmServiceJMeterTests.jmx index ae3b142d10b..6b816f52344 100644 --- a/csm/CsmServiceJMeterTests.jmx +++ b/csm/CsmServiceJMeterTests.jmx @@ -130,7 +130,7 @@ This allows us to ensure smooth operation during expected load. The response of the ping request should meet the following requirements: - starts with 250000000000, indicates success -- contains 56455253494f4e00000008, which translates to "VERSION size 8 = x" (no actual version check, as it can check) +- contains 56455253494f4e00000008, which translates to "VERSION size 8 = x" (no actual version check, as it can change) The return status of the ping response does not indicate success. Assertion.response_data false diff --git a/csm/CsmServiceJMeterTests.properties b/csm/CsmServiceJMeterTests.properties index ae3b60815a0..97954f12fce 100644 --- a/csm/CsmServiceJMeterTests.properties +++ b/csm/CsmServiceJMeterTests.properties @@ -71,4 +71,5 @@ #Although it is a binary type the eom byte must be given a deciaml number between -128 to 127 #If you want a eomByte of 0xFF thant you have to use -128 #If you want a eomByte of 0x84 which is 132 you have to use -124 -tcp.BinaryTCPClient.eomByte=13 \ No newline at end of file +tcp.BinaryTCPClient.eomByte=4 +tcp.BinaryTCPClient.eomBytePositionFromEnd=5 \ No newline at end of file From 2601fe7acd500bf19502330a5838297954de7ed6 Mon Sep 17 00:00:00 2001 From: Martin Weidhofer <105639806+martin-weidhofer@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:53:44 +0200 Subject: [PATCH 04/11] Update csm/CsmServiceJMeterTests.jmx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- csm/CsmServiceJMeterTests.jmx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csm/CsmServiceJMeterTests.jmx b/csm/CsmServiceJMeterTests.jmx index 6b816f52344..a90cbe2fb42 100644 --- a/csm/CsmServiceJMeterTests.jmx +++ b/csm/CsmServiceJMeterTests.jmx @@ -288,7 +288,7 @@ This allows us to ensure smooth operation during expected load. - should start with 2d0000000000, this indicates the operation was successful - should contain 472d0000000000, this indicates the inner operation was successful - should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) -- should containt 415443000000020004, this translates to "ATC = 4" (eg. end of message) +- should contain 415443000000020004, this translates to "ATC = 4" (eg. end of message) The return status of the online validate tan response does not indicate success. Assertion.response_data false From eadd50082dc198b6d8620be7eb8e3240d3f7903d Mon Sep 17 00:00:00 2001 From: Martin Weidhofer <105639806+martin-weidhofer@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:55:39 +0200 Subject: [PATCH 05/11] Update csm/CsmServiceJMeterTests.properties Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- csm/CsmServiceJMeterTests.properties | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/csm/CsmServiceJMeterTests.properties b/csm/CsmServiceJMeterTests.properties index 97954f12fce..eae5cded87f 100644 --- a/csm/CsmServiceJMeterTests.properties +++ b/csm/CsmServiceJMeterTests.properties @@ -66,10 +66,10 @@ #The eomByte is really tricky. -#It gets compared with and also assigned to a java byte type -#A java byte type is a signed byte and has a range from -128 to 127 -#Although it is a binary type the eom byte must be given a deciaml number between -128 to 127 -#If you want a eomByte of 0xFF thant you have to use -128 -#If you want a eomByte of 0x84 which is 132 you have to use -124 +#It gets compared with and is also assigned to a Java byte type. +#A Java byte type is signed and has a range from -128 to 127. +#Although it is a binary type, the eomByte must be given as a decimal number between -128 and 127. +#If you want an eomByte of 0xFF, then you have to use -128. +#If you want an eomByte of 0x84, which is 132, you have to use -124. tcp.BinaryTCPClient.eomByte=4 tcp.BinaryTCPClient.eomBytePositionFromEnd=5 \ No newline at end of file From 86aa8c37d3ae4ff7ab4a3451dc547883e13fb048 Mon Sep 17 00:00:00 2001 From: Martin Weidhofer <105639806+martin-weidhofer@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:56:41 +0200 Subject: [PATCH 06/11] Update csm/CsmServiceJMeterTests.jmx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- csm/CsmServiceJMeterTests.jmx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csm/CsmServiceJMeterTests.jmx b/csm/CsmServiceJMeterTests.jmx index a90cbe2fb42..f1d8fe8070f 100644 --- a/csm/CsmServiceJMeterTests.jmx +++ b/csm/CsmServiceJMeterTests.jmx @@ -65,7 +65,7 @@ How to use this script: ${DefaultConnectTimeLimit} - + hsmcli1office false ${DefaultCsmServicePort} From 825fe3f6cfd4f152473039c8b4fa486caa736958 Mon Sep 17 00:00:00 2001 From: Martin Weidhofer <105639806+martin-weidhofer@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:58:19 +0200 Subject: [PATCH 07/11] Update csm/CsmServiceJMeterTests.jmx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- csm/CsmServiceJMeterTests.jmx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csm/CsmServiceJMeterTests.jmx b/csm/CsmServiceJMeterTests.jmx index f1d8fe8070f..9910b19d53f 100644 --- a/csm/CsmServiceJMeterTests.jmx +++ b/csm/CsmServiceJMeterTests.jmx @@ -178,7 +178,7 @@ This allows us to ensure smooth operation during expected load. - should start with 2d0000000000, this indicates the operation was successful - should contain 535441545553000000010001, this translates to "STATUS = 0" (eg. tan is valid) -- should containt 415443000000020084, this translates to "ATC = 132" (eg. end of message) +- should contain 415443000000020084, this translates to "ATC = 132" (eg. end of message) The return status of the validate tan response does not indicate success. Assertion.response_data false From 3d3765b15bf1c148c33f63b148bf6df5badb5b96 Mon Sep 17 00:00:00 2001 From: Martin Weidhofer <105639806+martin-weidhofer@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:58:43 +0200 Subject: [PATCH 08/11] Update csm/CsmServiceJMeterTests.jmx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- csm/CsmServiceJMeterTests.jmx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csm/CsmServiceJMeterTests.jmx b/csm/CsmServiceJMeterTests.jmx index 9910b19d53f..308ef3bcaf7 100644 --- a/csm/CsmServiceJMeterTests.jmx +++ b/csm/CsmServiceJMeterTests.jmx @@ -263,7 +263,7 @@ This allows us to ensure smooth operation during expected load. true - + Sends a default online validate tan message without mac to the csm-service. false From 1957109212631a9209f0aebc5090ebe10f46c025 Mon Sep 17 00:00:00 2001 From: Martin Weidhofer <105639806+martin-weidhofer@users.noreply.github.com> Date: Tue, 28 Apr 2026 11:01:29 +0200 Subject: [PATCH 09/11] Update csm/CsmServiceJMeterTests.jmx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- csm/CsmServiceJMeterTests.jmx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csm/CsmServiceJMeterTests.jmx b/csm/CsmServiceJMeterTests.jmx index 308ef3bcaf7..796e407afd3 100644 --- a/csm/CsmServiceJMeterTests.jmx +++ b/csm/CsmServiceJMeterTests.jmx @@ -313,7 +313,7 @@ This allows us to ensure smooth operation during expected load. true - + Sends a default online validate tan message with mac to the csm-service. false From fe1c8efc8eacb361f3cf5bb8e53c503bc577e624 Mon Sep 17 00:00:00 2001 From: Martin Weidhofer <105639806+martin-weidhofer@users.noreply.github.com> Date: Tue, 28 Apr 2026 11:02:55 +0200 Subject: [PATCH 10/11] Update csm/CsmServiceJMeterTests.jmx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- csm/CsmServiceJMeterTests.jmx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csm/CsmServiceJMeterTests.jmx b/csm/CsmServiceJMeterTests.jmx index 796e407afd3..542a07dd758 100644 --- a/csm/CsmServiceJMeterTests.jmx +++ b/csm/CsmServiceJMeterTests.jmx @@ -2,7 +2,7 @@ - A collection of JMeter components to test generate traffic for different test cases of the csm-service. + A collection of JMeter components to generate traffic for different test cases of the csm-service. How to use this script: 1. Choose an environment by enabling exactly one of the respective components. ( naming -> "env:<ENVIRONMENT-NAME> (<domain>)" ) From 7d5653f699cd8c75feac6500b0686edc4f71e79a Mon Sep 17 00:00:00 2001 From: Martin Weidhofer Date: Tue, 28 Apr 2026 11:40:55 +0200 Subject: [PATCH 11/11] Update scripts with passable path and executable guards --- csm/CsmServiceJMeterTests.ps1 | 11 +++++++++-- csm/CsmServiceJMeterTests.sh | 17 ++++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/csm/CsmServiceJMeterTests.ps1 b/csm/CsmServiceJMeterTests.ps1 index 7003c850d3d..09fa09bc770 100644 --- a/csm/CsmServiceJMeterTests.ps1 +++ b/csm/CsmServiceJMeterTests.ps1 @@ -14,12 +14,19 @@ # limitations under the License. # +param( + [string]$JMeterExe = "$PSScriptRoot\apache-jmeter-5.6.3\bin\jmeter.bat" +) -$jmeterExe = "$PSScriptRoot\apache-jmeter-5.6.3\bin\jmeter.bat" +# Validate JMeter executable +if (-not (Test-Path -Path $JMeterExe -PathType Leaf)) { + Write-Error "JMeter executable not found at '$JMeterExe'" + exit 1 +} #$PSScriptRoot is the path of the current script $arguments = @() $arguments += "--addprop $PSScriptRoot\CsmServiceJMeterTests.properties" $arguments += "--testfile $PSScriptRoot\CsmServiceJMeterTests.jmx" -Start-Process -FilePath $jmeterExe -ArgumentList $arguments -NoNewWindow \ No newline at end of file +Start-Process -FilePath $JMeterExe -ArgumentList $arguments -NoNewWindow \ No newline at end of file diff --git a/csm/CsmServiceJMeterTests.sh b/csm/CsmServiceJMeterTests.sh index 12df1425bf4..3fd28d4de92 100644 --- a/csm/CsmServiceJMeterTests.sh +++ b/csm/CsmServiceJMeterTests.sh @@ -6,8 +6,19 @@ # Set the script root directory (directory of this script) SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -# Path to JMeter executable (adjust if needed) -JMETER_BIN="/home/johannes/dev/jmeter/bin/jmeter.sh" +# Path to JMeter executable: use first argument if provided, otherwise fall back to default +JMETER_BIN="${1:-/home/johannes/dev/jmeter/bin/jmeter.sh}" + +# Validate JMeter executable +if [[ ! -f "$JMETER_BIN" ]]; then + echo "Error: JMeter executable not found at '$JMETER_BIN'" >&2 + exit 1 +fi + +if [[ ! -x "$JMETER_BIN" ]]; then + echo "Error: JMeter executable at '$JMETER_BIN' is not executable" >&2 + exit 1 +fi # Arguments ARGUMENTS=() @@ -15,4 +26,4 @@ ARGUMENTS+=("--addprop" "$SCRIPT_DIR/CsmServiceJMeterTests.properties") ARGUMENTS+=("--testfile" "$SCRIPT_DIR/CsmServiceJMeterTests.jmx") # Execute JMeter -"$JMETER_BIN" "${ARGUMENTS[@]}" +"$JMETER_BIN" "${ARGUMENTS[@]}" \ No newline at end of file