Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Overview:

The solution uses the AQ Test Framework - Mobile and allows us to write the test cases for SimplyE/Vanilla for Android and iOS. Each test is based on a user story written in the formally specified ubiquitous language based on English. To write the test as a tool of BDD we use Cucumber. As a test runner we use TestNG.


Repository:

https://github.com/NYPL-Simplified/integration-tests-android


Structure:

  • runners - Test runner of cucumber tests that allows run the tests using a class where built-in inner behaviors and dependencies.
  • features - Cucumber features written on Gherkin language.
  • steps - classes to store methods which are linked to exact sentences from Features. The methods performs the needed actions.
  • constants - constants that applied to the project classes. The main place of class data like labels names, timeouts, markup attributes, etc.
    • application - constants describing parts of the application
    • context - constants of the cucumber main context
  • factories - classes that implement any type of factory pattern
  • framework - support functionality to the AQ Framework
    • configuration - providers of the test data
    • utilities - utility files that extend the built-in functionality of the framework
      • keyboard - utility working with physical OS keyboard
      • swipe - utility for any type of the swipe actions 
  • hooks - hooks that executing before/after every test/feature
  • models - page objects models.
  • screens - all classes with the description of every screen in the application. Every screen description separated on ios/android package it is necessary for a specific platform screen description. Every screen realization must extend the abstract class where placed methods for this screen. On this abstract class pageFactory build class for the platform from the config
  • transformers - transformers allow to transform any specific word or table from Features to the java objects.


Test case creation example:

Let's imagine we want to create a following test case(Android):

...

  1. Go to https://github.com/NYPL-Simplified/integration-tests-android/actions
  2. Select Test Run workflow
  3. Expand run workflow → Fill in the fields → Click Run Workflow

 

  • Use workflow from - git branch to launch (usually master)
  • Tags to run - tags (e.g. @tier1 @tier2 @tier3) if you wanna run specific tier
  • app_url - the app URL that can be gotten by this link when you will upload the app
  • build name - e.g simplye-5.0.10-50010-debug
  • Platform name - ios/android

Automatic run using GitHub Actions:

...