The Go Testing Bible

th_oz4x16q5pv9lKzUxEvDzR9jrvn7JHbfL

确保您的应用程序经过全面测试是任何开发人员工作的重要组成部分。理想情况下,应用程序核心逻辑的所有更改都应在测试中捕获,以确保随着应用程序复杂性和规模的增长,它不会在功能方面倒退并最终影响客户。

通过对我们的测试采取勤奋的方法,我们可以帮助确保我们正在构建的系统稳定可靠。有了可靠的测试套件,我们还可以帮助提高我们开发应用程序的速度,因为我们不再需要进行手动测试。

改进的测试让您有信心快速更改代码库,并在客户准备好时向他们推出新功能。

在整个课程中,我们将涵盖开始正确测试您的 Go 应用程序所需的一切。从单元测试,一直到集成测试,最后是对 End-2-End 测试的快速概述。

• 格式化和 Linting
• 表驱动测试和子测试
• 使用 Testify 创建测试套件
• 使用构建标签区分测试
• 对您的 Go 应用程序进行单元测试
• 基准性能
• 使用 vektra/mockery 进行模拟
• 如何为 HTTP REST API 创建集成测试

Ensuring your applications are tested thoroughly is an essential part of any developers work. All changes to your application’s core logic should ideally be captured within tests to ensure that, as your application grows in complexity and size, it doesn’t regress in terms of the functionality and end up impacting customers.

By taking a diligent approach to our testing, we can help to ensure that the systems that we are building are stable and reliable. With a solid test suite, we can also help to improve the speed at which we develop our applications as we remove the need for manual tests to be done.

Improved testing gives you the confidence to make changes to the codebase quickly and roll out new features to customers as and when they are ready.

Throughout this course, we’ll be covering everything it takes to get started properly testing your Go applications. From unit testing, all the way through to integration testing and finally a quick overview of End-2-End testing.

• Formatting and Linting
• Table Driven Tests and Sub tests
• Creating Test Suites with Testify
• Differentiating Tests with Build Tags
• Unit Testing Your Go Apps
• Benchmarking Performance
• Mocking with vektra/mockery
• How to create integration tests for HTTP REST APIs

GfSeK2E6WrBqn5UoU5zLgszExXKMtsty

资源下载此资源仅限VIP下载,请先
本站资源仅限VIP会员下载点击购买VIP会员

原创文章,作者:steven,如若转载,请注明出处:https://rr3d.cn/39153.html

赞 (0)
steven的头像steven
上一篇 2022年11月24日
下一篇 2022年11月24日

相关推荐

发表回复

登录后才能评论
分享本页
返回顶部