/FAIMS3-automated-tests

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Automated Testing for FAIMS Frontend

Preconditions

  • Fill User Fixture with your own Login and Password, choose isLocal(true,false) for local and browserstack run .env file (create in root project)

  • Fill BrowserStack Credential Android bs.conf.ts

  • Fill BrowserStack Credential iOs bsiOs.conf.ts

  • Run tests BrowserStack Android - npm run testBrowserStack

  • Run tests BrowserStack iOs - npm run testBsIos

  • Go to BrowserStack Dashboard

Device list

Android

Can be managed on bs.conf.ts just add

'bstack:options': {
    projectName: "FAIMS3",
    buildName: 'FAIMS3 Android',
    deviceName: 'Samsung Galaxy Tab S8',
    platformVersion: '12.0',
    platformName: 'android',
}

in the capabilities array.

iOs

Can be managed on .env just add

DEVICE_NAME="iPad Pro 11 2022" or DEVICE_NAME="iPhone 14"

in the capabilities array.

Local Run

For local run you need to be sure appium was run, appium-doctor doesn't have any critical issues

Install appium-doctor

npm install @appium/doctor --location=global

Running appium-doctor will check that your machine is set up properly for appium.

Run Appium

Appium - run npm run appium.

File for run was described in wdio.conf.ts appium:app

Open Android Studio and run emulator (Freeform not supported now, use like Nexus 9 or another tablet or phone). iOs not implemented yet for local testing.

  • Run tests local emulator - npm run test
  • Be sure you have one screenshot or image on emulator
  • Appium versions 2.0
  • Node version 18

To resolve issues with appium android_home, java_home

Add the following lines to ~/.bash_profile or equivalent.

export ANDROID_HOME=/Users/xxx/Library/Android/sdk
export JAVA_HOME=$(/usr/libexec/java_home)

Reporter

After Suite run was finished you can look on report - Reporter.

Test suites

Create new notebook Suite - newNoteBookTablet.ts

Sing in Tests Suite - SignInTests.ts

User Tests Suite - UserTests.ts

WorkSpaceSuite - WorkSpaceTests.ts

Locators

Described by Pages pages.