All Projects → RussellLuo → dbtest

RussellLuo / dbtest

Licence: MIT license
Database testing made easy in Go.

Programming Languages

go
31211 projects - #10 most used programming language

Labels

dbtest

Database testing made easy in Go.

Features

  1. Declarative

    Define the minimum test specification in a YAML-based DSL, then all tests can be generated automatically.

  2. Customizable

    You can specify your own Go template when generating tests.

  3. Opinionated

Installation

Make a custom build of protogo:

$ protogo build --plugin=github.com/protogodev/dbtest

Or build from a local fork:

$ protogo build --plugin=github.com/protogodev/dbtest=../my-fork
Usage
$ protogo dbtest -h
Usage: protogo dbtest <source-file> <interface-name>

Arguments:
  <source-file>       source-file
  <interface-name>    interface-name

Flags:
  -h, --help                         Show context-sensitive help.

      --out=STRING                   output filename (default "./<srcPkgName>_test.go")
      --fmt                          whether to make the test code formatted
      --spec="./dbtest.spec.yaml"    the test specification in YAML
      --tmpl=STRING                  the template to render (default to builtin template)

Examples

See examples.

Documentation

Check out the Godoc.

License

MIT

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].