robotframework-mitmlibrary


Namerobotframework-mitmlibrary JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/MobyNL/robotframework-mitmlibrary
SummaryA 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.
upload_time2025-01-11 23:06:14
maintainerNone
docs_urlNone
authorMark
requires_python<4.0,>=3.12
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Robot Framework MITM Library

![MitmLibrary Icon](https://github.com/MobyNL/robotframework-mitmlibrary/blob/main/MITMLibrary_small.png)

## Keyword
[Keyword documentation](https://mobynl.github.io/robotframework-mitmlibrary/MitmLibraryKeywords.html)

## Overview

The Robot Framework MITM Library is a custom library for [Robot Framework](https://robotframework.org/) that enables integration with the Python package [mitm](https://github.com/mitmproxy/mitmproxy). 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](https://robotframework.slack.com/archives/C06M2J3J8AC).

## 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

1. Install Robot Framework (if not already installed):
2. Install mitm library using pip:
```
pip install robotframework-mitmlibrary
```


## Usage

1. Import the MITM Library in your Robot Framework test suite:
```robotframework
*** Settings ***
Library       MitmLibrary
```

2. Use the available keywords to interact with the MITM proxy and manipulate network traffic as needed:
```robotframework
*** 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](https://docs.mitmproxy.org/stable/concepts-certificates/)

## Documentation
For detailed information on the available keywords and usage examples, please refer to the [Keyword Documentation](https://mobynl.github.io/robotframework-mitmlibrary/MitmLibraryKeywords.html)

## 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MobyNL/robotframework-mitmlibrary",
    "name": "robotframework-mitmlibrary",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": null,
    "author": "Mark",
    "author_email": "markmoberts@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/99/c4/5aedc3d41b7e9d6b20fb1622935aedb0e23724b8d8bb7432773a57569b28/robotframework_mitmlibrary-0.1.8.tar.gz",
    "platform": null,
    "description": "# Robot Framework MITM Library\n\n![MitmLibrary Icon](https://github.com/MobyNL/robotframework-mitmlibrary/blob/main/MITMLibrary_small.png)\n\n## Keyword\n[Keyword documentation](https://mobynl.github.io/robotframework-mitmlibrary/MitmLibraryKeywords.html)\n\n## Overview\n\nThe Robot Framework MITM Library is a custom library for [Robot Framework](https://robotframework.org/) that enables integration with the Python package [mitm](https://github.com/mitmproxy/mitmproxy). This library allows you to automate and test scenarios involving Man-in-the-Middle (MITM) proxy functionality within your Robot Framework test suites.\n\nIf you need help, have suggestions or want to discuss anything, feel free to contact through the [slack channel](https://robotframework.slack.com/archives/C06M2J3J8AC).\n\n## Features\n\n- Interact with MITM proxy using Robot Framework keywords.\n- Manipulate network traffic for testing purposes.\n- Easily simulate different network conditions and responses.\n- Integrate MITM proxy capabilities into your existing Robot Framework tests.\n\n## Installation\n\n1. Install Robot Framework (if not already installed):\n2. Install mitm library using pip:\n```\npip install robotframework-mitmlibrary\n```\n\n\n## Usage\n\n1. Import the MITM Library in your Robot Framework test suite:\n```robotframework\n*** Settings ***\nLibrary       MitmLibrary\n```\n\n2. Use the available keywords to interact with the MITM proxy and manipulate network traffic as needed:\n```robotframework\n*** Settings ***\nLibrary       MitmLibrary\n\n*** Test Cases ***\nBlock and Delay Websites\n    Start Mitm Proxy\n\n    # Block requests to Robot Framework website\n    Add To Blocklist    robotframework.org\n\n    # Delay requests to Google\n    Add Response Delay  GoogleDelay   https://www.google.com  5  # Delay for 5 seconds\n\n    # Perform tests that involve network traffic manipulation\n    # ...\n\n    Stop Mitm Proxy\n\n```\n\n\n### Why use Mitm?\nMitm allows manipulation on single browser instance, by using a proxy. It does not\nrequire you to set up stubs or mocks that might influence the entire application at\nonce, also resulting in stubbed/mocked behaviour while manual testing.\n\nExamples where Mitm is useful: \n- When running in parallel, if you do not want your other instances to be influenced. \n- Manipulate the response of a request to see how the front end handles it\n- When stubs or mocks are not available or their behaviour is not sufficient for your testing needs.\n- When you want to have full control as tester, without dependency on a developer\n\n### Mitm Certificates\nTo test with SSL verification, or use a browser without ignoring certificates,\nyou will need to set up the certificates related to\nmitm. Follow the guide on the \n[Mitm website](https://docs.mitmproxy.org/stable/concepts-certificates/)\n\n## Documentation\nFor detailed information on the available keywords and usage examples, please refer to the [Keyword Documentation](https://mobynl.github.io/robotframework-mitmlibrary/MitmLibraryKeywords.html)\n\n## Contributing\nContributions 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.\n\n## License\nThis project is licensed under the MIT License.\n\nNote: This project is not officially affiliated with or endorsed by the mitmproxy project or robotframework.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "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.",
    "version": "0.1.8",
    "project_urls": {
        "Documentation": "https://mobynl.github.io/robotframework-mitmlibrary/MitmLibraryKeywords.html",
        "Homepage": "https://github.com/MobyNL/robotframework-mitmlibrary",
        "Repository": "https://github.com/MobyNL/robotframework-mitmlibrary"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e88900ea123ca578bba960e3875783e257fe58ac65d18499f43dfd791f3251ac",
                "md5": "021c1e84294dd4b203b7ce11b5160b75",
                "sha256": "55c9072b5df4068cec131e56957f4d2dc38b4232d548767ca965f2e82038ea01"
            },
            "downloads": -1,
            "filename": "robotframework_mitmlibrary-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "021c1e84294dd4b203b7ce11b5160b75",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 12075,
            "upload_time": "2025-01-11T23:06:10",
            "upload_time_iso_8601": "2025-01-11T23:06:10.442580Z",
            "url": "https://files.pythonhosted.org/packages/e8/89/00ea123ca578bba960e3875783e257fe58ac65d18499f43dfd791f3251ac/robotframework_mitmlibrary-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99c45aedc3d41b7e9d6b20fb1622935aedb0e23724b8d8bb7432773a57569b28",
                "md5": "847c59259919f7512650bf9d473c2d86",
                "sha256": "db101265589302cd9cdd8b3f8b3d6b7bd3bdde12142957be1da500400f577783"
            },
            "downloads": -1,
            "filename": "robotframework_mitmlibrary-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "847c59259919f7512650bf9d473c2d86",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 10841,
            "upload_time": "2025-01-11T23:06:14",
            "upload_time_iso_8601": "2025-01-11T23:06:14.836130Z",
            "url": "https://files.pythonhosted.org/packages/99/c4/5aedc3d41b7e9d6b20fb1622935aedb0e23724b8d8bb7432773a57569b28/robotframework_mitmlibrary-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-11 23:06:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MobyNL",
    "github_project": "robotframework-mitmlibrary",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "robotframework-mitmlibrary"
}
        
Elapsed time: 0.86060s