内容简介

Unit Testing: Principles, Practices and Patterns is a practical guide to modern unit testing best practices. Microsoft MVP Vladimir Khorikov takes you hands-on with examples of the ideal unit test and unit testing practices, building your skills step by step on a solid foundation. You’ll explore how to design and write tests that check the right aspects of your applications, develop effective and maintainable test suites, and automate your testing process safely. When you are done, you will have a best practice testing suite that ensures your projects are easier to maintain, easier to scale, and easier to adapt to changing needs.

what's inside

A universal frame of reference by which to assess any unit test

Common anti-patterns to identify and avoid

Guidelines on how to refactor a test suite along with the production code it covers

Using integration tests to verify the behavior of the system as a whole


Vladimir Khorikov is an author, blogger, and Microsoft MVP. He has been developing software professionally for over ten years, and has mentored numerous teams on the ins and outs of unit testing.

下载地址

豆瓣评论

  • Alex
    难能可贵的一点是系统的区分了什么是单元测试,集成测试和端到端测试,按照以前的经验,其实只有模糊的概念,以及各种测试的特征。看完这本书,知道了什么场景下写什么样的测试,测试关注的重点是什么,测试需要达到的四个目标,以及什么样的测试不如不写。此外,还看到了一些ddd的例子,根据代码业务的复杂度和涉及dependency多少两个维度分成了四种代码等等。我想检验代码质量的一个标准之一就是测试好不好写吧…以及refactor之后测试好不好改。2021-01-24
  • Miroslav
    这书唯一的缺点就是面世太晚,早10年出,我就能少走很多弯路。2022-12-02
  • leesper
    侧重点还是在于怎么写好测试,不过书中推荐了很多相关参考书籍,其中就有我感兴趣的测试驱动开发方面的,继续读2024-01-20

猜你喜欢

大家都喜欢