Skip to main content
No Result Found

Run accessibility checks on a sample repo

Try out App Accessibility Automation with our sample repository.

This feature is currently in Alpha. To get access, contact support.

Prerequisites

  • Ensure you have a BrowserStack Username and Access key. Obtain your username and access key from the Account & Profile section on the dashboard.
    If you have not yet created an account, sign up for a Free Trial.
  • App Accessibility Automate supports WebDriverIO (WDIO) versions 8 and 9. Ensure least one of them is installed on your system.
  • Node.js recommendations:
    • For WDIO v8, it is recommended to use Node.js v16.19.0.
    • For WDIO v9, it is recommended to use Node.js v20.11.1.
    • To install, run nvm install {node.js version number} in your terminal.

Run sample build

Here is how you can run a sample WebdriverIO (WDIO) test build on BrowserStack:

Download or clone the sample test repository

Get the sample project using one of the following options:

git clone -b sdk https://github.com/browserstack/webdriverio-appium-app-browserstack

Check and install WDIO dependencies

  1. Navigate to the Android or iOS directory based on the app you want to test.
  2. Ensure that all the WDIO dependencies in package.json are set to version 9.
  3. Install the dependencies.
    npm install
    

Set access credentials

Save your BrowserStack credentials as environment variables to make it easier to run your test suite from your local or CI environment.

# Set these values in your ~/.zprofile (zsh) or ~/.profile (bash)
export BROWSERSTACK_USERNAME="YOUR_USERNAME"
export BROWSERSTACK_ACCESS_KEY="YOUR_ACCESS_KEY"
setx BROWSERSTACK_USERNAME "YOUR_USERNAME" 
setx BROWSERSTACK_ACCESS_KEY "YOUR_ACCESS_KEY" 
set BROWSERSTACK_USERNAME=YOUR_USERNAME
set BROWSERSTACK_ACCESS_KEY=YOUR_ACCESS_KEY

Modify the WDIO configuration file

You must configure certain parameters in the WDIO configuration file located at /examples/run-parallel-test/parallel.conf.js to run the tests.

  1. Open the WDIO configuration file of your preferred project, Android or iOS.
  2. Set the accessibility flag to true.

The projectName and buildName config must be static and not change across different runs of the same build. This is a deviation in approach as specified by BrowserStack App Automate since Automated tests will automatically identify different build runs.

Sample WDIO configuration
Copy icon Copy

Run the sample test

In the sample test repository, run the following command:

npm run test

View the Accessibility test report

After the test completes, access the report in your project folder on the App Accessibility dashboard.


Visit App Accessibility dashboard

Next steps

Integrate Accessibility testing into App Automate.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle