-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sh
executable file
·53 lines (44 loc) · 1.63 KB
/
build.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
#!/bin/bash
#------------------------------------------------------
# Automation Builder (for Docker Compose)
#------------------------------------------------------
CYAN='\e[1;36m'
NC='\e[0m'
ARTIFACTS=artifacts
TAG_BUILD=$1
echo -e "${CYAN}Set Build Number(${TAG_BUILD})${NC}"
echo "" >> src/main/python/setup.cfg
echo "[egg_info]" >> src/main/python/setup.cfg
echo "tag_build=${TAG_BUILD}" >> src/main/python/setup.cfg
echo -e "${CYAN}Install Dependencies${NC}"
python -m pip install enum34
python -m pip install paramiko
python -m pip install PyYAML
python -m pip install requests
#python -m pip install selenium
python -m pip install Appium-Python-Client
echo -e "${CYAN}Build uiXautomation(PyXTaf*.whl file) project & Run unit tests${NC}"
python -m pip install pybuilder
pyb -v clean publish
# ARGS=${@:2}
# echo -e "${CYAN}Run tests according to arguments(${ARGS})${NC}"
# python -m pip install dist/dist/PyXTaf*.whl
# python -m PyXTaf ${ARGS}
echo -e "${CYAN}Run BDD/ATDD tests and save artifacts/results${NC}"
python -m pip install dist/dist/PyXTaf*.whl
mkdir -p ${ARTIFACTS}
mv build/reports/*.xml ${ARTIFACTS}/
pushd . >/dev/null
cd ./src/test/python
echo -e "${CYAN}Run BDD test(s)${NC}"
python -m pip install allure-behave
python -m bpt.bdd -f allure_behave.formatter:AllureFormatter \
-o ../../../${ARTIFACTS}/allure -t ~@wip \
-D browser="chrome" -D is_remote="True"
echo -e "${CYAN}Run ATDD test(s)${NC}"
python -m pip install robotframework
python -m robot -d ../../../${ARTIFACTS}/robot \
-v is_remote:True -v enable_screenshot:True bpt/atdd/robot/bing.robot
popd > /dev/null
mv dist/dist/PyXTaf*.whl ${ARTIFACTS}/
chmod a+w -R ${ARTIFACTS}/