
Ask HN: How do you find a bug in a software? - 0x54MUR41
Context: a system is divided into micro services.
======
aequitas
I'm a happy Sentry user, [https://sentry.io](https://sentry.io)

------
JeanMarcS
Run tests on each of the micro services and if they are all ok, test the next
level and etc.

That might be the downside of micro services : if all of them works well, but
orchestrating them generates new bugs. Hard to find where it crashes.

------
valbaca
Bugs themselves are usually found QA, customers, logs, and/or metrics.

To find where to fix it, logs, crash dumps (another kind of log), and/or
isolation (going "down" the stack and checking along the way).

------
amriksohata
Rarely find bugs via unit tests, apart from in complex logic

~~~
valbaca
true; unit tests will rarely find bugs, especially if you're writing the tests
after the code.

Unit tests are meant to ensure that when you add features, fix bugs, or
refactor, that you don't break what's already working.

If this means your unit tests don't catch bugs, then it could be that you're
not introducing any! yay!

But I have found that by forcing myself into TDD, I do find more cases than
when I was writing tests after code.

By writing the tests before I've begun the implementation, it forces you to
think about preconditions, invariants, and postconditions in a more
disciplined way.

------
kjullien
Watch your logs ?

