开发者

When is the right time to call robot.cleanUp()

I'm using JUnit and FEST for Swing integration testing of our app that I start and stop, multiple times in the test case. Sho开发者_如何学Gould @after include a call to robot.cleanUp()?


The general rule is as follows: each initialization site of a FrameFixture should have a corresponding cleanup site.

Sepcifically, if your @Before method initializes a FrameFixture (as in: w = new FrameFixture<MyWindow>() where w is a field of the test class) then you should define a @After method that will release the resources via w.cleanUp().

See the sample in: http://docs.codehaus.org/display/FEST/Getting+Started.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜