How to skip the eunit test?

It is interesting how to mark a specific test in eunit so that it is ignored (i.e. compiled but not executed) in the next test run. I ask this question in the context of TDD, i.e. I would like to reorganize it into green, but still there are some test cases that I will receive later.

I would rather not comment on the test, this is a good way to forget about it. There is a missing line in the eunit test summary line, but I could not find any documents about this functionality.

+5
source share
1 answer

You can temporarily remove the suffix '_test' from the test name (or add any other, for example '_ignore'). It will compile but will not appear in the summary (since it will be considered as a regular function and thus eunit will be ignored).

This, of course, is a workaround, eunit should support this functionality, but I am afraid that this is not happening.


The EUnit term “skipped” means that something prevented the test from starting, for example, a compilation failure, a node that was responsible for the test failure, or installation failure.

This concept is pretty deeply embedded in the code, so there is no easy way to get the user missed tests.

+4
source

All Articles