BrowserStack#

BrowserStack is a cloud-based testing platform that enables developers to test their websites and mobile applications across a vast range of browsers and operating systems without the need to set up and maintain a lab of physical testing devices.

This guide shows you how to integrate BrowserStack Automate into your Semaphore workflows.

Integrating BrowserStack Automate into Semaphore#

If you are new to Semaphore and have not yet set-up a project, please view the guide on how to set-up a Semaphore Project.

Code Snippets used in Video#

Restore cached dependencies and run tests:

cache restore
npm install
cache store
npm run sample-test

Name tests using Semaphore Job ID and the project name:

/** Top content of .test.js file ... */

const BUILD_NAME = process.env.SEMAPHORE_PROJECT_NAME
const SEMAPHORE_JOB_ID = process.env.SEMAPHORE_JOB_ID
/** Your username and access key variables ... **/

/** Your code for describe block ... */

/** Driver options naming block */

driver = new Builder()
    .usingServer(`http://localhost:4444/wd/hub`)
    .withCapabilities({...Capabilities.chrome(),
    'bstack:options' : {
        "buildName" : "semaphore-" + BUILD_NAME + "-" + SEMAPHORE_JOB_ID,
        "userName" : username,
        "accessKey" : accessKey,
        "seleniumVersion" : "4.0.0",
    },
}).build();

/** Your after all and code blocks ... */

Integrating Percy into Semaphore#

Percy by BrowserStack is a visual testing and review platform designed to help development teams detect visual changes in web applications and websites. It automates the process of capturing screenshots of web pages and comparing them against the baseline to identify any visual regressions.

To set-up Percy in your Semaphore workflows, please follow the official guide.

BrowserStack Automate Guides#