testza  by MarvinJWendt

Go test framework for assertions, fuzzing, and more

created 4 years ago
421 stars

Top 71.0% on sourcepulse

GitHubView on GitHub
Project Summary

Testza is a comprehensive Go testing framework designed to enhance the developer experience with a rich set of assertion methods, fuzzing capabilities, and output capturing. It integrates seamlessly with the standard go test tool, offering a user-friendly and colorful output for clearer test results.

How It Works

Testza provides a wide array of assertion functions that cover common testing needs, from simple equality checks to more complex scenarios like checking function execution time or validating directory states. Its fuzzing utilities generate diverse input sets for strings, integers, and floats, enabling robust testing against various edge cases. The framework also includes utilities for capturing stdout and stderr, and a snapshot testing feature to ensure consistent output or data structures across test runs.

Quick Start & Requirements

Highlighted Details

  • Extensive assertion library covering equality, type checks, file/directory operations, and more.
  • Built-in fuzzing utilities with pre-defined data sets (e.g., email addresses, HTML tags) and custom generation.
  • Output capturing for stdout and stderr, useful for testing CLI applications.
  • Snapshot testing for validating output stability across test runs.
  • Customizable output formatting, including color and line numbers.

Maintenance & Community

  • Developed by MarvinJWendt.
  • Community support available via Discord.

Licensing & Compatibility

  • License: MIT.
  • Compatible with standard Go projects.

Limitations & Caveats

The extensive fuzzing capabilities, while powerful, may require careful management of test set sizes to avoid excessively long test runs. Snapshot testing relies on files stored in /testdata/snapshots/, which need to be managed and potentially committed to version control.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), and
4 more.

yet-another-applied-llm-benchmark by carlini

0.2%
1k
LLM benchmark for evaluating models on previously asked programming questions
created 1 year ago
updated 3 months ago
Feedback? Help us improve.