Question

I'm using JUnit and FEST for Swing integration testing of our app that I start and stop, multiple times in the test case. Should @after include a call to robot.cleanUp()?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top