上QQ阅读APP看书,第一时间看更新
Debugging and Testing
A seasonal developer spends far more time on debugging and testing code than writing code, in a typical software project. This chapter introduces the basics of writing tests for a server-side Swift project and recommends the best practice in debugging server-side Swift code. When it comes to a web development framework, both the Vapor and Kitura frameworks offer very good testing and debugging support. You are going to learn how to use the test framework in Swift and logging features in Vapor and Kitura to help debugging and error-proofing your code.
This chapter covers writing tests for server-side Swift projects as well as debugging in server-side Swift.
The following is a list of topics on debugging for server-side Swift:
- Using the Logging API in a Vapor project
- Using the Logger API in a Kitura project
- Debugging using the HTTP traffic monitoring tool