public class AbstractSWTTester extends AbstractICEUITester<org.eclipse.swtbot.swt.finder.SWTBot>
A Shell
is opened (outside the default Eclipse workbench if used as a
plug-in test). This shell provides the "sandbox" in which UI tests are
performed. For instance, to test a specific Composite
, you may create
an instance of said Composite
in the shell and perform its UI tests.
The shell is shared among sub-class tests, and can be acquired via
getShell()
.
An SWTBot
is opened for each test class instance and should be used
for the actual UI tests. The bot can be acquired 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 shell's display, you may call
AbstractICEUITester.getDisplay()
.
Constructor and Description |
---|
AbstractSWTTester() |
Modifier and Type | Method and Description |
---|---|
void |
afterAllTests()
This method is called after all tests are run.
|
void |
afterEachTest()
This method is called after each test is run.
|
void |
beforeAllTests()
This method is called before all tests are run.
|
void |
beforeEachTest()
This method is called before each test is run.
|
afterClass, beforeClass
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 void beforeAllTests()
AbstractICEUITester
When overriding, be sure to call super.beforeAllTests()
at the
***BEGINNING OF YOUR METHOD***!
beforeAllTests
in class AbstractICEUITester<org.eclipse.swtbot.swt.finder.SWTBot>
public void beforeEachTest()
AbstractICEUITester
When overriding, be sure to call super.beforeEachTest()
at the
***BEGINNING OF YOUR METHOD***!
beforeEachTest
in class AbstractICEUITester<org.eclipse.swtbot.swt.finder.SWTBot>
public void afterEachTest()
AbstractICEUITester
When overriding, be sure to call super.afterEachTest()
at the
***END OF YOUR METHOD***!
afterEachTest
in class AbstractICEUITester<org.eclipse.swtbot.swt.finder.SWTBot>
public void afterAllTests()
AbstractICEUITester
When overriding, be sure to call super.afterAllTests()
at the
***END OF YOUR METHOD***!
afterAllTests
in class AbstractICEUITester<org.eclipse.swtbot.swt.finder.SWTBot>