All Projects → EvanKepner → mutatest

EvanKepner / mutatest

Licence: MIT license
Python mutation testing: test your tests! Safely run mutation trials without source code modifications and see what will get past your test suite.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to mutatest

aioredis-cluster
Redis Cluster support extension for aioredis
Stars: ✭ 21 (-58%)
Mutual labels:  python37, python38
pypackage
Cookiecutter python package using Poetry, mypy, black, isort, autoflake, pytest, mkdocs, and GitHub Actions
Stars: ✭ 12 (-76%)
Mutual labels:  python37, python38
Aioredis Py
asyncio (PEP 3156) Redis support
Stars: ✭ 2,003 (+3906%)
Mutual labels:  python37, python38
hypercorn-fastapi-docker
Docker image with Hypercorn for FastAPI apps in Python 3.7, 3.8, 3.9. Ready for HTTP2 and HTTPS
Stars: ✭ 18 (-64%)
Mutual labels:  python37, python38
docker-cgi-python
🐳Docker file for cgi using python2.7, 3.6, 3.7, 3.8, 3.9 and 3.10🐍
Stars: ✭ 13 (-74%)
Mutual labels:  python37, python38
Pydantic
Data parsing and validation using Python type hints
Stars: ✭ 8,362 (+16624%)
Mutual labels:  python37, python38
Infection
PHP Mutation Testing library
Stars: ✭ 1,575 (+3050%)
Mutual labels:  mutation-testing, mutation
mcpyrate
Advanced macro expander and language lab for Python.
Stars: ✭ 35 (-30%)
Mutual labels:  python37, python38
tukaan
A modern, cross platform Python toolkit for creating desktop GUI applications. Contributors are welcome!
Stars: ✭ 97 (+94%)
Mutual labels:  python37, python38
universalmutator
Regexp based tool for mutating generic source code across numerous languages
Stars: ✭ 105 (+110%)
Mutual labels:  mutation-testing, mutation
mutant-swarm
Mutation testing framework and code coverage for Hive SQL
Stars: ✭ 20 (-60%)
Mutual labels:  mutation-testing, unit-test
flake8-annotations
Flake8 Type Annotation Checking
Stars: ✭ 117 (+134%)
Mutual labels:  python37, python38
Javascript Testing Best Practices
📗🌐 🚢 Comprehensive and exhaustive JavaScript & Node.js testing best practices (August 2021)
Stars: ✭ 13,976 (+27852%)
Mutual labels:  mutation-testing, mutation
mutode
Mutation testing for JavaScript and Node.js
Stars: ✭ 61 (+22%)
Mutual labels:  mutation-testing, mutation
prisma-client-py
Prisma Client Python is an auto-generated and fully type-safe database client designed for ease of use
Stars: ✭ 739 (+1378%)
Mutual labels:  python37, python38
CodeBaseManager
Multi-langage CLI tool to manage your code base
Stars: ✭ 11 (-78%)
Mutual labels:  unit-test
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 (-76%)
Mutual labels:  unit-test
spec
Unit testing Vapor 4 applications through declarative specifications.
Stars: ✭ 32 (-36%)
Mutual labels:  unit-test
plugin-unit-test-demo
Sample WordPress plugin to illustrate unit tests
Stars: ✭ 17 (-66%)
Mutual labels:  unit-test
NoMoneyTrip
[SKT/한국관광공사] 2020 스마트 관광 앱 개발 공모전 '무전여행' 앱
Stars: ✭ 28 (-44%)
Mutual labels:  unit-test

mutatest: Python mutation testing

Are you confident in your tests? Try out mutatest and see if your tests will detect small modifications (mutations) in the code. Surviving mutations represent subtle changes that are undetectable by your tests. These mutants are potential modifications in source code that continuous integration checks would miss.

Features

Install

Install from PyPI:

$ pip install mutatest

Install from conda-forge:

$ conda install -c conda-forge mutatest

Example Output

This is an output example running mutation trials against the API Tutorial example folder example folder.

$ mutatest -s example/ -t "pytest" -r 314

Running clean trial
2 mutation targets found in example/a.py AST.
1 mutation targets found in example/b.py AST.
Setting random.seed to: 314
Total sample space size: 2
10 exceeds sample space, using full sample: 2.

Starting individual mutation trials!
Current target location: a.py, LocIndex(ast_class='BinOp', lineno=6, col_offset=11, op_type=<class '_ast.Add'>)
Detected mutation at example/a.py: (6, 11)
Detected mutation at example/a.py: (6, 11)
Surviving mutation at example/a.py: (6, 11)
Break on survival: stopping further mutations at location.

Current target location: b.py, LocIndex(ast_class='CompareIs', lineno=6, col_offset=11, op_type=<class '_ast.Is'>)
Detected mutation at example/b.py: (6, 11)
Running clean trial

Mutatest diagnostic summary
===========================
 - Source location: /home/user/Github/mutatest/docs/api_tutorial/example
 - Test commands: ['pytest']
 - Mode: s
 - Excluded files: []
 - N locations input: 10
 - Random seed: 314

Random sample details
---------------------
 - Total locations mutated: 2
 - Total locations identified: 2
 - Location sample coverage: 100.00 %


Running time details
--------------------
 - Clean trial 1 run time: 0:00:00.348999
 - Clean trial 2 run time: 0:00:00.350213
 - Mutation trials total run time: 0:00:01.389095

Trial Summary Report:

Overall mutation trial summary
==============================
 - DETECTED: 3
 - SURVIVED: 1
 - TOTAL RUNS: 4
 - RUN DATETIME: 2019-10-17 16:57:08.645355

Detected mutations:

DETECTED
--------
 - example/a.py: (l: 6, c: 11) - mutation from <class '_ast.Add'> to <class '_ast.Sub'>
 - example/a.py: (l: 6, c: 11) - mutation from <class '_ast.Add'> to <class '_ast.Mod'>
 - example/b.py: (l: 6, c: 11) - mutation from <class '_ast.Is'> to <class '_ast.IsNot'>

Surviving mutations:

SURVIVED
--------
 - example/a.py: (l: 6, c: 11) - mutation from <class '_ast.Add'> to <class '_ast.Mult'>

Documentation

For full documentation, including installation, CLI references, API references, and tutorials, please see https://mutatest.readthedocs.io/en/latest/. The project is hosted on PyPI at https://pypi.org/project/mutatest/.

Bugs/Requests

Please use the GitHub issue tracker to submit bugs or request features. See the Contributing Guidelines if you are interested in submitting code in the form of pull requests.

ChangeLog

Consult the Changelog page for fixes and enhancements of each version.

License

Copyright Evan Kepner 2018-2020.

Distributed under the terms of the MIT license, mutatest is free and open source software.

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