Declare dependencies between Robot Framework tests
Project description
Declare dependencies between tests.
Ideally tests are independent, but when tests depend on earlier tests, DependencyLibrary makes it easy to explicitly declare these dependencies and have tests that depend on each other do the right thing.
Versioning
This library’s version numbers follow the SemVer 2.0.0 specification.
Installation
pip install robotframework-dependencylibrary
Usage
First, include the library in your tests:
*** Settings ***
Library DependencyLibrary
Typical usage:
*** Test cases ***
Passing Test
No operation
A Test that Depends on "Passing Test"
Depends on test Passing Test
Log The rest of the keywords in this test will run as normal.
When you need to declare multiple dependencies, just repeat the keyword:
*** Test cases ***
Another Passing Test
No operation
A Test that Depends on Both "Passing Test" and "Another Passing Test"
Depends on test Passing Test
Depends on test Another Passing Test
Log The rest of the keywords in this test will run as normal.
You can also depend on the statuses of entire test suites:
*** Test cases ***
A Test that Depends on an Entire Test Suite Passing
Depends on suite Some Test Suite Name
Log The rest of the keywords in this test will run as normal.
Skipped Dependencies
If a dependency was skipped, the depending test is also skipped:
*** Test cases ***
Skipped Test
Skip This test is skipped for some reason.
A Test that Depends on "Skipped Test"
Depends on test Skipped Test
Log The rest of the keywords (including this log) will NOT run!
The skip message follows this format:
Dependency not met: test case 'Skipped Test' was skipped.
Failing Dependencies
If a dependency failed, the depending test also fails:
*** Test cases ***
Failing Test
Fail This test failed for some reason.
A Test that Depends on "Failing Test"
Depends on test Failing Test
Log The rest of the keywords (including this log) will NOT run!
The failure message follows this format:
Dependency not met: test case 'Failing Test' failed.
Other Failures
If you depend on a test or suite that does not exist or has not run yet,
*** Test cases ***
A Test that Depends on Missing Test Case
Depends on test Another Test
the test will fail and the failure message follows this format:
Dependency not met: test case 'Another Test' not found.
If you make a test depend on itself or on the suite that contains it,
*** Test cases ***
Depends on self
Depends on test Depends on self
the test will fail and the failure message follows this format:
Dependency not met: test case 'Depends on self' mid-execution.
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
Hashes for robotframework-dependencylibrary-3.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45b2fe2ad8a90492a04bee25b19c8ae91a9a008759ee796fa7703b1fd5ee0da4 |
|
MD5 | cc122c8afd2a8a4f2596eea6c393261f |
|
BLAKE2b-256 | 7b2f675116e6852f7a899a4e917691457493217f6d476a3741bb1dd550d5ba4a |
Hashes for robotframework_dependencylibrary-3.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f96b810f7e46146e01503a39f17f300a8415fb2494d44323707d7fcbc7940b80 |
|
MD5 | e467238fd56f6685948b66c53aa8a206 |
|
BLAKE2b-256 | 13ce2cc216dc1d871df841e0bded24581f4ef2c80bf8a090a34790f3d9715f05 |