Step #2: Decide on Instrumented Tests vs. Unit Tests

So, which should we use? Instrumented tests? Unit tests? Both?

If you only wanted to worry about one, choose instrumented tests. Everything can be tested using instrumented tests, while unit tests cannot readily test everything.

And, for a small project like this one, going with instrumented tests for everything would be perfectly reasonable. However, most projects are not this small.

For larger projects — particularly those where tests will be run frequently — the speed gain from unit tests can be significant. So, a typical philosophy is:

That is the approach that we will take over the next few tutorials, starting with some unit tests.


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.