From 351e5013ae5ed4278dbc1e2b9ef27c956c15c8b0 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 15 Oct 2020 05:08:52 +1000 Subject: [PATCH] Expand the template testing section (#1157) Based on team discussions --- book/src/dev/rfcs/0000-template.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/book/src/dev/rfcs/0000-template.md b/book/src/dev/rfcs/0000-template.md index 0ac614928..b24ffe3bd 100644 --- a/book/src/dev/rfcs/0000-template.md +++ b/book/src/dev/rfcs/0000-template.md @@ -52,10 +52,17 @@ Explain how the feature will be tested, including: * tests for consensus-critical functionality * existing test vectors, if available * Zcash blockchain block test vectors (specify the network upgrade, feature, or block height and network) +* property testing or fuzzing The tests should cover: -* positive cases: make sure the feature accepts valid inputs +* positive cases: make sure the feature accepts valid inputs + * using block test vectors for each network upgrade provides some coverage of valid inputs * negative cases: make sure the feature rejects invalid inputs + * make sure there is a test case for each error condition in the code + * if there are lots of potential errors, prioritise: + * consensus-critical errors + * security-critical errors, and + * likely errors * edge cases: make sure that boundary conditions are correctly handled # Drawbacks