All Projects → cweill → Gotests

cweill / Gotests

Licence: apache-2.0
Automatically generate Go test boilerplate from your source code.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Gotests

Goreuse
Generic Code for Go
Stars: ✭ 93 (-97.41%)
Mutual labels:  golang-tools, code-generator
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (-98.86%)
Mutual labels:  testing-tools, test-driven-development
Cobra
A Commander for modern Go CLI interactions
Stars: ✭ 24,437 (+579.37%)
Mutual labels:  golang-application, commandline
Junit Dataprovider
A TestNG like dataprovider runner for JUnit with many additional features
Stars: ✭ 226 (-93.72%)
Mutual labels:  testing-tools, test-driven-development
mockcpp
Two C/C++ testing tools, mockcpp and testngpp.
Stars: ✭ 40 (-98.89%)
Mutual labels:  testing-tools, test-driven-development
Mockito Scala
Mockito for Scala language
Stars: ✭ 231 (-93.58%)
Mutual labels:  testing-tools, test-driven-development
Tinderonline
Find out which of your friends are online on Tinder
Stars: ✭ 155 (-95.69%)
Mutual labels:  golang-application, golang-tools
Testcl
when you don't have the balls to test your F5 BIG-IP iRules directly in production
Stars: ✭ 79 (-97.8%)
Mutual labels:  testing-tools, test-driven-development
Awesome Unit Testing Swift
A curated collection of awesome blog articles, books, talks, podcasts, tools/frameworks and examples.
Stars: ✭ 272 (-92.44%)
Mutual labels:  testing-tools, test-driven-development
PixelTest
Fast, modern, simple iOS snapshot testing written purely in Swift.
Stars: ✭ 56 (-98.44%)
Mutual labels:  testing-tools, test-driven-development
Reactopt
A CLI React performance optimization tool that identifies potential unnecessary re-rendering
Stars: ✭ 1,975 (-45.09%)
Mutual labels:  testing-tools, commandline
sushi
The SUSHI test case generator
Stars: ✭ 19 (-99.47%)
Mutual labels:  testing-tools, test-generation
Mockito
Most popular Mocking framework for unit tests written in Java
Stars: ✭ 12,453 (+246.21%)
Mutual labels:  testing-tools, test-driven-development
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (-90.41%)
Mutual labels:  golang-tools, commandline
Beanmother
A library for setting up Java objects as test data.
Stars: ✭ 102 (-97.16%)
Mutual labels:  testing-tools, test-driven-development
Gogeom
This is a Geometrical library for Go Language. Which includes multiple Geometrical calculations like Circle, Lines etc in different forms
Stars: ✭ 47 (-98.69%)
Mutual labels:  golang-application, golang-tools
Avoriaz
🔬 a Vue.js testing utility library
Stars: ✭ 771 (-78.57%)
Mutual labels:  testing-tools, test-driven-development
react-native-unit-tests
Example how to test React Native components
Stars: ✭ 79 (-97.8%)
Mutual labels:  testing-tools, test-driven-development
n3dr
Nexus3 Disaster Recovery (N3DR) is a tool that is capable of downloading all artifacts from a Nexus3 server and to migrate them to another Nexus3 server. Note that some repository formats are not supported at the moment.
Stars: ✭ 110 (-96.94%)
Mutual labels:  golang-tools, golang-application
StrangerData
👽 A .NET database populator for testing purposes
Stars: ✭ 22 (-99.39%)
Mutual labels:  testing-tools, test-driven-development

gotests License godoc Build Status Coverage Status codebeat badge Go Report Card

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.

demo

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.

License

gotests is released under the Apache 2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].