Skip to content

The best pytest alternatives

3 tools that do a similar job to pytest, 3 of them open source. Each entry says what it does and who it suits, so you can pick the one that fits instead of the most famous.

You're replacing

pytest

A Python testing framework for writing simple tests that can also handle complex ones.

  1. 1

    chromedp

    Open source · MIT · ★ 13.3k

    A Go library that drives Chrome-style browsers through the DevTools Protocol, without an external driver.

    Best for: Go developers who want to automate or test web pages in code; Teams writing browser-based tests in Go with unit-test style tooling

  2. 2

    Mocha

    Open source · MIT · ★ 22.9k

    A JavaScript test framework for running automated tests in Node.js and the browser.

    Best for: JavaScript and Node.js developers who want automated tests for their code; Teams maintaining browser-based JavaScript that needs tests run in a real browser

  3. 3

    Enzyme

    Open source · MIT · ★ 19.8k

    A JavaScript testing utility that lets you inspect and simulate React component output in tests.

    Best for: Developers maintaining React codebases that already have component tests; Teams testing React 16 or older versions with a matching official adapter

How we pick: tools in the same category that solve the same problem, projects that name each other as alternatives, and open-source projects that describe themselves as an alternative to pytest. We don't take payment for placement.