Skip to main content
11 events
when toggle format what by license comment
Mar 16, 2019 at 14:45 history closed Doc Brown
BobDalgleish
CommunityBot
Duplicate of Why is white box testing discouraged in OOP?
Mar 16, 2019 at 7:43 vote accept ttulka
Mar 15, 2019 at 22:17 answer added Doc Brown timeline score: 3
Mar 15, 2019 at 17:25 comment added GHP Unit testing is pretty much only valuable to test the parts of your software that take data/inputs (which can be mocked) and perform a calculation or transformation on them. If you have an interface with a void method that saves an object to some persistence system (like a dbase) there is ZERO value in mocking up a void method and calling it, unless the real method and the mocked method both have some other side effect, like updating a global variable that's active inside the test as well.
Mar 15, 2019 at 11:13 answer added gnasher729 timeline score: 1
Mar 15, 2019 at 10:00 review Close votes
Mar 16, 2019 at 14:45
Mar 15, 2019 at 9:49 answer added JacquesB timeline score: 1
Mar 15, 2019 at 9:47 comment added Doc Brown Let me add here: the linked question may not be literally the same, but the top answer to that former questions applies here as well: white-box testing is not about testing implementation details of a component directly, it makes use of the knowledge about internal implementation to create "better" test cases, but still uses only the public interface of a component.
Mar 15, 2019 at 8:16 comment added Christian Hackl "In fact, if there is a method which doesn't work and the result is still correct, the method is probably just unused or redundant" - or, equally likely, the test has a bug. Other than that, your question is really just the old issue of unit testing vs. integration testing. There have been countless discussions on that topic here already.
Mar 15, 2019 at 8:07 answer added Neil timeline score: 1
Mar 15, 2019 at 7:24 history asked ttulka CC BY-SA 4.0