Skip to main content

Plugin to use TestObject Suites with Pytest

Project description

See Build Status on Travis CI See Build Status on AppVeyor

Plugin to use TestObject Suites with Pytest


This Pytest plugin was generated with Cookiecutter along with @hackebrot’s Cookiecutter-pytest-plugin template.

Features

  • Use TestObject’s Suites feature to group types of tests.
  • Run tests with different iOS and Android devices without re-writing code

Requirements

See requirements.txt

To run from source install via:

$ pip install -r requirements.txt

Installation

You can install “pytest-testobject” via pip from PyPI

$ pip install pytest-testobject

Usage

Add your credentials via the following flags:

--to-username=TO_USERNAME
--to-api-key=TO_API_KEY
--to-suite-id=TO_SUITE_ID

For these to work your tests need to be on a class.

Add the fixtures to_suite and to_driver to your class. Then use the to_driver fixture on your tests as your driver instance.

So it’ll look something like this:

@pytest.mark.usefixtures("to_suite","to_driver")
class TestTODriver(object):

    def test_saucelabs(self, to_driver):
        #Do stuff like to_driver.get(...)

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the MIT license, “pytest-testobject” is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytest-testobject, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size pytest_testobject-1.0.0-py3-none-any.whl (6.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size pytest-testobject-1.0.0.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page