具体描述
The Pragmatic Programmers classic is back! Freshly updated for modern software development, Pragmatic Unit Testing in Java 8 With JUnit teaches you how to write and run easily maintained unit tests in JUnit with confidence. You'll learn mnemonics to help you know what tests to write, how to remember all the boundary conditions, and what the qualities of a good test are. You'll see how unit tests can pay off by allowing you to keep your system code clean, and you'll learn how to handle the stuff that seems too tough to test.
Pragmatic Unit Testing in Java 8 With JUnit steps you through all the important unit testing topics. If you've never written a unit test, you'll see screen shots from Eclipse, IntelliJ IDEA, and NetBeans that will help you get past the hard part--getting set up and started.
Once past the basics, you'll learn why you want to write unit tests and how to effectively use JUnit. But the meaty part of the book is its collected unit testing wisdom from people who've been there, done that on production systems for at least 15 years: veteran author and developer Jeff Langr, building on the wisdom of Pragmatic Programmers Andy Hunt and Dave Thomas. You'll learn:
How to craft your unit tests to minimize your effort in maintaining them.
How to use unit tests to help keep your system clean.
How to test the tough stuff.
Memorable mnemonics to help you remember what's important when writing unit tests.
How to help your team reap and sustain the benefits of unit testing.
You won't just learn about unit testing in theory--you'll work through numerous code examples. When it comes to programming, hands-on is the only way to learn!
作者简介
Jeff Langr is a veteran software developer with well over three decades experience building software and helping others learn how to do so. Jeff develops software for Outpace Systems, Inc., and still provides help to customers through Langr Software Solutions, Inc. Jeff's prior Pragmatic Bookshelf titles include Agile in a Flash (with Tim Ottinger) and Modern C++ Programming with Test-Driven Development.
Andy Hunt has written and co-written over a half-dozen previous titles, including the classic The Pragmatic Programmer, Practices of an Agile Developer, Pragmatic Thinking & Learning, and Learn to Program with Minecraft Plugins, and regularly speaks at conferences on software development around the world.
Dave Thomas is a programmer who likes to evangelize cool stuff. He cowrote "The Pragmatic Programmer" and was one of the creators of the Agile Manifesto. His book "Programming Ruby" introduced the Ruby language to the world, and "Agile Web Development with Rails" helped kickstart the Rails revolution.
目录信息
1. Building Your First JUnit Test
2. Getting Real with JUnit
3. Digging Deeper into JUnit Assertions
4. Organizing Your Tests
Part II — Mastering Manic Mnemonics!
5. FIRST Properties of Good Tests
6. What to Test: The Right-BICEP
7. Boundary Conditions: The CORRECT Way
Part III — The Bigger Design Picture
8. Refactoring to Cleaner Code
9. Bigger Design Issues
10. Using Mock Objects
11. Refactoring Tests
Part IV — The Bigger Unit-Testing Picture
12. Test-Driven Development
13. Testing Some Tough Stuff
14. Testing on a Project
A1. Setting Up JUnit in IntelliJ IDEA and NetBeans
Index
· · · · · · (收起)
读后感
这个可能是到目前为止我看到的最薄的技术书了.一本专门讲用junit做测试的书籍, 但是又不是纯技术的书籍, 里面没有介绍junit如何实现, 也没有大篇幅的介绍如何使用junit, 或者介绍junit的一些高级用法, 这些统统的没有, 那么这本书都讲的什么呢, 它讲了做单元测试的一些原则, 单...
这本书的定位是Junit的入门书籍,我用Junit差不多有五年的时间了,因此大部分的概念对我而言都并不陌生。我所在的项目组对产品代码覆盖率要求非常高,要写非常多测试代码来验证功能。 大概用了一下午的时间,快速的翻了翻这本书,记了些笔记。总体感觉大概就是可以做junit的user...
这本书只有170多页,让你能够在短时间内了解如何使用JUnit进行单元测试,而不必啃着大部头还带着挫折感,是学习Junit的首选入门书籍。作者首先告诉你单元测试的重要性,然后手把手教你如何使用Junit进行简单的单元测试,最后以自己的经验告诉读者好的测试应该具有怎样的品质。...
一个高质量的程序离不开测试,一个高质量的java程序更不可能会没有JUnit测试,此书讲解如何通过JUnit来进行测试,阐述了单元测试带来的好处。 个人认为,好的团队应该坚持为自己写的代码添加测试程序。提高程序的质量和团队成员的势气、信心。 最后,值得一读:)
对OOP有一定理解的读者一定会发现,本书没有讲到单元测试的精髓。什么是单元测试的精髓呢?我认为是测试类的内聚性。举个例子:stack类的push和pop方法就是一种高内聚,它们的组合才有stack体现出FILO的性质。单元测试的目标不是孤立地测试push和pop,而是测试FILO性质。 单元...
用户评价
不错的一本junit入门、提高的书
很适合unit test理论入门,作为码农,虽写过不少unit tests,但说test的质量则自己都不能确定,究其原因则是缺乏理论和准则。本书恰如其当的解决了笔者的问题,从unit tests的基础到设计原则侃侃而来,如FIRST、Right-BICEP的总结很方便记忆。
很适合unit test理论入门,作为码农,虽写过不少unit tests,但说test的质量则自己都不能确定,究其原因则是缺乏理论和准则。本书恰如其当的解决了笔者的问题,从unit tests的基础到设计原则侃侃而来,如FIRST、Right-BICEP的总结很方便记忆。
很适合unit test理论入门,作为码农,虽写过不少unit tests,但说test的质量则自己都不能确定,究其原因则是缺乏理论和准则。本书恰如其当的解决了笔者的问题,从unit tests的基础到设计原则侃侃而来,如FIRST、Right-BICEP的总结很方便记忆。
可以视作很久之前那本《单元测试之道(Java版)》的第二版,总结了许多最新的测试实践经验,其中最为经典的就是总结概括了单元测试的FIRST,Right-BICEP,CORRECT三大测试原则,但是不推荐完全没有单元测试经验和概念的人阅读,因为此书没有解释到底什么是单元测试这个问题。