diff --git a/doc/TESTING.md b/doc/TESTING.md index 511a917c0fb13..1b76ace1fc914 100644 --- a/doc/TESTING.md +++ b/doc/TESTING.md @@ -1,10 +1,9 @@ # Tests -There are a number of test cases in `tests/`. The test framework is [Catch](https://github.com/philsquared/Catch). For tutorials, please visit [https://github.com/philsquared/Catch/blob/master/docs/tutorial.md](https://github.com/philsquared/Catch/blob/master/docs/tutorial.md). +There are a number of test cases in [`tests/`](https://github.com/CleverRaven/Cataclysm-DDA/tree/master/tests). The test framework is [Catch](https://github.com/philsquared/Catch). For tutorials, please visit [https://github.com/philsquared/Catch/blob/master/docs/tutorial.md](https://github.com/philsquared/Catch/blob/master/docs/tutorial.md). ## Guidelines -When creating tests, insure that any objects used (directly or indirectly) are fully reset befre testing. -A number of tests have been rendered flaky by either properties of randomly generated objects or by interactions between tests via global objects (mostly the player object). +When creating tests, ensure that all objects used (directly or indirectly) are fully reset before testing. Several tests have been rendered flaky by properties of randomly generated objects or interactions between tests via global objects (often the player object). As a general guideline, test cases should be standalone (one test should not rely on the output of another). When generating objects with json definitions, use REQUIRE statements to assert the properties of the objects that the test needs. -This protects the test from shifting json definitions, by making it apparent what about the object changed to cause the test to break. \ No newline at end of file +This protects the test from shifting json definitions by making it apparent what about the object changed to cause the test to break.