https://github.com/gdt-dev/examples
Go Declarative Testing - Examples
https://github.com/gdt-dev/examples
declarative-testing go go-testing golang golang-testing http-testing kubernetes-testing
Last synced: 5 days ago
JSON representation
Go Declarative Testing - Examples
- Host: GitHub
- URL: https://github.com/gdt-dev/examples
- Owner: gdt-dev
- License: apache-2.0
- Created: 2023-07-25T16:57:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-05T12:58:21.000Z (about 2 years ago)
- Last Synced: 2024-06-21T04:49:26.404Z (over 1 year ago)
- Topics: declarative-testing, go, go-testing, golang, golang-testing, http-testing, kubernetes-testing
- Language: Go
- Homepage:
- Size: 111 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: COPYING
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Go Declarative Testing - Examples
[](https://pkg.go.dev/github.com/gdt-dev/examples)
[](https://goreportcard.com/report/github.com/gdt-dev/examples)
[](https://github.com/gdt-dev/examples/actions)
[](CODE_OF_CONDUCT.md)
`gdt` is a testing library that allows test authors to cleanly describe tests
in a YAML file. `gdt` reads YAML files that describe a test's assertions and
then builds a set of Golang structures that the standard Golang
[`testing`](https://golang.org/pkg/testing/) package and standard `go test`
tool can execute.
This `github.com/gdt-dev/examples` (`gdt-examples` hereafter) repository is a
companion Go library for `gdt` that contains examples for how to use `gdt` and
its companion Go libraries like `gdt-http` and `gdt-kube`.
The `http` directory in this repository contains Go code for a simplistic HTTP
web service that lists and creates books (in `http/api`) along with functional
tests written in YAML using `gdt`'s test file format (in `http/tests/api`).
## Contributing and acknowledgements
`gdt` was inspired by [Gabbi](https://github.com/cdent/gabbi), the excellent
Python declarative testing framework. `gdt` tries to bring the same clear,
concise test definitions to the world of Go functional testing.
The Go gopher logo, from which gdt's logo was derived, was created by Renee
French.
Contributions to `gdt-examples` are welcomed! Feel free to open a Github issue
or submit a pull request.