Skip to content

Commit a64a1bc

Browse files
committed
script to run cypress test locally
1 parent e43310f commit a64a1bc

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

run_browser_tests.sh

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash -x
2+
3+
# Run it from the 'ui' directory as:
4+
# ./run_browser_tests.sh
5+
6+
# You can also run it without building the QuestDB project (if it is already built):
7+
# ./run_browser_tests.sh -skipQuestDBBuild
8+
9+
rm -rf packages/browser-tests/cypress/snapshots/*
10+
rm -rf tmp/questdb-*
11+
rm -rf tmp/dbroot
12+
13+
if [[ $1 = "-skipQuestDBBuild" ]]
14+
then
15+
echo "Skipping QuestDB build"
16+
else
17+
mvn clean package -f packages/browser-tests/questdb/pom.xml -DskipTests -P build-binaries
18+
fi
19+
20+
tar xzf packages/browser-tests/questdb/core/target/questdb-*-rt-*.tar.gz -C tmp/
21+
mkdir tmp/dbroot
22+
23+
yarn install --immutable --immutable-cache
24+
yarn workspace @questdb/react-components run build
25+
yarn workspace @questdb/web-console run build
26+
27+
./tmp/questdb-*/bin/questdb.sh start -d ./tmp/dbroot
28+
node packages/web-console/serve-dist.js &
29+
PID="$!"
30+
echo "Proxy started, PID=$PID"
31+
32+
yarn workspace browser-tests test
33+
34+
kill -SIGTERM $PID
35+
./tmp/questdb-*/bin/questdb.sh stop

0 commit comments

Comments
 (0)