diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-03-09 14:40:47 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-03-10 08:24:49 -0400 |
commit | ffff9dcdc3cbe427739cc19cc7a53f032474fa2a (patch) | |
tree | 94532e3a233b42f169dee03a22f4bfc104ccf8f4 /test | |
parent | 5518eeec2727d40e1105901a8751bf584ab69402 (diff) |
test: Explain why test logging should be used
Diffstat (limited to 'test')
-rw-r--r-- | test/README.md | 2 | ||||
-rw-r--r-- | test/functional/README.md | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/test/README.md b/test/README.md index c3e4ae9ad2..e1dab92a06 100644 --- a/test/README.md +++ b/test/README.md @@ -145,7 +145,7 @@ levels using the logger included in the test_framework, e.g. `test_framework.log` and no logs are output to the console. - when run directly, *all* logs are written to `test_framework.log` and INFO level and above are output to the console. -- when run on Travis, no logs are output to the console. However, if a test +- when run by [our CI (Continuous Integration)](/ci/README.md), no logs are output to the console. However, if a test fails, the `test_framework.log` and bitcoind `debug.log`s will all be dumped to the console to help troubleshooting. diff --git a/test/functional/README.md b/test/functional/README.md index 77a9ce9acb..6582c1cbcd 100644 --- a/test/functional/README.md +++ b/test/functional/README.md @@ -51,10 +51,13 @@ don't have test cases for. #### General test-writing advice +- Instead of inline comments or no test documentation at all, log the comments to the test log, e.g. + `self.log.info('Create enough transactions to fill a block')`. Logs make the test code easier to read and the test + logic easier [to debug](/test/README.md#test-logging). - Set `self.num_nodes` to the minimum number of nodes necessary for the test. Having additional unrequired nodes adds to the execution time of the test as well as memory/CPU/disk requirements (which is important when running tests in - parallel or on Travis). + parallel). - Avoid stop-starting the nodes multiple times during the test if possible. A stop-start takes several seconds, so doing it several times blows up the runtime of the test. |