Skip to content

Repository files navigation

Usage Guide

Overview

WebdriverIO + Cucumber BDD test suite for the BStackBank Android app, running on BrowserStack App Automate.

Target devices: Google Pixel 8 / Android 14, Xiaomi Redmi Note 11 / Android 11

Note: Use a Non-Samsung device, as the locators are mapped as per it.


Prerequisites

  1. Node.js ≥ 18

  2. BrowserStack credentials — copy .env.example to .env and fill in your values:

    cp .env.example .env

    Then open .env and set:

    BROWSERSTACK_USERNAME=<your-username>
    BROWSERSTACK_ACCESS_KEY=<your-access-key>
    BS_APP_ID=bs://<your-app-id>
    

    Find your credentials at BrowserStack App Automate dashboard.

  3. Upload the app to BrowserStack to get your BS_APP_ID:

    The app APK is: app-release.apk

    Upload it using the BrowserStack REST API:

    curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
      -X POST "https://api-cloud.browserstack.com/app-automate/upload" \
      -F "file=@your-path/app-release.apk"

    The response will contain an app_url like bs://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. Set that as BS_APP_ID in your .env.

    Full upload docs: Upload app from filesystem – BrowserStack

  4. Install dependencies:

    npm install

Running Tests

Run all tests on both devices (Pixel 8 + Xiaomi Redmi Note 11)

npm test

Run on Pixel 8 only

npm run test:pixel

Run individual feature files

npm run test:signup          # Session 1: signup only
npm run test:view-balance    # Standalone: signup → view balance → delete account
npm run test:delete-account  # Delete account only (requires active session from signup)

Run on Xiaomi Redmi Note 11

npm run test:xiaomi      # Full suite on Xiaomi Redmi Note 11 / Android 11

Run by tag

npm run test:smoke       # @smoke scenarios
npm run test:regression  # @regression scenarios

Run directly with WDIO

PLATFORM=android npx wdio run wdio.conf.js --spec features/signup.feature

Test Scenarios

The suite runs as 2 parallel sessions:

Session 1 — features/signup.feature + features/delete-account.feature (shared session)

Feature Scenario Description
signup.feature Signup with auto-credentials and land on home dashboard Autofill → eye icon → Create Account → home dashboard
delete-account.feature Go to profile and delete the account Profile tab → scroll → Delete Account → confirm → login screen

Session 2 — features/view-balance.feature (self-contained session)

Feature Scenario Description
view-balance.feature Signup, view balance, then delete account Signup → home dashboard → tap eye icon → biometric PASS → balance revealed → delete account

About

This repository contains test scripts for BStackBank App, which can be used as a base repository for test companion demos.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages