Skip to content

Exercise Overview

Popescu_G edited this page Mar 16, 2025 · 1 revision

Initial tests created with testNG -> login; add 1 product to cart; inspect cart content; fill in checkout details; check total without tax; check order completion message
-> login; add multiple different products to cart (site does not allow same product to be added multiple times);
inspect cart content; fill in checkout details; check total without tax; check order completion message
-> attempt login using wrong credentials; check error message
-> attempt login using blocked account; check error message
-> attempt to partially fill checkout information; check error message

The tests were grouped into two suites:
-> ErrorValidationTests
-> SubmitOrderTests
A Master-suite.xml was also added to run both suites with one command

More tests were made after proper planning using Cucumber. For more informations, check the Jira Planning Page
Example:
Feature: Cart Page

Scenario: Products added are listed in cart

  • Given At least one product was added to cart  
    
  • Then Previously added products from Inventory page are visible in cart  
    

Scenario: Remove product from cart

  • Given At least one product was added to cart  
    
  • When I remove one product from cart  
    
  • Then Removed product is no longer in Cart  
    

Scenario: Unable to checkout without products in cart

  • When I click on "Checkout" button from Cart page   
    
  • Then I am notified the Cart is empty and cannot proceed to checkout  
    
  • And I am still in cart page  
    

Scenario: User clicks on 'continue shopping'

  • When I click on "Continue Shopping" button from Cart page  
    
  • Then I am taken back to Inventory page  
    

Scenario: User proceeds to checkout

  • Given At least one product was added to cart  
    
  • When I click on "Checkout" button from Cart page  
    
  • Then I proceed to checkout  
    

Checkout.feature
Confirmation.feature
Inventory.feature
Login.feature
Overview.feature
Product.feature
Those can be run from TestNGTestRunner found in AutomationPractice\src\test\java\CucumberTests

Clone this wiki locally