Description
gotests makes writing Go tests easy. It's a Golang commandline tool that generates table driven tests based on its target source files' function and method signatures. Any new dependencies in the test files are automatically imported.
gotests alternatives and similar packages
Based on the "Testing" category.
Alternatively, view gotests alternatives based on common mentions on social networks and blogs.
-
realize
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading. -
dockertest
Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work. -
Testcontainers-go
Testcontainers for Go is a Go package that makes it simple to create and clean up container-based dependencies for automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers that should be run as part of a test and clean up those resources when the test is done. -
selenoid
DISCONTINUED. Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary. -
hoverfly
Lightweight service virtualization/ API simulation / API mocking tool for developers and testers -
playwright-go
Playwright for Go a browser automation library to control Chromium, Firefox and WebKit with a single API. -
gnomock
Test your code without writing mocks with ephemeral Docker containers 📦 Setup popular services with just a couple lines of code ⏱️ No bash, no yaml, only code 💻 -
embedded-postgres
Run a real Postgres database locally on Linux, OSX or Windows as part of another Go application or test -
cdp
Package cdp provides type-safe bindings for the Chrome DevTools Protocol (CDP), written in the Go programming language. -
gotest.tools
A collection of packages to augment the go testing package and support common patterns. -
testza
Full-featured test framework for Go! Assertions, fuzzing, input testing, output capturing, and much more! 🍕 -
go-testdeep
Extremely flexible golang deep comparison, extends the go testing package, tests HTTP APIs and provides tests suite
CodeRabbit: AI Code Reviews for Developers

Do you think we are missing an alternative of gotests or a related project?
Popular Comparisons
README
gotests

gotests
makes writing Go tests easy. It's a Golang commandline tool that generates table driven tests based on its target source files' function and method signatures. Any new dependencies in the test files are automatically imported.
Demo
The following shows gotests
in action using the official Sublime Text 3 plugin. Plugins also exist for Emacs, also Emacs, Vim, Atom Editor, Visual Studio Code, and IntelliJ Goland.
Installation
Minimum Go version: Go 1.6
Use go get
to install and update:
$ go get -u github.com/cweill/gotests/...
Usage
From the commandline, gotests
can generate Go tests for specific source files or an entire directory. By default, it prints its output to stdout
.
$ gotests [options] PATH ...
Available options:
-all generate tests for all functions and methods
-excl regexp. generate tests for functions and methods that don't
match. Takes precedence over -only, -exported, and -all
-exported generate tests for exported functions and methods. Takes
precedence over -only and -all
-i print test inputs in error messages
-only regexp. generate tests for functions and methods that match only.
Takes precedence over -all
-nosubtests disable subtest generation when >= Go 1.7
-parallel enable parallel subtest generation when >= Go 1.7.
-w write output to (test) files instead of stdout
-template_dir Path to a directory containing custom test code templates. Takes
precedence over -template. This can also be set via environment
variable GOTESTS_TEMPLATE_DIR
-template Specify custom test code templates, e.g. testify. This can also
be set via environment variable GOTESTS_TEMPLATE
-template_params_file read external parameters to template by json with file
-template_params read external parameters to template by json with stdin
Contributions
Contributing guidelines are in [CONTRIBUTING.md](CONTRIBUTING.md).
License
gotests
is released under the Apache 2.0 License.
*Note that all licence references and agreements mentioned in the gotests README section above
are relevant to that project's source code only.