Giter Club home page Giter Club logo

pytest-sorter's Introduction

pytest-sorter

See Build Status on Travis CI

A simple plugin to first execute tests that historically failed more

This pytest plugin was generated with cookiecutter along with @hackebrot's cookiecutter-pytest-plugin template.

Description

This plugin will save a history of your tests executions in a file .test_history. For each test it will have how many times it was executed, and how many times it failed.

Using that information it will calculate the percentage of failure of tests, and order them to first execute the higher failure ratio

Requirements

  • Python>=3

Installation

You can install "pytest-sorter" via pip from PyPI:

$ pip install pytest-sorter

Usage

After installed, your tests will automatically create and update the .test_history file, and order tests by their failure ratio.

You can tell pytest to ignore this plugin by passing: ` pytest --no-sorted `

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the MIT license, "pytest-sorter" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

pytest-sorter's People

Contributors

andremicheletti avatar dependabot[bot] avatar

Stargazers

Mark avatar Ronan Vico avatar  avatar Joao Vitor S. avatar André Ramos avatar RajaniKanth Reddy avatar

Watchers

James Cloos avatar  avatar Kostas Georgiou avatar

pytest-sorter's Issues

Todo next (features)

  • allow to reset/override the .test_history file
  • remove old tests from .test_history file (automatically/manually?)
  • make it compatible with pytest-xdist
  • make documentation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.