
xUnit测试模式
XUnit Test Patterns
Gerard Meszaros · 初版 2007 年
5人推荐
7位读者提及
8次提及
Automated testing 是 agile development 的基石。有效的测试策略能够更具进取心推进新功能的交付、加快用户反馈并提升质量。然而,对许多开发者而言,创建有效的 automated tests 却是……
Hacker News 上怎么说
正在加载完整评论……

XUnit Test Patterns
Gerard Meszaros · 初版 2007 年
Automated testing 是 agile development 的基石。有效的测试策略能够更具进取心推进新功能的交付、加快用户反馈并提升质量。然而,对许多开发者而言,创建有效的 automated tests 却是……
正在加载完整评论……
…Rhino Mocks 需要写出奇葩的代码,比如 var format = MockRepository.GenerateStub<IFormatCode>();(所以它到底是 Mock 还是 Stub?而且:这重要吗?)我推荐 Gerard Meszaros 写的神书《XUnit Test Patterns》,他对测试的不同方面做了更细粒度的划分。我很喜欢他的观点:你只是创建产生或响应“间接输入与输出”(比如异常、…)的对象
…Rhino Mocks asked for ridiculous code like var format = MockRepository.GenerateStub<IFormatCode>(); (Which one is it, a Mock or a Stub? And: Does it matter?) I recommend Gerard Meszaros excellent book XUnit Test Patterns, he makes more fine grained distinctions between different aspects of testing. I liked his notion that you simply create objects that produce or react to "indirect input and output" (i.e. exceptions,…
…以及 TDD。我真希望更多人能读读 Kent Beck 的书《Test-Driven Development: By Example》(https://www.programmingbooks.dev/#test-driven-development),然后再去读 Gerard Meszaros 的神书《XUnit Test Patterns》(https://www.programmingbooks.dev/#xunit-test-patterns)。说到底,只要有更多人去实践 TDD,明白它和其他技能一样需要学习,而不是什么万灵药,我就很高兴了。
…and TDD. I wished more people would read Kent Becks book [Test-Driven Development: by example](https://www.programmingbooks.dev/#test-driven-development) and then the amazing book by Gerard Meszaros [XUnit Test Patterns](https://www.programmingbooks.dev/#xunit-test-patterns). In the end I'm just happy if more people practice TDD and understand it's a skill to learn like everything else and not a silver bullet.
Gerard Meszaros 写的《xUnit Test Patterns: Refactoring Test Code》,http://xunitpatterns.com/
"xUnit Test Patterns: Refactoring Test Code" by Gerard Meszaros, http://xunitpatterns.com/
我强烈向每一个想在日常工作中用上测试的人推荐《xUnit Test Patterns: Refactoring Test Code》(http://www.amazon.com/xUnit-Test-Patterns-Refactoring-Code/d...)这本书。
I highly recommend this book "xUnit Test Patterns: Refactoring Test Code" (http://www.amazon.com/xUnit-Test-Patterns-Refactoring-Code/d...) to anyone who wants to start to use tests on daily basis.
…Michael Feathers 的《Working Effectively With Legacy Code》、Pryce 和 Freeman 的《Growing OO Software, Guided by tests》、Kent Beck 的《Test Driven Development》。还有最后一本,我极力推荐:Gerard Meszaros 的《XUnit Test Patterns》。Kent Beck 的 TDD 是很好的入门书。就算你觉得自己已经把测试搞明白了,也应该试试 TDD。它更多关乎自律和把事情办成,…
…"Working Effectively With Legacy Code" - Michael Feathers - "Growing OO Software, Guided by tests" - Pryce, Freeman - "Test Driven Development" by Kent Beck And, this last one I can't recommend enough: "XUnit Test Patterns" by Gerard Meszaros Kent Beck's TDD is good book to start with. Even if you feel like you have got testing figured out, you should try TDD. It has more to do with discipline and getting things done,…
> 《xUnit Test Patterns》这本神书里描述了一种叫做“断言轮盘”(Assertion Roulette)的 test smell。它指的是那些难以准确判断到底是哪个 assertion 导致了测试失败的情况。这种事情一开始到底是怎么搞出来的?…
> The excellent book xUnit Test Patterns describes a test smell named Assertion Roulette. It describes situations where it may be difficult to determine exactly which assertion caused a test failure. How is that even possible in the first place?…