71 lines
1.4 KiB
Bash
71 lines
1.4 KiB
Bash
#!/bin/sh
|
|
pip3 install -r requirements.txt
|
|
pip3 install -U pytest
|
|
|
|
echo
|
|
echo "#\n# Launching the users unit tests\n#"
|
|
echo
|
|
python3 -m pytest Tests/test_api_user.py -v
|
|
status=$?
|
|
if test $status -ne 0
|
|
then
|
|
echo "Error when executing the Users unit tests."
|
|
exit 1
|
|
else
|
|
echo "Successfully passed the Users unit tests."
|
|
fi
|
|
|
|
echo
|
|
echo "#\n# Launching the reports unit tests\n#"
|
|
echo
|
|
python3 -m pytest Tests/test_api_reports.py -v
|
|
status=$?
|
|
if test $status -ne 0
|
|
then
|
|
echo "Error when executing the Reports unit tests."
|
|
exit 1
|
|
else
|
|
echo "Successfully passed the Reports unit tests."
|
|
fi
|
|
|
|
echo
|
|
echo "#\n# Launching the reports unit tests\n#"
|
|
echo
|
|
python3 -m pytest Tests/pytest_api_vehicles.py -v
|
|
status=$?
|
|
if test $status -ne 0
|
|
then
|
|
echo "Error when executing the Vehicles unit tests."
|
|
exit 1
|
|
else
|
|
echo "Successfully passed the Vehicles unit tests."
|
|
fi
|
|
|
|
echo
|
|
echo "#\n# Launching the Authentifications unit tests\n#"
|
|
echo
|
|
python3 -m pytest Tests/test_api_login.py -v
|
|
status=$?
|
|
if test $status -ne 0
|
|
then
|
|
echo "Error when executing the Authentifications unit tests."
|
|
exit 1
|
|
else
|
|
echo "Successfully passed the Authentifications unit tests."
|
|
fi
|
|
|
|
echo
|
|
echo "#\n# Launching the Emails unit tests\n#"
|
|
echo
|
|
python3 -m pytest Tests/test_api_email.py -v
|
|
status=$?
|
|
if test $status -ne 0
|
|
then
|
|
echo "Error when executing the Emails unit tests."
|
|
exit 1
|
|
else
|
|
echo "Successfully passed the Emails unit tests."
|
|
fi
|
|
|
|
echo
|
|
exit 0 |