forked from bitbar/test-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-tests_android.sh
More file actions
39 lines (20 loc) · 888 Bytes
/
Copy pathrun-tests_android.sh
File metadata and controls
39 lines (20 loc) · 888 Bytes
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
#!/bin/bash
TEST=${TEST:="android_sample_spec.rb"} # Name of the test file
##### Cloud testrun dependencies start
echo "Extracting tests.zip..."
unzip tests.zip
## Environment variables setup
export SCREENSHOT_FOLDER=target/reports/screenshots/
echo "Starting Appium ..."
# Use appium-X.X, to choose a specific Appium server version. More about supported versions at
# https://support.smartbear.com/bitbar/docs/en/mobile-app-tests/automated-testing/appium-support.html
appium --log-no-colors --log-timestamp
##### Cloud testrun dependencies end.
## Run the test:
bundle install
echo "Running test ${TEST}"
# Make sure there's no pre-existing `screenshots` files
rm -rf screenshots
bundle exec rspec ${TEST} --format RspecJunitFormatter --out TEST-all.xml
# Screenshots need to be available at root as directory `screenshots` .
cp -a ${SCREENSHOT_FOLDER}. screenshots/