All Projects β†’ darrenburns β†’ Ward

darrenburns / Ward

Licence: mit
A modern Python test framework designed to help you find and fix flaws faster.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ward

eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (-88.29%)
Mutual labels:  test-runner, testing-framework
Utest.h
πŸ§ͺ single header unit testing framework for C and C++
Stars: ✭ 315 (-10%)
Mutual labels:  testing-framework, unit-test
Nose2
The successor to nose, based on unittest2
Stars: ✭ 665 (+90%)
Mutual labels:  testing-framework, unit-test
test junkie
Highly configurable testing framework for Python
Stars: ✭ 72 (-79.43%)
Mutual labels:  test-runner, testing-framework
Dredd
Language-agnostic HTTP API Testing Tool
Stars: ✭ 3,770 (+977.14%)
Mutual labels:  test-runner, testing-framework
IO-TESTER
A functional test framework
Stars: ✭ 32 (-90.86%)
Mutual labels:  test-runner, testing-framework
conan-gtest
[OBSOLETE] The recipe is now in https://github.com/conan-io/conan-center-index
Stars: ✭ 11 (-96.86%)
Mutual labels:  unit-test
Goreporter
A Golang tool that does static analysis, unit testing, code review and generate code quality report.
Stars: ✭ 2,943 (+740.86%)
Mutual labels:  unit-test
bron
πŸƒβ€β™‚οΈ Fast & tiny test runner for Node.js
Stars: ✭ 17 (-95.14%)
Mutual labels:  test-runner
automock
A library for testing classes with auto mocking capabilities using jest-mock-extended
Stars: ✭ 26 (-92.57%)
Mutual labels:  unit-test
Entwine
Testing tools and utilities for Apple's Combine framework.
Stars: ✭ 306 (-12.57%)
Mutual labels:  unit-test
Unittest Xml Reporting
unittest-based test runner with Ant/JUnit like XML reporting.
Stars: ✭ 255 (-27.14%)
Mutual labels:  test-runner
FastHashes
A .NET implementation of several non-cryptographic hashes.
Stars: ✭ 24 (-93.14%)
Mutual labels:  testing-framework
Awesome Unit Testing Swift
A curated collection of awesome blog articles, books, talks, podcasts, tools/frameworks and examples.
Stars: ✭ 272 (-22.29%)
Mutual labels:  testing-framework
hitchstory
Type-safe, StrictYAML based BDD framework for python.
Stars: ✭ 24 (-93.14%)
Mutual labels:  testing-framework
Doctest
The fastest feature-rich C++11/14/17/20 single-header testing framework
Stars: ✭ 3,568 (+919.43%)
Mutual labels:  testing-framework
Exam
Extension for Concordion BDD Framework
Stars: ✭ 15 (-95.71%)
Mutual labels:  testing-framework
Fflib Apex Mocks
An Apex mocking framework for true unit testing in Salesforce, with Stub API support
Stars: ✭ 253 (-27.71%)
Mutual labels:  unit-test
Molecule
Molecule aids in the development and testing of Ansible roles
Stars: ✭ 3,262 (+832%)
Mutual labels:  testing-framework
lago
Ad-hoc virtual testing environment framework
Stars: ✭ 48 (-86.29%)
Mutual labels:  testing-framework

Ward

Build Codecov PyPI version Gitter All Contributors

See the full documentation and feature set here.

A modern Python test framework designed to help you find and fix flaws faster.

screenshot

Features

Descriptive test names: describe what your tests do using strings, not function names.

@test("1 + 2 == 3")
def _():
    assert 1 + 2 == 3

Modular test dependencies: manage test setup/teardown code using fixtures that rely on Python's import system, not name matching.

@fixture
def user():
    return User(name="darren")
    
@test("the user is called darren")
def _(u=user):
    assert u.name == "darren"

Support for asyncio: define your tests and fixtures with async def and call asynchronous code within them.

@fixture
async def user():
    u = await create_user()
    return await u.login()

@test("the logged in user has a last session date")
async def _(user=user):
    last_session = await get_last_session_date(user.id)
    assert is_recent(last_session, get_last_session_date)

Powerful test selection: limit your test run not only by matching test names/descriptions, but also on the code contained in the body of the test.

ward --search "Database.get_all_users"

Or use tag expressions for more powerful filtering.

ward --tags "(unit or integration) and not slow"

Parameterised testing: write a test once, and call it multiple times with different inputs

@test("truncate('{text}', num_chars={num_chars}) returns '{expected}'")
def _(
    text=s,
    num_chars=each(20, 11, 10, 5),
    expected=each(s, s, "hello w...", "he..."),
):
    result = truncate(text, num_chars)
    assert result == expected

Cross platform: Tested on Mac OS, Linux, and Windows.

Zero config: Sensible defaults mean running ward with no arguments is enough to get started. Can be configured using pyproject.toml or the command line if required.

Colourful, human readable output: quickly pinpoint and fix issues with detailed output for failing tests.

This project is currently in beta.

Planned features:

  • Smart test execution order designed to surface failures faster (using various heuristics)
  • Multi-process mode to improve performance
  • Code coverage with --coverage flag
  • Handling flaky tests with test-specific retries, timeouts
  • Plugin system

Let me know if you'd like to help out with any of these features!

Getting Started

Take a look at the "Getting Started" tutorial.

How to Contribute

Contributions are very welcome and encouraged!

See the contributing guide for information on how you can take part in the development of Ward.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

πŸ€” πŸ’‘ πŸ€” πŸ’» πŸ›
Alec Jordan

πŸ’»
πŸ€” πŸ€”
thebigmunch

πŸ’»

Tyler Couto

πŸ’»

Thibaut Le Page

πŸ’»
πŸ€”
jayesh hathila

πŸ’»

Mandar Vaze

πŸ’»

Josh Karpel

πŸ’»

Andreas Lutro

πŸ’»

Oleg HΓΆfling

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

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].