如果从测试编辑器执行,则为ClassInitialize和ClassCleanup [英] ClassInitialize and ClassCleanup if Executed from Test Editor
本文介绍了如果从测试编辑器执行,则为ClassInitialize和ClassCleanup的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们如何在从TestEditor执行脚本时管理ClassCleanup。??
如果脚本1是单独执行,我能够执行classcleanup,我可以清理我的对象。
但是当我从测试编辑器运行它和其他脚本时,我的Script1 ClassCleanup没有被执行。 p>
anyhelp please ...
问候,
解决方案
我猜如果您在一个类中进行了所有测试,则ClassCleanup将针对类中的所有测试方法调用一次。在这种情况下,您应该使用TestCleanup。
Hi,
How can we manage the ClassCleanup when the Script is executed from TestEditor.??
if the script1 is executed individually , I am able to execute the classcleanup where i clean my objects.
but when i run it along with other scripts from Test Editor, My Script1 ClassCleanup is not executed.?
anyhelp please...
Regards,
解决方案
I guess you have all the tests in a single class, ClassCleanup will be called once for a all test methods inside a class. You should use TestCleanup in this case.
这篇关于如果从测试编辑器执行,则为ClassInitialize和ClassCleanup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文