Installation
pip install systest
Description
Execute a sequence of test cases in serial and/or parallel.
Test cases in a list are executed in serial and test cases in a tuple are executed in parallel, in separate Python threads.
This framework is created with integration/system test in mind. The framework is not intended as a replacement for unittest, but rather to be a complement to it.
Documentation: http://systest.readthedocs.org/en/latest
Example usage
See the test suite: https://github.com/eerimoq/systest/blob/master/tests/test_systest.py
For example, the sequence below starts with test case MyTestCase("1"). When MyTestCase("1") has been executed, MyTestCase("2") and the list of MyTestCase("3") and MyTestCase("4") are executed in parallel. When both MyTestCase("2") and the list of MyTestCase("3") and MyTestCase("4") has been executed, MyTestCase("5") is executed. Then the sequence ends.
import logging
import systest
LOGGER = logging.getLogger(__name__)
# Define a testcase.
class MyTestCase(systest.TestCase):
"""Test case description.
"""
def __init__(self, name):
super(MyTestCase, self).__init__()
self.name = "my_testcase_" + name
def run(self):
LOGGER.info("Hello!")
self.assert_equal(1, 1)
self.assert_true(1 == 1)
self.assert_in(1 in [1, 2])
self.assert_none(None)
with self.assert_raises(RuntimeError) as cm:
raise RuntimeError('foo')
self.assert_equal(str(cm.exception), 'foo')
sequencer = systest.setup("my_sequence")
sequencer.run(MyTestCase("1"),
(
MyTestCase("2"),
[
MyTestCase("3"),
MyTestCase("4")
]
),
MyTestCase("5"))
sequencer.report_and_exit()
The output is:
Name: my_sequence
Date: 2020-05-30 11:41:49.712832
Node: erik-GR8
User: erik
---------------------------------------------------------------
Name: my_testcase_1
Description:
Test case description.
Hello!
my_testcase_1: PASSED in 0 seconds
---------------------------------------------------------------
Name: my_testcase_2
Description:
Test case description.
Hello!
my_testcase_2: PASSED in 0 seconds
---------------------------------------------------------------
Name: my_testcase_3
Description:
Test case description.
Hello!
my_testcase_3: PASSED in 0 seconds
---------------------------------------------------------------
Name: my_testcase_4
Description:
Test case description.
Hello!
my_testcase_4: PASSED in 0 seconds
---------------------------------------------------------------
Name: my_testcase_5
Description:
Test case description.
Hello!
my_testcase_5: PASSED in 0 seconds
---------------------- Test summary begin ----------------------
[
my_testcase_1: PASSED in 0 seconds,
(
my_testcase_2: PASSED in 0 seconds,
[
my_testcase_3: PASSED in 0 seconds,
my_testcase_4: PASSED in 0 seconds
]
),
my_testcase_5: PASSED in 0 seconds
]
Execution time: 0.02 seconds
Result: PASSED (5 passed, 5 total)
----------------------- Test summary end -----------------------
Metadata
Release files for systest 5.21.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| systest-5.21.0.tar.gz | 24.8 kB | Without provenance | Details for systest-5.21.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| systest-5.21.0-py3-none-any.whl | Python 3 | none | any | Details for systest-5.21.0-py3-none-any.whl |
Total release size: 36.9 kB
Release files / systest-5.21.0.tar.gz
| Download URL | systest-5.21.0.tar.gz |
|---|---|
| Size | 24.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e929c95dbbf1d419dc96514b1ad8512789d3a81c328c6fe5082eb26254b47033
|
|
BLAKE2b-256 checksum How to use checksums |
9177602d27f46a6ad294ca589698dbe8ec82f16c494395cbb9f752cea814ab8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / systest-5.21.0-py3-none-any.whl
| Download URL | systest-5.21.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
794660bda1c2d8ad7e9cace45ed77853535c2d6e4976049e4ee89a81385dec01
|
|
BLAKE2b-256 checksum How to use checksums |
ab023196dc952d90479c306056cc9a7c1d93de4848956f1ff745476f34850d69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for systest 5.21.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.