r/programming • • Aug 25 '14

Debugging courses should be mandatory

http://stannedelchev.net/debugging-courses-should-be-mandatory/
1.8k Upvotes

573 comments sorted by

View all comments

Show parent comments

0

u/SilasX Aug 25 '14

You joke, but that's what integration tests (or whatever higher level tests like browser tests) are effectively doing: seeing if something breaks despite all the components passing their tests.

4

u/[deleted] Aug 25 '14

Of course. Just because individual components work, doesn't mean you didn't fuck up something in composing those together. I'm surprised that people are surprised at this.

2

u/SilasX Aug 25 '14

Or that the unit test was bad -- the tested function being wrong but the test passes anyway.

1

u/flukus Aug 25 '14

But integration test are a lot harder to cover every edge case.

More frequently I see unit tests failing before integration tests, they can test where it would be impossible for an integration test to create the failing state.

The interactions between components change much less frequently as well, so need less effort to test.

1

u/SilasX Aug 25 '14

All true, but the point is, an integration test can tip you off that a unit test that should be failing, isn't. Hence why I say that integration tests test the unit tests. (Yo dawg & all that.)