-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstartup.sh
executable file
·99 lines (90 loc) · 2.8 KB
/
startup.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/sh
#reruns test up to 4 times if failed
runTest()
{
local i=0
local max=4
while [ $i -lt $max ]
do
if dotnet test -s $1 --filter Name=$2; then
break
else
true $(( i++ ))
fi
done
}
#Make sure adb server working
adb kill-server
adb start-server
sleep 5
#Start Android Emulator
targetWindowName=$(osascript -e 'tell app "Terminal" to do script "~/Library/Android/sdk/emulator/emulator -avd Pixel_XL_API_33"')
androidEmulator_window_id=$(echo ${targetWindowName} | sed 's/.*window id \([0-9]*\).*/\1/')
echo "Android window ${androidEmulator_window_id}"
#Boot IOS Simulator
targetWindowName=$(osascript -e 'tell app "Terminal" to do script "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID 75EBD8C0-A809-4C7C-B45D-169469835DC4"')
iosEmulator_window_id=$(echo ${targetWindowName} | sed 's/.*window id \([0-9]*\).*/\1/')
echo "IOS window ${iosEmulator_window_id}"
#Wait for emulators
sleep 60
#Test android
runTest android.runsettings ClickAcceptAllButtonTest
sleep 5
runTest android.runsettings ClickRejectAllButtonTest
sleep 5
runTest android.runsettings OpenPmLayersTest
sleep 5
runTest android.runsettings SaveAndExitGDPRTest
sleep 5
runTest android.runsettings SaveAndExitCCPATest
sleep 5
runTest android.runsettings SaveAndExitUSNATTest
sleep 5
runTest android.runsettings ClearAllButtonTest
sleep 5
runTest android.runsettings AuthIdTest
sleep 5
runTest android.runsettings AcceptRejectAllUsnatInPMTest
sleep 5
runTest android.runsettings ProgramaticRejectAllGDPRTest
sleep 5
runTest android.runsettings ProgramaticRejectAllCCPATest
sleep 5
runTest android.runsettings ProgramaticRejectAllUSNATTest
sleep 5
runTest android.runsettings ProgramaticCustomConsentGDPRTest
sleep 5
runTest android.runsettings MessageLanguageTest
#Kill android emulator
osascript -e 'tell app "Terminal" to close window id '${androidEmulator_window_id}''
sleep 5
#Test ios
runTest ios.runsettings ClickAcceptAllButtonTest
sleep 5
runTest ios.runsettings ClickRejectAllButtonTest
sleep 5
runTest ios.runsettings OpenPmLayersTest
sleep 5
runTest ios.runsettings SaveAndExitGDPRTest
sleep 5
runTest ios.runsettings SaveAndExitCCPATest
sleep 5
runTest ios.runsettings SaveAndExitUSNATTest
sleep 5
runTest ios.runsettings ClearAllButtonTest
sleep 5
runTest ios.runsettings AuthIdTest
sleep 5
runTest ios.runsettings AcceptRejectAllUsnatInPMTest
sleep 5
runTest ios.runsettings ProgramaticRejectAllGDPRTest
sleep 5
runTest ios.runsettings ProgramaticRejectAllCCPATest
sleep 5
runTest ios.runsettings ProgramaticRejectAllUSNATTest
sleep 5
runTest ios.runsettings ProgramaticCustomConsentGDPRTest
sleep 5
runTest ios.runsettings MessageLanguageTest
#Kill ios emulator
osascript -e 'tell app "Terminal" to close window id '${iosEmulator_window_id}''