开发者

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

开发者 https://www.devze.com 2023-01-29 18:39 出处:网络
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 ru

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

精彩评论

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