Chapter 12: Testing Your Application
Ensuring that a program runs correctly is an important part of programming. In this chapter, we are going to learn about testing the Rust application. We are going to implement a simple unit test for a function, and a functional test for creating a user in our application.
We are going to learn a simple technique to debug and find where a problem occurs in our code.
After learning the information in this chapter, you will be able to create a unit test and functional test for Rust and Rocket applications to ensure the applications work as expected. You will also learn how to use a debugger such as gdb or lldb to debug Rust programs.
In this chapter, we are going to cover these main topics:
- Testing the Rust ...
Get Rust Web Development with Rocket now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.