编写单元测试 meaning in English
writing the unit tests
Examples
- All i can say about preventing them is that they re the zillionth example of why it saves time to write unit tests before and while writing code , and why you should run those tests often
关于防止这些问题,我只能说它们是最好的示例,说明了为什么在编写代码之前(或同时)编写单元测试会节省时间,以及为什么应该经常运行那些测试! - Although you can manually code unit tests to test any method , this task is more difficult for private than for public methods because it requires a deeper understanding of the intricacies of reflection
尽管可以手动编写单元测试代码以测试任何方法,但这需要对反射的复杂性有足够的理解,因此为私有方法编写测试代码比为公共方法编写测试代码的难度更大。 - Testng takes its inspiration from junit , trying to maintain the latter s simplicity ; at the same time , however , testng eliminates most of the limitations of the older framework and gives the developer the ability to write more flexible and powerful tests
的新测试框架为应用程序编写单元测试。 testng的灵感来自junit ,同时尽量保持后者的简单性;但是, testng消除了老框架的大多数限制,使开发人员可以编写更加灵活、更加强大的测试。 - Informed response is much better than pointing fingers when the customer discovers that " once in a lifetime " defect which could have been exposed with a simple test months earlier , or the inevitable surprise and anger when management finds out unit testing wasn t being done
与其让用户“在使用中”发现程序缺陷(这些缺陷本应该在几个月前通过简单的测试暴露出来) ,或者等到管理人员发现没有编写单元测试时再感到惊讶(和愤怒) ,还不如采取一些预防性的措施。 - What clearly emerges while using testng is that this framework is already a good choice for writing unit tests , and that it is , by design , simple to integrate with other libraries and tools , so its future development can bring developers some interesting news . a new path has been forged
在使用testng时最明显的是,这个模板已经是编写单元测试的一个好选择了,而且,在设计上,它与其他库和工具的集成非常简单,所以它未来的发展会给开发人员带来一些有趣的新东西。