OUTDATED: QA Framework: Overview of Frontend Test Steps

To complete each Test, you will need to do the following within our main QA Framework Repo:

  1. Create Your Feature File 

  2.  

    1. Create a Feature File folder for the test you need. This Feature File will contain the Gherkin steps you write next): qaframework/tree/master/src/test/resources/features  Look around the other folders for example ocl-client, refapp2.x and refapp3.x(microfrontends). Make sure your Feature File is in a folder structure that makes logical sense so it will be easy for someone else to find this in the future. 

    2. Write out the steps in Gherkin Syntax and add these to the Feature File in the correct location here 

      1. Guidance here: https://cucumber.io/docs/gherkin/reference/ (steps in the feature file should be in the Gherkin BDD language, using "Given" "When") and more detailed guidance here: https://automationpanda.com/2017/01/30/bdd-101-writing-good-gherkin/

      2. Example 1: RefApp 2.x Login Test written in Gherkin syntax

      3. Example 2: Using Gherkin with a Cypress test

  3. Automate these Steps with Cypress

    1. Define where you're writing the Automation steps (e.g. Example])

  4.  

    1. Create Cypress Skeleton (EXISTING DOCUMENTATION link still needed) & add this to the repo

    2. Add Cucumber-Cypress pre-processor, and pass a setting to it that defines where you have the automation tests (e.g. Example )

    3. Define the place where the feature file sits (e.g. Example)

 

See more detailed guidance at QA Framework Technical documentation (Cucumber-Selenium & Cucumber-Cypress Set up)

 

Other Helpful Links 

  1. Tips for Cypress tests for React Apps: https://css-tricks.com/using-cypress-to-write-tests-for-a-react-application/ 

  2. Sample commit using Cypress + Cucumber: https://github.com/openmrs/openmrs-ocl-client/pull/595/files 

  3. General demo of using Cypress (without using the Cucumber Framework): https://iu.mediaspace.kaltura.com/media/t/1_mnruasd8?st=665

 

 

Related pages