Automated tests using Selenium with Java for an ECommerce
Automated tests using Selenium with Java for an ECommerce
E-commerce website
Framework Overview
🔹 Selenium WebDriver – Browser automation
🔹 TestNG – Test execution and parallel testing
🔹 Cucumber – BDD framework for behavior-driven testing
🔹 Git – Version control for test scripts
🔹 Jenkins – CI/CD pipeline for automated execution
🔹 Extent Reports / Allure Reports – Test reporting
🔧 Tools:
Eclipse/IntelliJ IDEA
Maven
Selenium WebDriver
TestNG
Allure Report
🎨 Project Design:
Web driver
testing
Maven
BDD with Cucumber
Jenkins
GIT
Automation Framework
Design considerations
a. POM (Page object model) pattern in the hybrid framework
b. Testng Implementation, Proper testng concepts and XML to run the project
c. Should have implemented reusable functional separately to improve more readability
d. Multi browser execution. Should have handled at least two browsers (Firefox and IE/Chrome)
e. Data driven concept – Input data should be imported from an external excel sheet (Ex: Using
Apache POI libraries in case of java) or Properties file or Flat file
f. Handled exceptions with exception handling & error messages
g. Should have used relative xpath wherever necessary
h. Check code is syntactically correct and executes end to end successfully
i. Use ID or Name locator instead of Xpath
j. Implementation with BDD with Cucumber along with Maven
k. Screen shots for the failed steps to be created
l. Extent/Allur reports to be generated
Best practices
1. If else condition is written to control the test script flow
2. Code for taking screen shot
3. Coding standard to be followed with proper comments
4. All scripts/business components/test results should be in respective folder
5. Should include page synchronization timers
6. Script to run end to end without any issue
7. Assertion and exception handling concept.
12. Fill details: First name, Last name, Company, Address, Address2, Country,
State, City, Zipcode, Mobile Number
18. Verify that 'ACCOUNT DELETED!' is visible and click 'Continue' button
7. Upload file
9. Click OK button
10. Verify success message 'Success! Your details have been submitted
successfully.' is visible
11. Click 'Home' button and verify that landed to home page successfully
6. Increase quantity to 4
15. Enter description in comment text area and click 'Place Order'
16. Enter payment details: Name on Card, Card Number, CVC, Expiration date
13. Enter description in comment text area and click 'Place Order'
14. Enter payment details: Name on Card, Card Number, CVC, Expiration date
12. Enter description in comment text area and click 'Place Order'
13. Enter payment details: Name on Card, Card Number, CVC, Expiration date
5. Click on any category link under 'Women' category, for example: Dress
6. Verify that category page is displayed and confirm text 'WOMEN - DRESS
PRODUCTS'
6. Verify that user is navigated to brand page and brand products are
displayed
8. Verify that user is navigated to that brand page and can see products
9. Click 'Cart' button and verify that products are visible in cart
12. Verify that those products are visible in cart after login as well
12. Verify that the delivery address and the billing address is same address
filled at the time registration of account
15. Enter description in comment text area and click 'Place Order'
16. Enter payment details: Name on Card, Card Number, CVC, Expiration date