Wrapper for mitmproxy with Robot Framework
Project description
Keyword
Overview
The Robot Framework MITM Library is a custom library for Robot Framework that enables integration with the Python package mitm. This library allows you to automate and test scenarios involving Man-in-the-Middle (MITM) proxy functionality within your Robot Framework test suites.
If you need help, have suggestions or want to discuss anything, feel free to contact through the slack channel.
Features
Interact with MITM proxy using Robot Framework keywords.
Manipulate network traffic for testing purposes.
Easily simulate different network conditions and responses.
Integrate MITM proxy capabilities into your existing Robot Framework tests.
Installation
Install Robot Framework (if not already installed):
Install mitm library using pip:
pip install robotframework-mitmlibrary
Usage
Import the MITM Library in your Robot Framework test suite:
*** Settings ***
Library MitmLibrary
Use the available keywords to interact with the MITM proxy and manipulate network traffic as needed:
*** Settings ***
Library MitmLibrary
*** Test Cases ***
Block and Delay Websites
Start Mitm Proxy
# Block requests to Robot Framework website
Add To Blocklist robotframework.org
# Delay requests to Google
Add Response Delay GoogleDelay https://www.google.com 5 # Delay for 5 seconds
# Perform tests that involve network traffic manipulation
# ...
Stop Mitm Proxy
Why use Mitm?
Mitm allows manipulation on single browser instance, by using a proxy. It does not require you to set up stubs or mocks that might influence the entire application at once, also resulting in stubbed/mocked behaviour while manual testing.
Examples where Mitm is useful: - When running in parallel, if you do not want your other instances to be influenced. - Manipulate the response of a request to see how the front end handles it - When stubs or mocks are not available or their behaviour is not sufficient for your testing needs. - When you want to have full control as tester, without dependency on a developer
Mitm Certificates
To test with SSL verification, or use a browser without ignoring certificates, you will need to set up the certificates related to mitm. Follow the guide on the Mitm website
Documentation
For detailed information on the available keywords and usage examples, please refer to the Keyword Documentation
Contributing
Contributions are welcome! If you encounter any issues, have suggestions for improvements, or would like to add new features, feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License.
Note: This project is not officially affiliated with or endorsed by the mitmproxy project or robotframework.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file robotframework-mitmlibrary-0.1.6.tar.gz
.
File metadata
- Download URL: robotframework-mitmlibrary-0.1.6.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cddcbcb997ec976642c994518cfd4eaf557213532847c90612d549c67071ae4f |
|
MD5 | f434f2cf4c3e50f4d5522b55035936f2 |
|
BLAKE2b-256 | cbb5039d5f37ce71fdb47b91cb4dae96a85cc2d9356f4a578e53922a0ebf0a57 |