tcunit / TcUnit

An unit testing framework for Beckhoff's TwinCAT 3
Other
273 stars 75 forks source link

Verbose mode #196

Closed Rednas83 closed 1 year ago

Rednas83 commented 2 years ago

Would be cool to have a verbose mode which only displays failed tests in the output window.

sagatowski commented 1 year ago

Isn't that the opposite of verbose to only show parts of the output? Currently the only thing that is shown in the output window (in error mode) is the failed tests (or more correctly, the failed assertions) + tests results, so this is exactly what you ask for?

Rednas83 commented 1 year ago

This is indeed what I asked for. Verbose is indeed all messages and non-verbose only the essential ones. How can this error mode be activated?

sagatowski commented 1 year ago

You have the essential ones in the ERROR-list of VS, while the non-essential ones are just normal messages in visual studio. image

You have to make sure "Messages" is selected.

Rednas83 commented 1 year ago

I don't like this approach since I also use Messages for debugging applications. Is it not possible to add a configuration option for this? Something like: image

sagatowski commented 1 year ago

Sorry, I really don't understand what you are asking for. Initially you only want failed tests to be shown, which is EXACTLY what you already have. Please clarify with an usecase what this "toggle" should do.

Rednas83 commented 1 year ago

Currently I am not working on a tc3 project. So I had to look at the docs for this. Verbose mode=FAILED TESTS and STATISTICS image Non verbose mode= ONLY FAILED TESTS

Just a way for users to opt out if they are not interested in the statistics.

sagatowski commented 1 year ago

I don't think there is a strong usecase for this. Normally when you write your tests (applying the practices of TDD, you ALWAYS want to know that all the tests you've just written have failed, and the normal procedure is that you write a bunch of tests, and make sure that the count adds up. I think this is much easier than counting the number of asserts and making sure it adds up (especially since the amount of asserts can differ than the amounts of tests, as you can do more than one assert per test).