Skip to main content

Pytest multihost plugin

Project description

[!WARNING] This plugin is still actively developed and even though it is mostly stable, we reserve the right to introduce minor breaking changes if it is required for new functionality.

pytest_mh - pytest multihost test framework

pytest-mh is a pytest plugin that, at a basic level, allows you to run shell commands and scripts over SSH on remote Linux or Windows hosts. You use it to execute system or application tests for your project on a remote host or hosts (or containers) while running pytest locally keeping your local machine intact.

The plugin also provides building blocks that can be used to setup and teardown your tests, perform automatic clean up of all changes done on the remote host, and build a flexible and unified high-level API to manipulate the hosts from your tests.


See the full documentation here:

Example usage

The following snippet was taken from the SSSD project.

    def test__id(client: Client, provider: GenericProvider):
        u = provider.user("tuser").add()"tgroup_1").add().add_member(u)"tgroup_2").add().add_member(u)

        result ="tuser")

        assert result is not None
        assert == "tuser"
        assert result.memberof(["tgroup_1", "tgroup_2"])

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

pytest_mh-1.0.17.tar.gz (67.6 kB view hashes)

Uploaded Source

Built Distribution

pytest_mh-1.0.17-py3-none-any.whl (80.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page