Git Product home page Git Product logo

broit-tests's Introduction

Tests implementation

Tech stack

  • Gradle
  • Java 17 (gradle allure plugin does not want to work with java 21)
  • Selenide
  • JUnit 5
  • Allure

Test cases

NB: Assumption is that to check that 'Order can be placed' it is enough to check that checkout page can be opened from cart. Actual filling of checkout form is/should be covered by other existing tests.

NB2: For both testcases below we check addition to cart and checkout in one test, which is not ideal. Ideally, we would like to separate tests:

  1. One just adds items to the cart,
  2. Another Proceeds to checkout. And for test that proceeds to checkout we would like to prepare cart not via UI (e.g. via API). Unfortunately, we do not have this opportunity now, hence tests are combined (because for test that proceeds to checkout we need to add items to the cart vial UI anyway).

NB3: Checks of items include title and quantity only for now. But they can be easily enhanced to validate more parameters.

Add multiple same items to the cart and proceed to checkout

  • add an item with quantity 2 to cart
  • check that the cart has what we added
  • proceed to checkout
  • check that checkout form shows what we added

Add different items to the cart and proceed to checkout

  • add an item with quantity 1 to cart
  • add different item with quantity 1 to cart
  • check that the cart has what we added
  • proceed to checkout
  • check that checkout form shows what we added

Architecture overview

  • com.broit.components - contains UI components which encapsulate interactions with them
  • com.broit.constaints - contains constants to avoid direct usage of their string values
  • com.broit.forms - contains UI forms (most likely pages; static for simplicity, may components, and elements directly)
  • com.broit.models - contains models that are used to share/check data
  • com.broit.tests - contains tests
  • com.broit.utils - contains useful utilities

How to run tests

./gradlew clean test

How to generate allure report

./graldew allureReport

How to run allure server locally

./gradlew allureServe

Future enhancements

  • clarify FIXME comments left in code
  • prettify steps in tests and in allure report
  • whatever you like

broit-tests's People

Contributors

eugenenekh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.