haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Verbose logging for the runner #436

Open wiredsister opened 1 year ago

wiredsister commented 1 year ago

Problem: I wanted to see my tests run even though they are successful. I wanted to see them sequentially. This was surprisingly hard for me because I'm new to expecto. Running them sequentially was easy enough. It's the printing that I couldn't quite figure out at a glance.

For example, reading the docs I could not find an easy example of making it verbose. I ended up on a goose chase around this part of the documentation:

image

The namespace Logary.Adapter.Facade no longer exists and Logary has no write up on how it should be configured with Expecto. The latest 5.0 package pulls in for the Adapter via Nuget... I just think the docs are out of date.

Funny enough all I needed to do in my code was: runTestsWithCLIArgs [] [|"--debug"|] all

The only --debug flag I found when I Ctrl+F'ed in the README was xbuild Sample.fsproj && mono --debug bin/Debug/Sample.exe which scared me off because I'm using dotnet and wasn't sure if this was how I needed to be passing it.

Couple of thoughts:

Thanks for your time and effort ❤️ The library itself was quite lovely.

baronfel commented 1 year ago

I'd love to see the docs point to the withCLIArgs version of the runner functions by default - those are the most user friendly in my opinion because they allow users to customize behavior at runtime easily. What do the maintainers think of that?