You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the runner spawning the handler process, debugging test failures is currently a bit involved. Since handlers take input from stdin, they can very easily be manually tested on command line with echo <request> | <handler-bin>.
I propose adding -v (verbose on failure) and -vv (always verbose) args (potentially also a --verbosity={0,1,2}), where:
-v will print the full request and response for each failed test
-vv will print the full request and response for each test
This way, the failed tests can easily be replicated manually with a simple copy-paste.
Cool! That should be helpful indeed.
I wanted to address this after opening #11. Do you think this feature could evolve to also support stateful tests?
Do you think this feature could evolve to also support stateful tests?
statefulness was not yet on my radar when I opened this issue, so I haven't thought about it much yet.
Consider the scenario: func A produces ref $a through request req_a. func B then takes the $a reference parameter through request req_b, and fails. Ideally, -v would unwind this stack trace by first printing req_b, and then recursively going through its reference parameters and printing all those requests too?
If that proves too complicated to implement, I think just printing the top-level failed request would already provide a lot of benefit though.
Last commit in #11 addresses this. It got a bit more involved since state mutations had to be taken into account too (i.e., btck_chainstate_manager_process_block has an effect on the result of btck_chain_get_height), so I introduced a separate entity for it (DependencyTracker) along with unit tests. Also, README.md has been updated to explain the verbose flags, including a sample output.
I propose adding -v (verbose on failure) and -vv (always verbose) args (potentially also a --verbosity={0,1,2}), where:
I implemented -v and -vv. Internally, three enum levels are introduced, so adding another flag for verbosity should be straightforward. Let me know if you think having that as well would be helpful.
Activity
stringintech commentedon Dec 4, 2025
Cool! That should be helpful indeed.
I wanted to address this after opening #11. Do you think this feature could evolve to also support stateful tests?
stickies-v commentedon Dec 4, 2025
statefulness was not yet on my radar when I opened this issue, so I haven't thought about it much yet.
Consider the scenario:
func Aproducesref $athrough requestreq_a.func Bthen takes the$areference parameter through requestreq_b, and fails. Ideally,-vwould unwind this stack trace by first printingreq_b, and then recursively going through its reference parameters and printing all those requests too?If that proves too complicated to implement, I think just printing the top-level failed request would already provide a lot of benefit though.
stringintech commentedon Dec 4, 2025
The recursive approach makes sense. I will work on it. Thanks!
stringintech commentedon Dec 8, 2025
Last commit in #11 addresses this. It got a bit more involved since state mutations had to be taken into account too (i.e.,
btck_chainstate_manager_process_blockhas an effect on the result ofbtck_chain_get_height), so I introduced a separate entity for it (DependencyTracker) along with unit tests. Also,README.mdhas been updated to explain the verbose flags, including a sample output.I implemented
-vand-vv. Internally, three enum levels are introduced, so adding another flag for verbosity should be straightforward. Let me know if you think having that as well would be helpful.Add support for stateful test suites and add chain tests (#11)