-
Book Overview & Buying
-
Table Of Contents
Rust Web Programming - Third Edition
By :
We have built our to-do application, and it is working. However, we only know it is working because our operations were simple. We know that in the real world, the logic behind our applications will be more complex with more moving parts. This is where unit testing comes in. Unit testing is essential when your application evolves. In this chapter, we will cover the following:
By the end of this chapter, you will understand the importance of unit testing. You will also be able to write unit tests and mock IO handles such as calls to a database, to test how our code handles different states. You will also be able to test HTTP requests for a service and build a testing harness that configures a database and runs tests in log files.