czan / stateful-check

Stateful generative testing in clojure
MIT License
117 stars 11 forks source link

Include commands that did not run when printing frequencies #19

Closed r0man closed 6 months ago

r0man commented 6 months ago

Hi @czan,

I'm back!

I also faced the problem of a command not being executed and not noticing it for a while. This change prints commands that did not run when printing frequencies.

It is a partial solution to the issue raised here in https://github.com/czan/stateful-check/issues/18

Before, the frequencies table did only include the command that were run with their counts. If you have many commands it is not easy to spot if some haven't been run.

|   :command | :count |
|------------+--------|
|       :add |    112 |
|    :remove |    108 |
| :contains? |    107 |

After this change, all command frequencies are reported, with the ones that did not run at the bottom.

|   :command | :count |
|------------+--------|
|       :add |    112 |
|    :remove |    108 |
| :contains? |    107 |
|     :never |      0 |

Can we add this?

czan commented 6 months ago

Looks good, thanks!

r0man commented 6 months ago

Thank you!