forked from salabs/TestArchiver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_fixture_robot.sh
executable file
·61 lines (49 loc) · 1.85 KB
/
run_fixture_robot.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# This script is used to run and archive the Robot Framework fixture test that
# are also used as the test data for the archiver API server.
DB_NAME="fixture_archive"
DB_USER="robot"
DB_PASSWORD="robot"
DB_HOST="localhost"
DB_PORT=5432
REQUIRE_SSL=false
cat << EOF > fixture_config.json
{
"db_engine": "postgresql",
"database": "${DB_NAME}",
"host": "${DB_HOST}",
"port": "${DB_PORT}",
"user": "${DB_USER}",
"password": "${DB_PASSWORD}",
"require_ssl": ${REQUIRE_SSL}
}
EOF
PYTHONPATH="robot_tests/libraries:robot_tests/resources:."
# Comment this if you would like to run the fixture tests with sleeps
# that are useful as more interesting running time data
EXCLUDE_SLEEP="--exclude sleep"
###############################################################################
psql -c "DROP DATABASE ${DB_NAME};"
psql -c "CREATE DATABASE ${DB_NAME} OWNER robot;"
echo "----------------------------------------"
echo " First archive one round of robot tests with a listener"
echo "----------------------------------------"
robot --listener test_archiver.ArchiverRobotListener:fixture_config.json \
--pythonpath ${PYTHONPATH} ${EXCLUDE_SLEEP} \
--outputdir robot_tests/run1 \
--metadata team:"TestArchiver" \
--metadata series:"Robot listener" \
--metadata series2:Fixture#1 \
robot_tests/tests
for RUN in 2 3 4 5 6 7 8 9 10
do
echo "----------------------------------------"
echo " Run robot tests and and archive with parser (${RUN}/10)"
echo "----------------------------------------"
robot --pythonpath ${PYTHONPATH} ${EXCLUDE_SLEEP} \
--outputdir robot_tests/run${RUN} \
robot_tests/tests
python3 -m test_archiver.output_parser robot_tests/run${RUN}/output.xml \
--config fixture_config.json \
--team "TestArchiver" --series "Fixture"#${RUN} --series "Parser"
done