mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-02-05 08:18:05 -05:00
3cfba7a08e
Signed-off-by: hrj <harshad.rj@gmail.com>
24 lines
468 B
Bash
Executable File
24 lines
468 B
Bash
Executable File
set -ex
|
|
|
|
python3 -m venv testEnv
|
|
source ./testEnv/bin/activate
|
|
pip install locust
|
|
java -jar target/scala-2.13/LibreCaptcha.jar &
|
|
JAVA_PID=$!
|
|
sleep 4
|
|
|
|
locust --headless -u 300 -r 100 --run-time 4m --stop-timeout 30 -f tests/locustfile.py
|
|
status=$?
|
|
|
|
if [ $status != 0 ]; then
|
|
kill $JAVA_PID
|
|
exit $status
|
|
fi
|
|
|
|
echo Run functional test
|
|
locust --headless -u 1 -r 1 --run-time 1m --stop-timeout 30 -f tests/locustfile-functional.py
|
|
status=$?
|
|
|
|
kill $JAVA_PID
|
|
exit $status
|