Real-life unit tests

  • Tutorial
Often I heard that someone listened to a lecture or read an article about unit tests, as if I understood everything; I decided to try it myself - and nothing worked.

Why is this so?

Apparently, the reason is that unit tests are usually demonstrated with simple examples. But in life, the code is more complicated. In real projects, the code uses databases, web services, code written by other teams, etc.

This live video demonstrates how to write unit tests for code with external dependencies.

www.devclub.eu/2011/06/06/asolntsev-real-life-unit-tests





Slides can be found here .

PS. For those who do not know: in Estonia, elections are held electronically, that is, people can vote via the Internet. In the presentation, the author shows the use of unit tests on his application to show the election results. An additional humor here is that during the last election a similar official application fell for several hours, which caused heated debate in the society, and the contractor was fined a large amount. In the presentation, the application works great at the same load.

Also popular now: