Skip to content

Commit

Permalink
KOGITO-1044 - Kogito runtime performance and load tests (apache#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarianMacik committed Oct 3, 2023
1 parent 3ac9138 commit 21cf553
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hack/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function usage(){
printf "\n--timeout {TIMEOUT_IN_MINUTES}\n\tSet a timeout overall tests run in minutes. Default is 240."
printf "\n--debug\n\tRun in debug mode."
printf "\n--smoke\n\tFilter to run only the tests tagged with '@smoke'."
printf "\n--performance\n\tFilter to run only the tests tagged with '@performance'. If not provided and the tag itself is not specified, these tests will be ignored."
printf "\n--load_factor {INT_VALUE}\n\tSet the tests load factor. Useful for the tests to take into account that the cluster can be overloaded, for example for the calculation of timouts. Default value is 1."
printf "\n--local\n\tSpecify whether you run test in local."
printf "\n--ci {CI_NAME}\n\tSpecify whether you run test with ci, give also the name of the CI."
Expand Down Expand Up @@ -163,6 +164,10 @@ case $1 in
addParam "--tests.smoke"
shift
;;
--performance)
addParam "--tests.performance"
shift
;;
--load_factor)
shift
if addParamKeyValueIfAccepted "--tests.load-factor" ${1}; then shift; fi
Expand Down
12 changes: 12 additions & 0 deletions hack/run-tests.sh.bats
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@
[[ "${output}" != *"--tests.smoke"* ]]
}

@test "invoke run-tests with performance" {
run ${BATS_TEST_DIRNAME}/run-tests.sh --performance --dry_run
[ "$status" -eq 0 ]
[[ "${output}" =~ "--tests.performance" ]]
}

@test "invoke run-tests without performance" {
run ${BATS_TEST_DIRNAME}/run-tests.sh --dry_run
[ "$status" -eq 0 ]
[[ "${output}" != *"--tests.performance"* ]]
}

@test "invoke run-tests with load_factor" {
run ${BATS_TEST_DIRNAME}/run-tests.sh --load_factor 3 --dry_run
[ "$status" -eq 0 ]
Expand Down

0 comments on commit 21cf553

Please sign in to comment.