try browserstack

native-events
webzwo0i 2020-11-15 01:54:23 +01:00
parent 5cc155940a
commit 1cd0dc86dc
3 changed files with 13 additions and 43 deletions

View File

@ -5,10 +5,12 @@ node_js:
cache: false
env:
global:
- secure: gQdsD91DHpaDXDyDzrxWUaYDZxzZC3ojkBWX6nbLbOgADSWhzHUqMShDQXGlT80G4SikOhtSGlS2aOtsRcPTOGRtwjrOkg266JY+Fa37yO6I7/xios8VZp56Tu6ADNuItLptP0nH/DY3rPEIfiztcd3h6jLZ0RJlGY7lkHpM3xs=
- secure: HxLMaehWXVYuhkJ54SqR+9czD6i8RtDhfx7WM8yTrRE2JtThqECfL+fjqrNMkG25zZpDISwCm082qb3Z5uE3tpARi9eizOLAuLbDwQeJNfV1vW7RBj3mZMhgfuwGMH5VkQsI1MiSPf3AIHPQdQSfkBTC5KiYzYsMay6VrKwEswA=
addons:
browserstack:
username:
secure: "UaX/yaRClPkIEVrBeB42ij47adqqqjt/2XW0sTw54Tdw8CrOxbnXH9M4dM+c8pJlm+TNw2elsxb+Y2O+mC2quzQnEO922pmQlCxlY8bJE6WXlA9G+OKB83qldtHg08egGXHjzTbhOF1rifRLvPvpmSqyV9Y9N/4Vn8JMoiDoIMU="
access_key:
secure: "RetrEdaZM1/BUSknutnUCCPpAXk4U0EZL6/m98Ku9jvGD1cgN3Q/Tycol4ZpoymiIkwLGgO4rdFVjCeuKDobQL/mLXLrH1mOva9ptAe5d5l6cxs66B7v0vunCICAHCjxew4wuqYnvEJL3I8Go2gO5MPMF9dV8Q4IRFXLDBNYCGw="
jobs:
include:
@ -19,7 +21,6 @@ jobs:
install:
#FIXME
- "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/g' settings.json.template > settings.json"
- "tests/frontend/travis/sauce_tunnel.sh"
- "bin/installDeps.sh"
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
script:

View File

@ -16,21 +16,13 @@ async function runTest(testSettings){
'browserName': testSettings.browserName,
'platformName': testSettings.platformName,
'browserVersion': testSettings.browserVersion,
'sauce:options': {
'username': process.env.SAUCE_USERNAME,
'accessKey': process.env.SAUCE_ACCESS_KEY,
'build': process.env.GIT_HASH,
'extendedDebugging': true, // when possible, enables network.har file and network tab
'capturePerformance': true, // when possible, enables various performance related metrics
'tunnelIdentifier': process.env.TRAVIS_JOB_NUMBER,
'name': name,
/* As a best practice, set important test metadata and execution options
such as build info, tags for reporting, and timeout durations.
*/
'maxDuration': 180,
'idleTimeout': 1000
}
}).usingServer("https://ondemand.saucelabs.com/wd/hub").build();
'browserstack.local': true,
'browserstack.localIdentifier': process.env.BROWSERSTACK_LOCAL_IDENTIFIER,
'build': process.env.GIT_HASH,
//'extendedDebugging': true, // when possible, enables network.har file and network tab
//'capturePerformance': true, // when possible, enables various performance related metrics
'name': name,
}).usingServer("https://hub-cloud.browserstack.com/wd/hub").build();
let session = await driver.getSession();
session = session.id_;
console.log(`https://saucelabs.com/jobs/${session}`);

View File

@ -1,23 +0,0 @@
#!/bin/bash
# download and unzip the sauce connector
#
# ACHTUNG: as of 2019-12-21, downloading sc-latest-linux.tar.gz does not work.
# It is necessary to explicitly download a specific version, for
# example https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz
# Supported versions are currently listed at:
# https://wiki.saucelabs.com/display/DOCS/Downloading+Sauce+Connect+Proxy
if [ -z "${SAUCE_USERNAME}" ]; then echo "SAUCE_USERNAME is unset - exiting"; exit 1; fi
if [ -z "${SAUCE_ACCESS_KEY}" ]; then echo "SAUCE_ACCESS_KEY is unset - exiting"; exit 1; fi
curl https://saucelabs.com/downloads/sc-4.6.2-linux.tar.gz > /tmp/sauce.tar.gz
tar zxf /tmp/sauce.tar.gz --directory /tmp
mv /tmp/sc-*-linux /tmp/sauce_connect
# start the sauce connector in background and make sure it doesn't output the secret key
(/tmp/sauce_connect/bin/sc --user "${SAUCE_USERNAME}" --key "${SAUCE_ACCESS_KEY}" -i "${TRAVIS_JOB_NUMBER}" --pidfile /tmp/sauce.pid --readyfile /tmp/tunnel > /dev/null )&
# wait for the tunnel to build up
while [ ! -e "/tmp/tunnel" ]
do
sleep 1
done