Giter VIP home page Giter VIP logo

fakestore-selenium-tests's Introduction

fakestore-selenium-tests

Collection of Selenium tests for Fakestore with Page Object Model

App links : Fakestore main page, Fakestore Docs

Fakestore is a fake web store created by @Testelka for the purpose of test automation training. Fakestore imitates a real online shop with travels and provides:

  • products' descriptions on product pages
  • product's categories
  • ability to add products to cart and finish the order
  • ability to add products to wishlist
  • user account creation

Short test framework description

This test framework is being built with Page Object Pattern.

So far, it has 11 Page Objects: ProductPage, CategoryPage, CartPage, BasePage, HeaderPage and FooterPage, CheckoutPage, OrderDetailsPage, OrderReceivedPage, MyOrdersPage, AccountPage

  • the first three ones represent the whole pages with methods and locators
  • BasePage is an abstract class and each PageObject class extends it
  • HeaderPage and FooterPage represent compontents visible on each page in the store
  • the last five were added during creation of CheckoutTests and also represent pages with methods and locators

Test cases covered (so far)

  • check that user can add product to cart from product page
  • check that user can add product to cart from category page
  • check that user can add 10 products to cart
  • check that user can modify amount of product on the product page
  • check that user can add 10 different products to cart
  • check that user can modify amount of product on the cart page
  • check that user can remove product on the cart page
  • check that user can finish order without creating new account
  • check that user can finish order after logging to existing account
  • check that user can finish order with creating new account
  • check that user can view order in "My Account" section
  • check validations for all mandatory fields during checkout

Installation

There are few ways to start using this repository:

  1. Clone with Git using command line and this command: git clone https://github.com/kat-kan/fakestore-selenium-tests
  2. Clone with Git using graphical user interface (for example Sourcetree)

Running the tests

You can run tests:

  • using "Run test" option in Intellij Idea IDE โš ๏ธ in Java 19 we need to add VM options "-Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 -Dfile.encoding=UTF-8" in run test config to see correct Polish letters
  • using mvn clean test command in terminal

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.