去测试基本的学习路径

Usually, when I start out to learn something for the first time, I hit up the usual suspects: Pluralsight, Udemy, Linkedin Learning, etc. I really love learning programming topics via video training. For me, I find the instructors usually drop little tidbits of knowledge throughout the course, which is often not included in blog posts. However, when really trying to deep dive into unit testing in Go, I found these resources lacking.

通常,当我第一次开始学习某些东西时,我会遇到一些常见的怀疑对象:Pluralsight,Udemy,Linkedin Learning等。我真的很喜欢通过视频培训来学习编程主题。 对我来说,我发现在整个课程中讲师通常会少讲一些知识,而这些知识通常不包括在博客文章中。 但是,当真正尝试深入Go的单元测试时,我发现缺少这些资源。

Unit testing in Go is a pretty straight-forward task, which is awesome. And this is also why you can find a lot of resources on the basics of testing in Go. When searching for something more targeted, like mocking with interfaces, it can be harder to find quality content. I have put together this list of links to Pluralsight, YouTube, documentation, and blog posts that really helped me dive deeper into testing in Go.

Go中的单元测试是一项非常简单的任务,非常棒。 这也是为什么您可以在Go的测试基础上找到大量资源的原因。 当搜索更具针对性的内容(例如使用接口进行嘲笑)时,很难找到高质量的内容。 我整理了这个指向Pluralsight,YouTube,文档和博客文章的链接列表,这些链接确实帮助我深入了Go的测试。

This is not a definitive list, and I will do my best to update it over time as I run across new resources. However, if you’re new to testing in Go, or haven’t been going deeper than the standard testing package, this post may be beneficial to you.

这不是一个确定的列表,当我使用新资源时,我会尽力更新它。 但是,如果您刚开始使用Go进行测试,或者还没有深入到标准测试包中,那么这篇文章对您可能会有所帮助。

基础 (The Basics)

You have to start somewhere, and learning the basics of unit testing in Go is actually very well covered. Here are some resources to get started.

您必须从某个地方开始,并且实际上已经很好地学习了Go中的单元测试基础。 这里有一些入门资源。

HTTP测试 (HTTP Testing)

I find that the majority of code I write in Go these days are REST services. Luckily, testing your endpoints is very easy and these links can walk you through how to do it.

我发现这些天我在Go中编写的大多数代码都是REST服务。 幸运的是,测试端点非常简单,这些链接可以引导您完成操作。

基准测试和分析 (Benchmarking & Profiling)

I absolutely love the benchmarking and profiling tools in Go. I can say with confidence this is an area that most developers ignore. This is through no fault of their own, as most teams don’t have their product owners asking about performance. However, as an engineer, you should really be concerned about it and always looking for potential areas of concern.

我绝对喜欢Go中的基准测试和性能分析工具。 我可以自信地说这是大多数开发人员都忽略的领域。 这绝不是他们自己的错,因为大多数团队没有产品负责人来询问性能。 但是,作为工程师,您应该真正关心它,并始终在寻找潜在的关注领域。

模拟与界面 (Mocking & Interfaces)

This can be a daunting task if you’re new to the language, or software engineering in general. However, once you see it practice and do it a couple of times, the mystery is gone and you’ll be a pro at it. These resources provide a concise and easy to follow examples to get you going.

如果您是该语言的新手,或者是一般的软件工程,那么这可能是一项艰巨的任务。 但是,一旦您看到它可以练习并执行了几次,这个谜团就消失了,您将成为专家。 这些资源提供了一个简洁易懂的示例,助您一臂之力。

高级 (Advanced)

With any topic in software engineering, you can scrape the surface or go really deep. Fortunately, 99.9% of us can stay near the surface and do just fine. But if you need (or want) to go further, read on!

关于软件工程的任何主题,您都可以刮擦表面或深入了解。 幸运的是,我们中99.9%的人可以留在地表附近,并且做得很好。 但是,如果您需要(或想进一步),请继续阅读!

结语 (Wrapping Up)

Image for post

I hope you find these resources as helpful as I did. As stated at the beginning, this is not meant to be a complete list of links. I plan to add more as I come across them, and will do my best to keep this page updated. If you have a resource that really helped you, please leave it in the comments, and I’ll add it here. I for one know I will be back on this page often!

希望您能像我一样对这些资源有所帮助。 如开头所述,这并不意味着链接的完整列表。 我计划在遇到这些问题时添加更多内容,并会尽力使此页面保持更新。 如果您有真正有用的资源,请将其保留在评论中,我将在此处添加。 我知道我会经常回到该页面!

翻译自: https://levelup.gitconnected.com/go-testing-essential-learning-path-2b7bb61b1030

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值