Skip to content

paulocoliveira/python-monkey-patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Don't forget to give a ⭐ to make the project popular.

❓ What is this Repository about?

  • This repo contains example code of using Monkey Patching in Python, including an automated test case using Selenium Webdriver on LambdaTest Cloud platform.
  • This project uses Pytest framework to run the tests.

❓ What is Mokey Patching?

The concept of Monkey Patching introduces a dynamic technique that developers and QAEs can employ to modify the behavior of existing classes, objects, or modules during runtime, without making any direct change to their original source code. This approach enables a remarkable level of flexibility and adaptability, empowering them to extend the functionalities of pre-existing components, fix bugs, and customize behaviors to cater to specific requirements.

Running the Code

To run any of the scripts from command line use the following command:

python 01-objects-and-instances.py

Running the Cloud Grid Sample

By default, the test would be running on LambdaTest Platform on Chrome and Firefox Browsers, and on Windows 11 and MacOS.

As a prerequisite for this code, you need:

  1. Download and Install Python

  2. Download and Install Visual Studio Code

  3. Open the project in Visual Studio Code

  4. Enter in the cloud-grid folder

cd cloud-grid
  1. Install pytest, and Selenium WebDriver libraries
pip install -r requirements.txt

In order to run this cloud grid sample, please run the command below in the project folder:

pytest

✍️ Blog Link

🧬 Need Assistance?

  • Discuss your queries by writing to me @ paulocol@gmail.com OR ping me on:

💭 Checkout the blogs related to Testing on LambdaTest blog.

About

LambdaTest Blog Article: LambdaTest Blog Article: What is Monkey Patching in Python: A Complete Python Monkey Patch Tutorial With Examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages