add more details to cypress pilot script w/ burnettk

This commit is contained in:
jasquat 2023-03-10 10:52:37 -05:00
parent 91ddb0cbdd
commit 3428d9a394
1 changed files with 8 additions and 2 deletions

View File

@ -30,9 +30,15 @@ if [[ -z "${CYPRESS_SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK:-}" ]]; then
export CYPRESS_SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK=true
fi
cypress_run_file="/var/tmp/cypress_run_$(date +%s)"
cypress_run_file="/var/tmp/cypress_run"
echo "Recording stats to ${cypress_run_file}"
if [[ ! -f "$cypress_run_file" ]]; then
echo "success,duration,start_time,end_time,frontend_url" >"$cypress_run_file"
fi
frontend_url="${SPIFFWORKFLOW_FRONTEND_URL:localhost}"
for attempt in $(seq 1 "$ATTEMPTS" ); do
echo "Running attempt: ${attempt}"
@ -43,6 +49,6 @@ for attempt in $(seq 1 "$ATTEMPTS" ); do
fi
end_time=$(date +%s)
echo "${success},$(( end_time - start_time ))" >>"$cypress_run_file"
echo "${success},$(( end_time - start_time )),$(date "-d@${start_time}"),$(date "-d@${end_time}"),${frontend_url}" >>"$cypress_run_file"
done
echo "Recorded stats to ${cypress_run_file}"