pistar


Namepistar JSON
Version 2.5.0 PyPI version JSON
download
home_page
Summarypistar: functional testing with Python
upload_time2023-07-27 09:40:30
maintainer
docs_urlNone
author
requires_python>=3.6
licenseMIT
keywords test
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            The ``pistar`` is a simple and lightweight function testing tool, using pistar testing framework can quickly
complete the development and execution of test cases.

Basic introduction
------------------
Command entry::

    $ pistar
    usage: pistar [options] <command> <args>

    positional arguments:
      run          Execute test cases
      generate     Generate interface test cases

    optional arguments:
      -v, --version  Show the version of pistar
      -h, --help     Show help message

Simple test example:

.. code-block:: python

    from pistar import BaseTestCase, teststep


    class ExampleTestCase(BaseTestCase):
        def setup(self):
            print('ExampleTestCase setup...')

        @teststep
        def step_basic_assert(self):
            self.assert_that(100).is_type_of(int, float).is_less_than(200)
            self.assert_that([1, 2, 3]).contains(4)

        def teardown(self):
            print('ExampleTestCase teardown...')


Execution and output::

    $ pistar run /test/example.py
    collecting...
    collected 1 test case

    --------------------------------------------------- ExampleTestCase start ---------------------------------------------------
    ExampleTestCase setup...
    [2021-08-23 16:57:54,121] [ERROR] [**/_pistar/utilities/testcases/case.py:142]
        @teststep
        def step_basic_assert(self):
            self.assert_that(100).is_type_of(int, float).is_less_than(200)
    >       self.assert_that([1, 2, 3]).contains(4)
                                         ^^^
    E   expect [1, 2, 3] to contain 4, but it did not

    /test/example.py:15 AssertionContainsException
    ExampleTestCase teardown...
    ---------------------------------------------------- ExampleTestCase end ----------------------------------------------------

    ===================================================== test summary info =====================================================
    FAILED /test/example.py::ExampleTestCase
    ===================================================== 1 failed in 0.03s =====================================================

Features
--------

- Test cases can be flexibly composed by pre step, test step and post step

- Various test step usage, such as timeout control and parameterization

- Rich streaming assertion and error log output

- Support session level pre and post conditions

- Compatible with pytest case execution

- Automatic generation of basic test cases

Some features of pistar refer to unittest and pytest.

License
-------

Copyright (c) Huawei Technologies Co., Ltd. 2020-present.

Distributed under the terms of the MIT license, pistar is free software.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pistar",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "test",
    "author": "",
    "author_email": "",
    "download_url": "",
    "platform": "linux",
    "description": "The ``pistar`` is a simple and lightweight function testing tool, using pistar testing framework can quickly\ncomplete the development and execution of test cases.\n\nBasic introduction\n------------------\nCommand entry::\n\n    $ pistar\n    usage: pistar [options] <command> <args>\n\n    positional arguments:\n      run          Execute test cases\n      generate     Generate interface test cases\n\n    optional arguments:\n      -v, --version  Show the version of pistar\n      -h, --help     Show help message\n\nSimple test example:\n\n.. code-block:: python\n\n    from pistar import BaseTestCase, teststep\n\n\n    class ExampleTestCase(BaseTestCase):\n        def setup(self):\n            print('ExampleTestCase setup...')\n\n        @teststep\n        def step_basic_assert(self):\n            self.assert_that(100).is_type_of(int, float).is_less_than(200)\n            self.assert_that([1, 2, 3]).contains(4)\n\n        def teardown(self):\n            print('ExampleTestCase teardown...')\n\n\nExecution and output::\n\n    $ pistar run /test/example.py\n    collecting...\n    collected 1 test case\n\n    --------------------------------------------------- ExampleTestCase start ---------------------------------------------------\n    ExampleTestCase setup...\n    [2021-08-23 16:57:54,121] [ERROR] [**/_pistar/utilities/testcases/case.py:142]\n        @teststep\n        def step_basic_assert(self):\n            self.assert_that(100).is_type_of(int, float).is_less_than(200)\n    >       self.assert_that([1, 2, 3]).contains(4)\n                                         ^^^\n    E   expect [1, 2, 3] to contain 4, but it did not\n\n    /test/example.py:15 AssertionContainsException\n    ExampleTestCase teardown...\n    ---------------------------------------------------- ExampleTestCase end ----------------------------------------------------\n\n    ===================================================== test summary info =====================================================\n    FAILED /test/example.py::ExampleTestCase\n    ===================================================== 1 failed in 0.03s =====================================================\n\nFeatures\n--------\n\n- Test cases can be flexibly composed by pre step, test step and post step\n\n- Various test step usage, such as timeout control and parameterization\n\n- Rich streaming assertion and error log output\n\n- Support session level pre and post conditions\n\n- Compatible with pytest case execution\n\n- Automatic generation of basic test cases\n\nSome features of pistar refer to unittest and pytest.\n\nLicense\n-------\n\nCopyright (c) Huawei Technologies Co., Ltd. 2020-present.\n\nDistributed under the terms of the MIT license, pistar is free software.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "pistar: functional testing with Python",
    "version": "2.5.0",
    "project_urls": null,
    "split_keywords": [
        "test"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bccf61ca651f6d8172f03913bfcf5d89dfe729dbc72e3e7986867a8efb44a74c",
                "md5": "29c73bd6a7e1239dba13844bc32c5750",
                "sha256": "05baf0153cde0907037b74ae1016f9012c173a498577b1dacfb40df0cc65804c"
            },
            "downloads": -1,
            "filename": "pistar-2.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "29c73bd6a7e1239dba13844bc32c5750",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 97242,
            "upload_time": "2023-07-27T09:40:30",
            "upload_time_iso_8601": "2023-07-27T09:40:30.388809Z",
            "url": "https://files.pythonhosted.org/packages/bc/cf/61ca651f6d8172f03913bfcf5d89dfe729dbc72e3e7986867a8efb44a74c/pistar-2.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-27 09:40:30",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pistar"
}
        
Elapsed time: 0.47569s