Plugin to use TestObject Suites with Pytest
This project is not actively maintained as TestObject's Suites are not very used at Sauce and will be deprecated themselves at some point.
- Use TestObject's Suites feature to group types of tests.
- Run tests with different iOS and Android devices without re-writing code
To run from source install via:
$ pip install -r requirements.txt
$ pip install pytest-testobject
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(...)
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.
Distributed under the terms of the MIT license, "pytest-testobject" is free and open source software
If you encounter any problems, please file an issue along with a detailed description.