Skip to content

adrianmaciuc/python-selenium-framework-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the Selenium with Python and Pytest Framework Example!

Created by Adrian Maciuc - https://www.martioli.com - showcases a framework built with Python Pytest and Selenium for automated testing of web application https://magento.softwaretestingboard.com/ . The main goal is to provide a modular and maintainable testing solution .

📝 Overview

This project includes:

1️⃣ Tests for the web application

2️⃣ Integration with version control using Git

3️⃣ Page Object Model (POM) design pattern for improved maintainability and readability

4️⃣ Integration with pytest for test execution and reporting

5️⃣ Use of Selenium WebDriver for interacting with the web application

6️⃣ Continuous Integration with Github Actions

7️⃣ Use of flake8 for style guide adherence to PEP8 standards

Specifications and Design

📌 All the tests in this framework are designed to cover specific functionalities of the web application.

📌 The framework follows the principles of the Page Object Model (POM), where each web page is represented as a separate class, and actions and selectors are defined within these classes.

Testing approach

📌 Modular test logic and Reusable page objects

📌 Tests are designed to work with different test data, allowing for greater coverage and flexibility.

📌 Explicit waits are preferred over implicit waits to ensure more reliable test execution.

📌 The framework promotes the use of explicit assertions for better test readability and failure reporting.

Testing Reports

💻 The framework is integrated with pytest for test execution and reporting. Upon running the tests, detailed test reports can be generated in various formats, such as HTML, XML, or JSON.

Installation

🚀 To get started with this framework, simply follow these steps:

1️⃣ Clone the project from the Git repository.

2️⃣ Install the required dependencies using pip install -r requirements.txt.

3️⃣ Set up the necessary configurations, such as browser options or test data files.

4️⃣ Execute the tests using pytest command.

That's it! You're ready to automate your tests using Python with Pytest and Selenium. Happy testing!

About

Creating a framework from scratch and creating end to end tests for a e-commerce website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages