stefan2904 / shunit2

Automatically exported from code.google.com/p/shunit2
0 stars 0 forks source link

Generated report doesn't show the test functions which are not run if early exit. #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If a test suite dies early because of an interpreter failure, shunit2
(version from SVN of July 6, '08) will not report those tests which were
not run nor give a count where one can determine that tests were not run
because of a premature failure.

I believe this is easily fixed by counting the number of tests in
suite_addTest and using that in _shunit_generateReport

Also I am not sure shunit2 ever reports that a test is skipped. 

If you want me to work up a patch I'd be happy to do that. What prevents me
from doing this now is that "test" is used to refer to functions that run
asserts as well as a count of the assert statements.

Original issue reported on code.google.com by rocky.bernstein on 17 Jul 2008 at 1:46

GoogleCodeExporter commented 9 years ago

Original comment by kate.a.w...@gmail.com on 30 Aug 2008 at 4:30

GoogleCodeExporter commented 9 years ago
Hum... I see what you mean about the tests and tests being both tests. Gonna 
have to think about that one a bit. 
I'm thinking I shouldn't be counting asserts, but I'll look at how JUnit and 
PyUnit are doing things.

Original comment by kate.war...@gtempaccount.com on 30 Aug 2008 at 6:15

GoogleCodeExporter commented 9 years ago
If you could take a look at the latest release in the source tree (rev# 230 or 
higher is good) and let me know 
what you think, I would appreciate it. I actually did a lot of work to make 
shUnit look much more like PyUnit in 
this regard, and I now count tests as tests, and failures are counted 
per-assert as I believe should be done. 
There might still be issues though.

Original comment by kate.a.w...@gmail.com on 7 Oct 2008 at 11:20

GoogleCodeExporter commented 9 years ago
Considering this fixed.

Original comment by kate.war...@gtempaccount.com on 24 Oct 2008 at 12:58