在测试包执行期间,可能会发现由于更改设计而导致的缺陷,因而修改测试自动化脚本。
During the execution of the test suite, defects can be found which results in changing design, hence modifying test automation scripts.
这种方法的一个有趣的副作用是允许通过闭包访问类的私有成员和受保护成员,这有利于对类执行单元测试。
One interesting side effect of this approach is that it allows us to access private and protected members of a class via a closure, which can be handy for unit testing classes.
Cobertura通过用额外的语句记录在执行测试包时,哪些行被测试到、哪些行没有被测试到,通过这种方式来度量字节码,以便对测试进行监视。
Cobertura monitors tests by instrumenting the bytecode with extra statements to log which lines are and are not being reached as the test suite executes.
应用推荐