jlin412 / TS-Cypress-BDD

UI: Cypress, API: Cypress, BDD: Cucumber

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TS-Cypress-BDD

About

Overview: TypeScript UI and API with BDD testing framework

Systems under test:

Technology stack:

  • Basic: TypeScript, Cypress
  • BDD: Cucumber
  • UI: Cypress
  • API: Cypress
  • Reporting: Allure

Locally on your machine

Installation

  1. Install Node.js. 12+
  2. Install Yarn
  3. git clone the project.
  4. Install dependencies with a terminal command yarn install or npm install in the project's root folder.
  5. Additional step: You need to install Allure, if you want to use it.

Running tests

  1. Launch java -jar studentmgmt-0.0.1-SNAPSHOT.jar with yarn cy:api-setup in new terminal before running any api tests
  2. You can use Cypress GUI with yarn cy:ui command to execute individual feature and debug
  3. As well, you can start test suite with yarn cy:headless command.
  4. Also, you can start the suite and generate Allure report with yarn cy:allure and after it, open it with yarn allure:open.
  5. And the most prefered options is to use yarn cy:allure:open command, that would execute the suite, generate and open the report as an HTML doc.

After test

  • Framework creates allure reports, that located in allure-results folder.
  • Check the Running tests section to get more info about working with Allure reports.
  • Note: Allure folder would be cleared within the next test run.

Test Design Consideration

  • All individual scenario can be executed indepedently
  • For api test, If an resource is not available, 404 is assumed according to swapper documentation.
  • Some api operations are tested in combination in functional test cases (use cases of the api)

About

UI: Cypress, API: Cypress, BDD: Cucumber


Languages

Language:TypeScript 68.5%Language:Gherkin 20.1%Language:JavaScript 11.4%