observ
is a set of Go test tools to simplify testing of observability data generated by applications.
This toolkit is stable enough to use in tests.
API will likely have some breaking changes between minor pre-v1 releases, but I will put as much effort as reasonably possible to provide upgrade instructions, compatibility layers and tools with each breaking change.
Sorry, this is very early release, please take a look at hello_test.go to see how it works.
The code of modern Go app has a lot of metadata that can be used to accompany regular tests. Some ideas:
- Testing asyncronous components (e.g. block the test until the log message is emitted)
- Testing cache hits: just check Prometheus counter instead of mocking
- Creating rules for log format: when application logs follow a contract (e.g. used in data pipelines, served from the API
- Testing correctness of mission-critical metrics (e.g. metrics used in autoscaling and alerting)
- More log collectors
- Documentation and more examples
- More assertion functions
- Test coverage and CI
- Tracing support
There are no rules for contribution yet. Open and issue or PR if you feel like it.
A part of testify is copied into this repo to fix bad error traces. This code
is licensed via MIT License, same as observ
.