All Projects → pchomik → Pytest Spec

pchomik / Pytest Spec

Licence: gpl-2.0
Library pytest-spec is a pytest plugin to display test execution output like a SPECIFICATION.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytest Spec

python-pytest-harvest
Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes.
Stars: ✭ 44 (-32.31%)
Mutual labels:  test, pytest
local-data-api
Data API for local, you can write unittest for AWS Aurora Serverless's Data API
Stars: ✭ 99 (+52.31%)
Mutual labels:  test, unittest
emacs-python-pytest
run pytest inside emacs
Stars: ✭ 105 (+61.54%)
Mutual labels:  test, pytest
Pytest Lazy Fixture
It helps to use fixtures in pytest.mark.parametrize
Stars: ✭ 179 (+175.38%)
Mutual labels:  test, pytest
Testfx
MSTest V2 framework and adapter
Stars: ✭ 391 (+501.54%)
Mutual labels:  test, unittest
framework
Lightweight, open source and magic-free framework for testing solidity smart contracts.
Stars: ✭ 36 (-44.62%)
Mutual labels:  test, spec
pytest-spark
pytest plugin to run the tests with support of pyspark
Stars: ✭ 65 (+0%)
Mutual labels:  pytest, unittest
unittest expander
A library that provides flexible and easy-to-use tools to parameterize Python unit tests, especially those based on unittest.TestCase.
Stars: ✭ 12 (-81.54%)
Mutual labels:  test, unittest
Unittest Xml Reporting
unittest-based test runner with Ant/JUnit like XML reporting.
Stars: ✭ 255 (+292.31%)
Mutual labels:  pytest, unittest
fake-sftp-server-rule
A JUnit rule that runs an in-memory SFTP server.
Stars: ✭ 34 (-47.69%)
Mutual labels:  test, unittest
Expekt
BDD assertion library for Kotlin
Stars: ✭ 163 (+150.77%)
Mutual labels:  test, unittest
Capture Stream
Capture stream output.
Stars: ✭ 10 (-84.62%)
Mutual labels:  test, unittest
Javascript Testing Best Practices
📗🌐 🚢 Comprehensive and exhaustive JavaScript & Node.js testing best practices (August 2021)
Stars: ✭ 13,976 (+21401.54%)
Mutual labels:  test, unittest
Kahlan
✔️ PHP Test Framework for Freedom, Truth, and Justice
Stars: ✭ 1,065 (+1538.46%)
Mutual labels:  test, spec
Python Pytest Cases
Separate test code from test cases in pytest.
Stars: ✭ 127 (+95.38%)
Mutual labels:  test, pytest
Wasmite
Now WebAssembly has proper testing, unit-testing and debugging 🤗
Stars: ✭ 20 (-69.23%)
Mutual labels:  test, unittest
Pytest Patterns
A couple of examples showing how pytest and its plugins can be combined to solve real-world needs.
Stars: ✭ 24 (-63.08%)
Mutual labels:  test, pytest
Testify
A unit testing framework written in bash for bash scripts
Stars: ✭ 45 (-30.77%)
Mutual labels:  test, unittest
Tdcapp
Sample app which access the TDC (The Developer's Conference) REST API.
Stars: ✭ 55 (-15.38%)
Mutual labels:  unittest
Pyautotest
Stars: ✭ 61 (-6.15%)
Mutual labels:  pytest

pytest-spec

Library pytest-spec is a pytest plugin to display test execution output like a SPECIFICATION.

Available features

  • Format output to look like specification.
  • Group tests by classes and files
  • Failed, passed and skipped are marked and colored.
  • Remove test_ and underscores for every test.
  • It is possible to use docstring summary instead of test name.
  • Supports function based, class based test.
  • Supports describe like tests.

Output example

Example

Configuration

spec_header_format

You can configure the format of the test headers by specifying a format string in your ini-file:

    [tool:pytest]
    spec_header_format = {module_path}:

In addition to the {path} and {class_name} replacement fields, there is also {test_case} that holds a more human readable name.

spec_test_format

You can configure the format of the test results by specifying a format string in your ini-file:

3 variables are available:

  • result - place for indicator
  • name - name of test
  • docstring_summary - first line from test docstring if available
    [tool:pytest]
    spec_test_format = {result} {name}

or

    [tool:pytest]
    spec_test_format = {result} {docstring_summary}

In second example where docstring is not available the name will be added to spec output.

spec_success_indicator

You can configure the indicator displayed when test passed.

    [tool:pytest]
    spec_success_indicator = 

spec_failure_indicator

You can configure the indicator displated when test failed.

    [tool:pytest]
    spec_failure_indicator = 

spec_skipped_indicator

You can configure the indicator displated when test is skipped.

    [tool:pytest]
    spec_skipped_indicator = ?

spec_ignore

Comma-separated settings to ignore/hide some tests or output from from plugins like FLAKE8 or ISORT. Any test which contain provided string will be ignored in output spec.

    [tool:pytest]
    spec_ignore = FLAKE8

spec_indent

    [tool:pytest]
    spec_indent = "   "

Continuous Integration

Tests

Download

All versions of library are available on official pypi server.

Install

    pip install pytest-spec

Contribution

Please feel free to present your idea by code example (pull request) or reported issues.

Contributors

License

pytest-spec - pytest plugin to display test execution output like a SPECIFICATION.

Copyright (C) 2014-2021 Pawel Chomicki

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].