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.
-
chromedp
a way to drive/test Chrome, Safari, Edge, Android Webviews, and other browsers supporting the Chrome Debugging Protocol. -
realize
Go build system with file watchers and live reload. Run, build and watch file changes with custom paths -
hoverfly
HTTP(S) proxy for recording and simulating REST/SOAP APIs with extensible middleware and easy-to-use CLI. -
cdp
Type-safe bindings for the Chrome Debugging Protocol that can be used with browsers or other debug targets that implement it. -
ggr
a lightweight server that routes and proxies Selenium Wedriver requests to multiple Selenium hubs. -
gnomock
integration testing with real dependencies (database, cache, even Kubernetes or AWS) running in Docker, without mocks. -
gotest.tools
A collection of packages to augment the go testing package and support common patterns.
Get performance insights in less than 4 minutes
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.