Why do we need Unit test
The test is the executable specification
Focus on the purpose first, then about the possible implementations
Understand the program‘s behavior by looking at the tests – the tests tell you more than an API description, they show the dynamics, how to use the API.
You develop just enough
You get to the goal as quick as possible
You don‘t develop unnecessary code
There is no code without a test
There is no test without a user requirement
Once you get one test working, you know it is working now and forever
You use the tests as regression tests
The tests give us the courage to refactor
You can prove that everything still works after the refactoring by simply executing the tests
Code quality – only code that is tested is checked into versioning system!
Well-written tests provide documentation on expected and unexpected use
Tests are fined grained – can be run independently
Tests can be aggregated easily
Which tests fail give you a hint of where a bug was introduced
Helps ensure you made a shippable product
Focus on the purpose first, then about the possible implementations
Understand the program‘s behavior by looking at the tests – the tests tell you more than an API description, they show the dynamics, how to use the API.
You develop just enough
You get to the goal as quick as possible
You don‘t develop unnecessary code
There is no code without a test
There is no test without a user requirement
Once you get one test working, you know it is working now and forever
You use the tests as regression tests
The tests give us the courage to refactor
You can prove that everything still works after the refactoring by simply executing the tests
Code quality – only code that is tested is checked into versioning system!
Well-written tests provide documentation on expected and unexpected use
Tests are fined grained – can be run independently
Tests can be aggregated easily
Which tests fail give you a hint of where a bug was introduced
Helps ensure you made a shippable product
【Why do we need Unit test】相关文章
2. 软件测试LoadRunner面试题:What is the difference between standard log and extended log?
4. 简述你对Statement,PreparedStatement,CallableStatement的理解
5. What is view? why do we have view?
6. Linux Interview Questions For software testers
7. Static Nested Class 和 Inner Class的不同
8. 软件测试LoadRunner面试题:What is the difference between Overlay graph and Correlate graph?
9. 软件测试LoadRunner面试题:What is a function to capture dynamic values in the web vuser script?
10. 软件测试LoadRunner面试题:How did you find web server related issues?
本文来源:https://www.mianshiwenti.com/a11958.html
进入下载页面
上一篇:UML设计模式笔试题
下一篇:没有了
﹝Why do we need Unit test﹞相关内容
- do you have any Best Practice for testing
- 软件测试LoadRunner面试题:What is think time? How do you change the threshold?
- 软件测试LoadRunner面试题:If web server, database and Network are all fine where could be the problem?
- What\'s the difference between an interface and abstract class? (接口与抽象类有什么区别)
- 软件测试LoadRunner面试题:What is correlation? Explain the difference between automatic correlation and manu
- 软件测试LoadRunner面试题:If you want to stop the execution of your script on error, how do you do that?
- 软件测试LoadRunner面试题: Types of Goals in Goal-Oriented Scenario
- Java 中访问数据库的步骤?Statement 和PreparedStatement 之间的区别?
- What\'s the difference between deep copy and shallow copy? (深拷贝与浅拷贝有什么区别)
- 若通过ObjectOutputStream向一个文件中多次以追加方式写入object,为什么用ObjectInputStream读取这些object时会产生StreamCorruptedExcepti