Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115810
D9915.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D9915.diff
View Options
diff --git a/doc/functional-tests.md b/doc/functional-tests.md
--- a/doc/functional-tests.md
+++ b/doc/functional-tests.md
@@ -120,7 +120,7 @@
`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, 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.
@@ -303,10 +303,14 @@
#### 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-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.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 12:09 (3 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187788
Default Alt Text
D9915.diff (1 KB)
Attached To
D9915: test: Explain why test logging should be used
Event Timeline
Log In to Comment