planka icon indicating copy to clipboard operation
planka copied to clipboard

[Client] Setup UI test using BDD approach

Open amrita-shrestha opened this issue 2 years ago • 2 comments

Description

This PR adds setup for UI testing that uses Behavior Driven Development (BDD) approach. Used testing libraries:

  • nightwatch
  • nightwatch-api
  • @cucumber/cucumber
  • @cucumber/pretty-formatter

Example test scenario included:

  • login with valid credentials

Motivation and Context

Why BDD? BDD provides shared tools and processes across the entire (technical and non-technical) team to foster collaboration in meeting defined business requirements. BDD increases and improves collaboration. By using plain language, all are able to write behavior scenarios. With BDD, as its name says, you focus on the behavior, which has a stronger impact than the implementation itself.

Related Issue

#13

How Has This Been Tested?

  • locally

How to run UI test?

Pre-requisite:

  • Docker

Step to run tests

  1. Pull and run selenium docker image
docker run -d --network="host" -v /dev/shm:/dev/shm selenium/standalone-chrome-debug
  1. Run planka project
  2. Run UI test with following command:
cd client
npm run test:webui tests/acceptance/features

Note: UI test will run in chrome browser (other browsers can be set up)

amrita-shrestha avatar Aug 20 '21 08:08 amrita-shrestha

Hi, @meltyshev I would be glad if you could review and give your opinion

amrita-shrestha avatar Aug 20 '21 08:08 amrita-shrestha

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 16 '23 23:01 CLAassistant