Git Product home page Git Product logo

manu00-droid / selenium-maven-magento.softwaretestingboard.com-testing Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 13.84 MB

This repository contains an automated testing project for the Magento website hosted on https://magento.softwaretestingboard.com/. The project uses the Selenium WebDriver framework and the Maven build automation tool to perform automated tests on the website.

License: MIT License

Java 27.44% HTML 65.21% CSS 4.46% JavaScript 2.90%

selenium-maven-magento.softwaretestingboard.com-testing's Introduction

Selenium-Maven-magento.softwaretestingboard.com-Testing

ThisThis repository contains an automated testing project for the Magento website hosted on https://magento.softwaretestingboard.com/. The project uses the Selenium WebDriver framework, the Maven build automation tool, and the ExtentReports library to perform automated tests on the website.

Getting Started

To get started with this project, you will need to clone this repository to your local machine:

git clone https://github.com/your-username/selenium-maven-magento-testing.git

Once you have cloned the repository, you can navigate to the project directory and run the tests using Maven:

cd selenium-maven-magento-testing
mvn test

The tests will run in your default browser and generate a report with the test results in HTML format. You can find the report in the test-output directory.

Project Structure

The project is organized into several directories:

src/test/java: contains all the directories having classes that implement the automated tests using the Page Object Model
src/test/java/MyPageObjects: contains all the page element objects used while automating test cases
src/test/java/extentReportBasic: contains the DemoExtentReport.java class that implements all the testcases and generates report generated by ExtentReports
The pom.xml file at the root of the project defines the project dependencies and build configuration for Maven, including the ExtentReports dependency.

Using ExtentReports

This project uses the ExtentReports library to generate HTML reports of the test results. The reports include detailed information about the test cases, including screenshots and error messages. image

Using the Page Object Model

This project uses the Page Object Model (POM) to organize the code and make it easier to maintain. Each web page in the Magento website is represented by a separate Java class, which contains the web elements and methods for interacting with the page.

For example, here is a sample LoginPage class that represents the login page in the Magento website:

public class LoginPage {
	WebDriver ldriver;

	public LoginPage(WebDriver rdriver) {
		ldriver = rdriver;
		PageFactory.initElements(rdriver, this);
	}

	@FindBy(id = "email")
	WebElement emailInput;

	@FindBy(id = "pass")
	WebElement passInput;

	@FindBy(id = "send2")
	WebElement signInBtn;

	public void setEmailId(String email) {
		emailInput.sendKeys(email);
	}

	public void setPassword(String pass) {
		passInput.sendKeys(pass);
	}

	public void clickSubmit() {
		signInBtn.click();
	}
}

Test Cases

This project includes the following test cases:

  1. Create account
  2. Sign out
  3. Sign in
  4. Add to cart
  5. Place order
  6. Check orders
  7. Add to wishlist

Each test case is implemented in DemoExtentReport.java class in the src/test/java/extentReportBasic directory, using the Page Object Model to interact with the web pages.

Contributing

If you would like to contribute to this project, please fork the repository and create a pull request with your changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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.