DEV Community

Discussion on: The Problem With High Test Coverage

Collapse
 
teamcoder profile image
Robert Ecker

Yes, having a test coverage of 100% is always great. However, everything we do costs time and money. If I had unlimited resources I would probably also try to write tests for every possible case in a legacy system ;-)

Collapse
 
jamesrichmond24 profile image
James Richmond

And what if there was a tool that creates coverage for legacy code automatically?
Do you know a such a tool?

Thread Thread
 
teamcoder profile image
Robert Ecker

Hehe, if you find such a tool and that tool creates only useful tests then let me know ;-)

Thread Thread
 
jamesrichmond24 profile image
James Richmond • Edited

Will do :)
So what's your recommendation? testing only the main components?

Thread Thread
 
teamcoder profile image
Robert Ecker

It always depends ;-) If tests help you to build your software then do TDD. If you want to decide where to start writing tests for a legacy system then you might ask your stakeholders what’s most important for them and start with the components which are most likely to break and which would cause the biggest damage if they broke.

Thread Thread
 
jamesrichmond24 profile image
James Richmond

Thanks a lot!
You're making good and interesting points :)

Thread Thread
 
teamcoder profile image
Robert Ecker

:)

Thread Thread
 
rvazquezglez profile image
Raúl Gerardo Vázquez González

There are tools like IntelliTest msdn.microsoft.com/en-us/library/d...

Jessica Kerr (in a very interesting talk) mentions a tool called QuickCheck which allows you to run property based testing to find cases where you program might fail youtu.be/X25xOhntr6s?t=20m28s

Thread Thread
 
teamcoder profile image
Robert Ecker

Thanks for sharing Raúl! Do you use such tools? Do they work well for you?