github.com/keikoproj/manny@v0.0.0-20210726112440-8571e4c99ced/docs/testing-strategy.md (about) 1 # Testing Strategy 2 3 Manny uses a series of test tables to validate internal functions. The test tables and functions can be divided into the 4 following categories: 5 6 - Examples 7 - Negative Tests 8 - Unit tests 9 10 ### Examples 11 12 The purpose of testing against the `examples` directory is two fold: 13 - We establish a contract for use of Manny so that we don't unintentionally break core functionality 14 - We educate users on how to properly use Manny without detailed instruction pages 15 16 ### Negative Tests 17 18 The `tests` directory consists of our negative tests and showcases how _not_ to use Manny and establishes a contract of 19 what will definitively be an end-user error. 20 21 ### Unit Tests 22 23 Although all of the above tests are ran in unit style testing, they actually accomplish more E2E level testing but with 24 better introspection/coverage support. 25 26 These tests are specifically more unit test oriented and make singular method calls and evaluate output. 27 28 ### Conventions 29 30 - All tests contain a case named "Valid" that demonstrates how to use the function or method. 31 - All tests use a field named "Identifier" to differentiate one test from the other. 32 - All tests are runnable by `go test` and contribute to coverage 33 - Core functionality should include a test in `examples`