《Expert One-on-One J2EE Development without EJB中文版》的笔记-第71页
- 章节名：Testing J2EE Applications
- 页码：第71页 2013-07-28 09:34:34
￼------------My understanding is that should do integration test at the beginning of the project, since integration is always the risky part of the projectTesting should occur throughout the development lifecycle. Testing should never be an afterthought. Integrating testing into the development process brings many benefits.-----------Unit Tests is not something you can describe with number like 100% coverage, or you try to cover every conner of you code, instead of this, try to get enough confidence from your unit test, no more no less.It's impossible for testing to guarantee that a program is correct. However, testing can provide a high level of confidence that a program does what we expect of it.It is important to recognize the limitations of testing - testing won't always expose concurrency issues.-----------The idea that using some approach or practice in project cause good code is totally wrong. You deal with the specific problem when you do coding, hence the most important thing is to have a deep understanding on it as well as careful thought.Testing is no substitute for careful thought before writing code; testing can never catch all bugs.Remember to use test failures to improve error messages and handling. If a test fails, and it wasn't immediately obvious what went wrong, try first to make the problem obvious (through improved error handling and messages) and then to fix it.
说明 · · · · · ·