I have a three tiered app
And I know there are four types of integration tests:
I know I would write big-bang tests just like unit tests but without any mocking so I would employ a backend DB as well...
I don't know how to write other types of integration tests?
Could anybody provide any information how to do this (if at all) or whether it's actually feasible doing it?
I suggest doing these:
Depending on your system, you may or not want to complement 3 with integration tests at the top level of the code, but without involving the UI. Regardless of which option you take, make sure to have more comprehensive coverage through unit & focused integration tests, as testing various behavior at the top level have a complexity level that can get out of control very quickly.
Should integration tests be equal to unit tests meaning same number of tests, but testing without mocks? Or should these tests test something completely different?
As I mentioned in 1 & 2, its best when those test different things. This depends on the system, but I'd usually expect the amount of unit tests to be a few times the amount of integration tests. For full system tests, make sure you have enough so that you can tell all the pieces were hooked correctly, but not so much that it becomes too complex to test each scenario.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With