PHPUnitManual:11

From 흡혈양파의 번역工房
Jump to navigation Jump to search
제11장 테스트 진행 방법 (Testing Practices)
You can always write more tests. However, you will quickly find that only a fraction of the tests you can imagine are actually useful. What you want is to write tests that fail even though you think they should work, or tests that succeed even though you think they should fail. Another way to think of it is in cost/benefit terms. You want to write tests that will pay you back with information.


테스트를 작성하는 것은 어렵지 않다. 하지만 작성한 테스트 중 유용한 것이 매우 적다는 것을 테스트를 작성하면서 느끼게 될 것이다. 정말로 작성해야 할 테스트는, 성공할 것처럼 보이지만 실패하는 테스트이다. 그리고 실패할 것처럼 보이지만 성공하는 테스트이다. 혹은 코스트와 이익의 관점에서 생각해 보는 것도 좋다. 중요한 것은 유용한 정보를 제공해 주는 테스트이다.


--Erich Gamma


Notes