Skip to main content

System test framework.

Project description

buildstatus

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.

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.

from systest import Sequence, TestCase

class MyTestCase(TestCase):
    def __init__(self, name):
        super(MyTestCase, self).__init__()
        self.name = "my_testcase_" + name
    def run(self):
        self.log("Hello!")

class MySequence(Sequence):
    def __init__(self):
        super(MySequence, self).__init__("my_sequence")
    def run(self):
        self.sequencer.run([
            MyTestCase("1"),
            (
                MyTestCase("2"),
                [
                    MyTestCase("3"),
                    MyTestCase("4")
                ]
            ),
            MyTestCase("5")
        ])

MySequence().execute()

The output is:

Name: my_sequence
Date: 2016-02-02 18:42:40.446213
Node: erik-VirtualBox
User: erik
---------------------------------------------------------------
Name: my_testcase_1
Description:
None
2016-02-02 18:42:40.488127 my_testcase_1 Hello!

my_testcase_1: PASSED in 0m 0s
---------------------------------------------------------------
Name: my_testcase_2
Description:
None
2016-02-02 18:42:40.490369 my_testcase_2 Hello!

my_testcase_2: PASSED in 0m 0s
---------------------------------------------------------------
Name: my_testcase_3
Description:
None
2016-02-02 18:42:40.491976 my_testcase_3 Hello!

my_testcase_3: PASSED in 0m 0s
---------------------------------------------------------------
Name: my_testcase_4
Description:
None
2016-02-02 18:42:40.494298 my_testcase_4 Hello!

my_testcase_4: PASSED in 0m 0s
---------------------------------------------------------------
Name: my_testcase_5
Description:
None
2016-02-02 18:42:40.496103 my_testcase_5 Hello!

my_testcase_5: PASSED in 0m 0s

---------------------- Test report begin ----------------------

[
    [
        my_testcase_1: PASSED,
        (
            my_testcase_2: PASSED,
            [
                my_testcase_3: PASSED,
                my_testcase_4: PASSED
            ]
        ),
        my_testcase_5: PASSED
    ]
]

Execution time: 0m 0s

----------------------- Test report end -----------------------

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

systest-0.2.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

systest-0.2.0-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file systest-0.2.0.tar.gz.

File metadata

  • Download URL: systest-0.2.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for systest-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c96d290c99cd96ff46482425b54ba00ee4531091e721896398a45ad39ace51dc
MD5 76107840de5a45916465f82ecf0e95a8
BLAKE2b-256 72911d923ba8ad63ccf811a929454509afd824bcac8d0938417638cde9d23943

See more details on using hashes here.

File details

Details for the file systest-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for systest-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e8fb4eb53c497e9e16c74045454ed42c990edc9a6cf7cb5fe3a23a683f17e658
MD5 7dea7ef822165d386b8d395cfd23386c
BLAKE2b-256 36850aee043ceac3f0b75ed152f4c6fb3991efa0700cbb2b3f7600f00e319bdc

See more details on using hashes here.

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