Now, we can call the reset method to start off each test run to ensure we are going through the initialization code for the singleton object on every test run.
现在,我们可以在每次测试之前调用reset方法,保证我们在每次测试过程中都会先执行singleton对象的初始化代码。
Writing a test-cleanup aspect to automatically reset aspects like the one in the example after each test is conceptually simple, but the details are beyond the scope of this article.
编写一个测试清理方面,自动在每次测试后像在例子中那样重新设置方面从概念上来说是简单的,但是其细节超出了本文的范围。
If you use a strict test process where you can reset an environment back to a "zero state" before each run, the PWH data can be very valuable in proving reproducible results for a test.
若在所使用的严格测试过程中可以在每一测试开始前将环境重置回“零状态”,则PWH数据在验证某一测试的重复结果中可能非常有价值。
应用推荐