A Robot Framework library for managing and manipulating HTTP requests and responses using a man-in-the-middle proxy approach. It allows blocking requests, customizing responses, adding delays, and more.
Project description
Robot Framework MITM Library
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robotframework_mitmlibrary-0.2.2.tar.gz.
File metadata
- Download URL: robotframework_mitmlibrary-0.2.2.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37b548bb6a73bfb8c14b314b13e950ff22c8ee4db229b91d62c0c933976a2b04
|
|
| MD5 |
9b9c53d7fae2b30cf9c498c2e9ee6449
|
|
| BLAKE2b-256 |
8296f55f77aad4d96fd87862fedb7ad39fbb2ddb8f24b560f2aede34a139e190
|
Provenance
The following attestation bundles were made for robotframework_mitmlibrary-0.2.2.tar.gz:
Publisher:
release.yml on MobyNL/robotframework-mitmlibrary
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
robotframework_mitmlibrary-0.2.2.tar.gz -
Subject digest:
37b548bb6a73bfb8c14b314b13e950ff22c8ee4db229b91d62c0c933976a2b04 - Sigstore transparency entry: 215494622
- Sigstore integration time:
-
Permalink:
MobyNL/robotframework-mitmlibrary@37e5f0251a059e431b17058ccafb3f48efce6465 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/MobyNL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@37e5f0251a059e431b17058ccafb3f48efce6465 -
Trigger Event:
push
-
Statement type:
File details
Details for the file robotframework_mitmlibrary-0.2.2-py3-none-any.whl.
File metadata
- Download URL: robotframework_mitmlibrary-0.2.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b4854836984eb7c4f36e707bb6b19eeda82c7c965c74e3adf4556e858c2f40a
|
|
| MD5 |
81f4b3e960f0ecb380b5b4ab263e829b
|
|
| BLAKE2b-256 |
fd40bc670b386496b3bf979089a53e1674bd0567acfa81722bf9a3d04dc49a74
|
Provenance
The following attestation bundles were made for robotframework_mitmlibrary-0.2.2-py3-none-any.whl:
Publisher:
release.yml on MobyNL/robotframework-mitmlibrary
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
robotframework_mitmlibrary-0.2.2-py3-none-any.whl -
Subject digest:
4b4854836984eb7c4f36e707bb6b19eeda82c7c965c74e3adf4556e858c2f40a - Sigstore transparency entry: 215494637
- Sigstore integration time:
-
Permalink:
MobyNL/robotframework-mitmlibrary@37e5f0251a059e431b17058ccafb3f48efce6465 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/MobyNL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@37e5f0251a059e431b17058ccafb3f48efce6465 -
Trigger Event:
push
-
Statement type: