feat(test): Add support to run UI tests in CI pipeline (#1539)

This commit is contained in:
Jagan
2023-07-05 19:01:42 +05:30
committed by GitHub
parent 5628985c40
commit 21f5e20929
12 changed files with 1407 additions and 92 deletions

31
.github/scripts/run_ui_tests.sh vendored Normal file
View File

@ -0,0 +1,31 @@
#! /usr/bin/env bash
sudo apt update
apt install net-tools
mkdir tests
#download connector ui tests
while [ ! -f $HOME/target/test/connector_tests.json ]
do
if [ $SECONDS > 20 ]
then
exit 1
fi
sleep 2
wget $UI_TESTCASES_PATH && mv testcases $HOME/target/test/connector_tests.json
done
firefox --version
$GECKOWEBDRIVER/geckodriver > tests/geckodriver.log 2>&1 &
#start server and run ui tests
cargo run &
#Wait for the server to start in port 8080
while netstat -lnt | awk '$4 ~ /:8080$/ {exit 1}'; do
if [ $SECONDS > 900 ]
then
exit 1
else
sleep 10
fi
done