Python Testing

Open-source Python projects categorized as Testing

Top 23 Python Testing Projects

  • GitHub repo locust

    Scalable user load testing tool written in Python

    Project mention: Load Testing Tool | | 2021-05-07

    I don't do a lot of load testing but when I do I use Locust. It does the job and it's easy to learn/use.

  • GitHub repo faker

    Faker is a Python package that generates fake data for you. (by joke2k)

    Project mention: How to create a 1M record table with a single query | | 2021-03-24

    Creating realistic fake data is useful in lower environments and for load testing. Outside of SQL I like faker:

  • GitHub repo pytest

    The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

    Project mention: How To Do Parameterization In Pytest With Selenium? | | 2021-05-21

    The implementation of metafunc class can be found here. Below is the example code which demonstrates the usage of pytest_generate_tests function for parameterization in pytest.

  • GitHub repo Robot Framework

    Generic automation framework for acceptance testing and RPA

    Project mention: Robot Framework: generic OSS automation framework for test automation and RPA | | 2021-04-19
  • GitHub repo hypothesis

    Hypothesis is a powerful, flexible, and easy to use library for property-based testing.

    Project mention: Go: Fuzzing Is Beta Ready | | 2021-06-04

    People can have different definitions and still communicate usefully, and I think there is not 100% agreement on the exact boundaries between the two.

    That said, for me: they are distinct but related, and that distinction is useful.

    For example, Hypothesis is a popular property testing framework. The authors have more recently created HypoFuzz, which includes this sentence in the introduction:

    “HypoFuzz runs your property-based test suite, using cutting-edge fuzzing techniques and coverage instrumentation to find even the rarest inputs which trigger an error.”

    Being able to talk about fuzzing and property testing as distinct things seems useful — saying something like “We added fuzzing techniques to our property testing framework“ is more meaningful than “We added property testing techniques to our property testing framework“ ;-)

    My personal hope is there will be more convergence, and work to add first-class fuzzing support in a popular language like Go will hopefully help move the primary use case for fuzzing to be about correctness, with security moving to an important but secondary use case.


  • GitHub repo PyAutoGUI

    A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.

    Project mention: is there a way to create an auto hotkey script alternative? | | 2021-02-19

    Or if you want to do Python, you'll want to create a virtual environment. Activate the virtual environment, install pyautogui (pip install pyautogui), and create a script. For the i3 config file, it would look like this: bindsym $mod+shift+d exec /path/to/env/bin/python3 /path/to/

  • GitHub repo Moto

    A library that allows you to easily mock out tests based on AWS infrastructure.

    Project mention: Ask HN: Does anyone else find the AWS Lambda developer experience poor? | | 2021-04-18

    Not a full solution, but when I was doing this I really got to love the awslogs utility:

    It allows you to stream Cloudwatch logs from the command line, so you can grep them, save them to files, etc... (The web based Cloudwatch interface is terrible.)

    Another suggestion is to try to modularize the core business logic in your lambda such that you separate the lambda-centric stuff from the rest of it. Obviously, though, if "the rest of it" is hitting other AWS services, you're going to hit the same testing roadblock.

    Or you can try mocking, which may or may not provide much value for you. There's a python library for that, (moto), but it's not 100% up to date wrt AWS services/interfaces, last I had checked. Might be worth a try though.

  • GitHub repo

    The Python error steamroller.

    Project mention: The Python Error Steamroller (2013) | | 2021-05-04
  • GitHub repo Mimesis

    Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.

    Project mention: Mimesis is a fake data generator that can be used in Data Science for generating dummy datasets. | | 2021-04-03
  • GitHub repo responses

    A utility for mocking out the Python Requests library.

    Project mention: Am new to Testing, Should I test Functions that Return a Queryset? | | 2021-05-11

    The repsonses library is designed for mocking requests during tests

  • GitHub repo molecule

    Molecule aids in the development and testing of Ansible roles

    Project mention: Should ansible-lint, molecule and other tools use a single irc channel? | | 2021-06-01

    Please upvote your prefered answer from the survey which proposed joining ansible-lint and ansible-molecule channels when we move them from freenode irc to There is also an option to keep the channels separated.

  • GitHub repo freezegun

    Let your Python tests travel through time

    Project mention: FreezeGun: Let your Python tests travel through time | | 2021-04-26
  • GitHub repo factory_boy

    A test fixtures replacement for Python

  • GitHub repo splinter

    splinter - python test framework for web applications

  • GitHub repo manticore

    Symbolic execution tool

    Project mention: Smart Contract Security for Pentesters | | 2021-04-22
  • GitHub repo Behave

    BDD, Python style.

    Project mention: UPDATE: Subreddit scraper for investing | | 2020-12-20

    I like bdd and unit tests.

  • GitHub repo tox

    Command line driven CI frontend and development task automation tool. (by tox-dev)

  • GitHub repo SeleniumBase

    ✅ 📊 A complete framework for fast, easy, & reliable web testing. (Python/pytest/Selenium) 🚀

    Project mention: The 15 syntax formats of SeleniumBase | | 2020-12-28

    This format is used by most of the examples in the SeleniumBase examples folder. It's a great starting point for anyone learning SeleniumBase, and it follows good object-oriented programming principles. In this format, BaseCase is imported at the top of a Python file, followed by a Python class inheriting BaseCase. Then, any test method defined in that class automatically gains access to SeleniumBase methods, including the setUp() and tearDown() methods that are automatically called to spin up and spin down web browsers at the beginning and end of test methods. Here's an example of that:

  • GitHub repo fake2db

    create custom test databases that are populated with fake data

  • GitHub repo

    Automatically mock your HTTP interactions to simplify and speed up testing

    Project mention: My Python testing style guide – Stargirl (Thea) Flowers | | 2021-03-24
  • GitHub repo httpretty

    HTTP client mocking tool for Python - inspired by Fakeweb for Ruby (by gabrielfalcao)

  • GitHub repo sixpack

    Sixpack is a language-agnostic a/b-testing framework

    Project mention: Sixpack/sixpack: Sixpack is a language-agnostic A/B-testing framework | | 2021-04-07
  • GitHub repo nose

    nose is nicer testing for python

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-06-04.


What are some of the best open-source Testing projects in Python? This list will help you:

Project Stars
1 locust 16,295
2 faker 12,619
3 pytest 7,405
4 Robot Framework 5,977
5 hypothesis 5,234
6 PyAutoGUI 5,171
7 Moto 4,685
8 4,066
9 Mimesis 3,309
10 responses 3,233
11 molecule 3,110
12 freezegun 2,919
13 factory_boy 2,527
14 splinter 2,400
15 manticore 2,345
16 Behave 2,342
17 tox 2,247
18 SeleniumBase 2,193
19 fake2db 2,061
20 2,013
21 httpretty 1,888
22 sixpack 1,691
23 nose 1,339