Skip to content

Welcome to the Cypress Fully Automation Site repository! This repository contains a comprehensive automation framework built using Cypress for testing web applications.

License

Notifications You must be signed in to change notification settings

AbuBakkar32/cypress-fully-automation-site

cypress-fully-automation-site

Introduction

This project contains a comprehensive suite of automated tests for the website https://automationexercise.com. These tests are developed using Cypress, a next-generation front-end testing tool built for the modern web. The aim is to ensure the quality and functionality of the automationexercise website through robust and reliable automated testing.

Features

  • Robust End-to-End Testing: Ensure application stability with comprehensive automated test scenarios covering all critical user flows.
  • Extensive Test Coverage: Validate diverse application aspects, including UI interactions, form submissions, API integrations, and data integrity.
  • Quick Start & Easy Configuration: Effortlessly set up the testing environment with straightforward instructions and a clear project structure.
  • Highly Customizable Tests: Adapt and extend test scripts to meet specific application needs using Cypress's powerful and flexible API.
  • Seamless CI/CD Integration: Automate your testing pipeline by integrating with popular Continuous Integration and Continuous Delivery platforms.

Prerequisites

To run this project, you will need the following installed on your system:

  • Node.js: A recent LTS version is recommended (e.g., 18.x or 20.x). You can download it from https://nodejs.org/.
  • npm: Node Package Manager, which typically comes bundled with Node.js.

Installation

clone the repository and run the following command to install the dependencies

npm install

Usage

Local Execution

To run the tests headlessly in your local environment:

npm run cy:run

To open the Cypress Test Runner UI and run tests interactively:

npm run cy:open

Cypress Cloud Execution

To run tests and record the results on Cypress Cloud using the pre-configured script (if available and correctly set up with a record key):

npm run cy:cloud

Alternatively, to run tests on Cypress Cloud with a specific record key, use the following command. Replace YOUR_RECORD_KEY with your actual Cypress Cloud record key:

npx cypress run --record --key YOUR_RECORD_KEY

Note: The cy:cloud script in package.json may contain a hardcoded record key. It's recommended to use the command above with your own key for security and clarity.

demo3.png

demo.png

demo1.png

Test Cases

This project includes the following automated test cases:

  1. Register user.
  2. Login user with correct email and password.
  3. Login user with incorrect email and password.
  4. Logout user.
  5. Register user with existing email.
  6. Contact us form.
  7. Verify test cases page.
  8. Verify all products and product detail page.
  9. Search product.
  10. Verify subscription in home page.
  11. Verify subscription in cart page.
  12. Add products in cart.
  13. Verify product quantity in cart.
  14. Place order: Register while checkout.
  15. Place order: Register before checkout.
  16. Place order: Login before checkout.
  17. Remove products from cart.
  18. View category products.
  19. View & cart brand products.
  20. Search products and verify cart after login.
  21. Add review on product.
  22. Add to cart from recommended items.
  23. Verify address details in checkout page.
  24. Download invoice after purchase order.
  25. Verify scroll up using 'Arrow' button and scroll down functionality.
  26. Verify scroll up without 'Arrow' button and scroll down functionality.

Folder Structure

This project follows a standard Cypress project structure. Key directories include:

  • cypress/: The main directory for all test-related files.
    • cypress/e2e/: Contains all end-to-end test script files (e.g., .cy.js).
    • cypress/fixtures/: Stores static test data, like JSON files, that can be used by your tests.
    • cypress/support/: Holds reusable custom commands (commands.js) and global configurations (e2e.js).
    • cypress/screenshots/: Automatically stores screenshots taken during test execution, typically on failure or when manually triggered.
    • cypress/downloads/: Stores files downloaded as part of test scenarios.
  • mochawesome-report/: Contains the detailed HTML test execution reports generated by the Mochawesome reporter.
  • reports/: Contains project-related images and documents (e.g., demo images, PDFs).
  • .nyc_output/: Stores code coverage reports generated when tests are run with coverage tracking.
  • .github/: Contains GitHub Actions workflow configurations (e.g., for CI/CD) and issue templates.

Cypress Dashboard

The test cases are also available in the cypress dashboard. The link is here

Contributing

We welcome contributions to the cypress-fully-automation-site project! Whether you're fixing a bug, adding a new test case, or improving documentation, your help is appreciated.

Before contributing, please take a moment to review our Code of Conduct.

Reporting Bugs and Suggesting Enhancements

If you encounter a bug or have an idea for a new feature or enhancement, please check the GitHub Issues page to see if it has already been reported. If not, please open a new issue. We have templates to help you:

  • Use the Bug report template for reporting issues.
  • Use the Feature request template (or custom.md) for suggesting new features or enhancements.

Submitting Pull Requests

  1. Fork the repository to your own GitHub account.
  2. Create a new branch from main for your changes (e.g., git checkout -b feature/your-feature-name or bugfix/issue-description).
  3. Make your changes and commit them with clear and descriptive messages.
  4. Ensure your changes do not break existing functionality. If you're adding new features, please include or update tests as appropriate.
  5. Push your changes to your forked repository.
  6. Open a Pull Request (PR) against the main branch of this repository.
  7. Clearly describe the purpose and changes of your PR. Link to any relevant issues.

We'll review your PR as soon as possible. Thank you for your contribution!

License

This project is licensed under the Apache License 2.0.

Resources

  1. Cypress Documentation: Explore Cypress's official documentation for in-depth guides and examples.
  2. Cypress Best Practices: Learn best practices for writing efficient and maintainable Cypress tests.
  3. GitHub Repository: Fork and star the repository to stay updated with the latest developments.

About

Welcome to the Cypress Fully Automation Site repository! This repository contains a comprehensive automation framework built using Cypress for testing web applications.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •