《单元测试》封面

单元测试

Unit Testing

Vladimir Khorikov · 初版 2020 年

3人推荐
4位读者提及
8次提及

Hacker News 上怎么说

  • “如果不做 mock,你怎么给代码做单元测试?”我强烈建议读一读 Vladimir Khorikov 写的《Unit Testing: Principles, Practices, and Patterns》。它能回答你的问题,并且会为你揭开一个完全不用 mock 进行测试的全新世界(倒不是说不用就比用 mock 更好或更差)……

    'How do you unit test your code without mocks?' I strongly recommend reading "Unit Testing: Principles, Practices, and Patterns" by Vladimir Khorikov. That's going to answer your question and will unveil a whole world of testing without mocking (not that it's better or worse than with mocks).…

  • 文章里展示的代码类型四象限,其实也出现在一本关于测试的绝佳好书——Vladimir Khorikov 于 2020 年 1 月出版的《Unit Testing Principles, Practices, and Patterns》里的图 7.1 中。https://www.manning.com/books/unit-testing

    The four quadrants of code types as shown in the article also appear as Figure 7.1 in an excellent book on testing: Unit Testing Principles, Practices, and Patterns, by Vladimir Khorikov, January 2020. https://www.manning.com/books/unit-testing

  • 学 Elixir 的话 Dave Thomas 有个视频系列 https://codestool.coding-gnome.com/courses/elixir-for-progra... 通用编程书的话我推荐 Vladimir Khorikov 的《Unit Testing》https://www.manning.com/books/unit-testing,这是 Saša Jurić 推荐过的

    For Elixir Dave Thomas has a video series https://codestool.coding-gnome.com/courses/elixir-for-progra... For a general programming book I recommend Unit Testing by Vladimir Khorikov https://www.manning.com/books/unit-testing which was recommended by Saša Jurić

  • 非常棒的建议。我在写代码时一直遵循这个原则,从来没掉过链子。关于这个主题有本好书:Vladimir Khorikov 于 2020 年写的《Unit Testing Principles, Practices, and Patterns》https://www.manning.com/books/unit-testing

    Great advice. I follow it in my coding efforts and it has never failed me. Great book about this: Unit Testing Principles, Practices, and Patterns, Vladimir Khorikov, 2020 https://www.manning.com/books/unit-testing

  • Vladimir Khorikov 2020 年那本《Unit Testing Principles, Practices, and Patterns》的第 9.2.4 节“只对你拥有的类型进行 mock”也推荐了这条规则。值得注意的是,该书还在 9.2.1 节指出:“Mock 仅用于集成测试”。我深以为然。在我看来,这本书是对测试最全面深入的解读……

    This rule is also recommended by section 9.2.4. "Only mock types that you own" of 2020 book by Vladimir Khorikov: "Unit Testing Principles, Practices, and Patterns". Worth noting is that book also says in 9.2.1: "Mocks are for integration tests only". I agree. In my opinion this book is the best comprehensive take on testing…

  • ……完全赞同。这么多年来我一直在自己 20 多人的开发团队里推行这个理念,效果非常棒。你可以在 Vladimir Khorikov 于 2020 年 1 月出的那本神书《Unit Testing Principles, Practices, and Patterns》里了解更多内容。

    …agree with it. I have been championing it in my team of 20+ devs since many years now, to great effect. You can read more about it in the excellent book by Vladimir Khorikov from January 2020 titled "Unit Testing Principles, Practices, and Patterns".

正在加载完整评论……

键盘快捷键

/
聚焦搜索框
j / k
下一本 / 上一本
Enter
打开选中的书
Esc
关闭 / 返回
g h
回到首页
g b
值得读精选
g t
历史总榜
g r
上升最快
g l
我的书架
?
显示本帮助