I experience that the WindowTester framework closes shells during a test, when that test throws an exception.
My test setup is like this:
- Code: Select all
test::setUp() {
open dialog
}
test:.tearDown() {
close dialog
}
test::testAddProperty() throws Exception {
insert something into dialog
test if it has been inserted, otherwise throw exception
}
test::testOnSomeThingElse throws Exception {
}
I would assume, if my first test throws an exception, then that test case will be interrupted and the teardown is called.
Then setUp is called followed by the next test case etc.
But what I see in the log is the following message:
- Code: Select all
!ENTRY com.instantiations.eclipse 1 0 2008-10-07 15:12:00.719
!MESSAGE closing shell [aysnc] Setup Tags
My question is, why does the WindowTester framework close my shell, because I really wan't to do it myself?
The test framework does not only close the top shell, but in fact, the entire application is being shut down.
- Code: Select all
!ENTRY com.instantiations.eclipse 1 0 2008-10-07 15:12:00.719
!MESSAGE closing shell [aysnc] Setup Tags
!ENTRY com.instantiations.eclipse 1 0 2008-10-07 15:12:03.339
!MESSAGE closing shell [aysnc] Edit Data Center
!ENTRY com.instantiations.eclipse 1 0 2008-10-07 15:12:06.033
!MESSAGE closing shell [aysnc] Capacity and Change Manager
Or I'm I using it in the wrong way ?
All my test cases inherits from a common test case which has a static reference to UI hence a previous post on this forum:
- Code: Select all
static protected IUIContext ui = null;
@Override
protected void oneTimeSetup() throws Exception {
super.oneTimeSetup();
ui = getUI();
}
Really hoping for some feedback, because this just isn't right.