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()
?
Asked
Active
Viewed 342 times
3

Alba Mendez
- 4,432
- 1
- 39
- 55

Dennis S
- 627
- 1
- 6
- 13
1 Answers
1
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.

Itay Maman
- 30,277
- 10
- 88
- 118