T
- The type of SWTBot
, e.g., SWTBot
or
SWTWorkbenchBot
.public abstract class AbstractICEUITester<T extends org.eclipse.swtbot.swt.finder.SWTBot>
extends org.eclipse.swtbot.swt.finder.SWTBotTestCase
SWTBot
(or
a sub-class thereof) and provides a reference to the main UI thread's
Display
that is created at startup time.
This class also provides hooks for test class implementations, to facilitate easy initialization and disposal of shared test resources and resources that can be re-allocated on a per-test basis.
To use an SWTBot
to simulate user interaction, use the bot provided
via getBot()
.
Note: Changes to the UI must be coordinated with the main UI thread
using Display.syncExec(Runnable)
or
Display.asyncExec(Runnable)
. To get the shared display, you may call
getDisplay()
.
AbstractICESWTTester
,
AbstractICEWorkbenchTester
Constructor and Description |
---|
AbstractICEUITester() |
Modifier and Type | Method and Description |
---|---|
void |
afterAllTests()
This method is called after all tests are run.
|
static void |
afterClass()
This is run by JUnit at the end of all tests.
|
void |
afterEachTest()
This method is called after each test is run.
|
void |
beforeAllTests()
This method is called before all tests are run.
|
static void |
beforeClass()
Sets the shared reference to the UI thread's
display . |
void |
beforeEachTest()
This method is called before each test is run.
|
assertContains, assertDoesNotContain, assertEnabled, assertMatchesRegex, assertMatchesRegex, assertMatchesRegex, assertNotEnabled, assertNotSameWidget, assertNotSameWidget, assertNotVisible, assertSameWidget, assertSameWidget, assertText, assertText, assertTextContains, assertTextContains, assertTextDoesNotContain, assertTextDoesNotContain, assertVisible, captureScreenshot, pass, runBare
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, setName, toString
public static void beforeClass()
display
.public void beforeAllTests()
When overriding, be sure to call super.beforeAllTests()
at the
***BEGINNING OF YOUR METHOD***!
public void beforeEachTest()
When overriding, be sure to call super.beforeEachTest()
at the
***BEGINNING OF YOUR METHOD***!
public void afterEachTest()
When overriding, be sure to call super.afterEachTest()
at the
***END OF YOUR METHOD***!
public void afterAllTests()
When overriding, be sure to call super.afterAllTests()
at the
***END OF YOUR METHOD***!
public static void afterClass()
afterAllTests()
for the firstTester
to
trigger the cleanup of shared test resources.