public abstract class AbstractWorkbenchTester extends AbstractICEUITester<org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot>
This class provides helpful methods to help navigate the ICE workbench and open editors, views, or perspectives for testing.
An SWTWorkbenchBot
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 |
---|
AbstractWorkbenchTester() |
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.
|
static void |
beforeWorkbenchClass()
Tries to close the "Welcome" view if it is open.
|
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 static void beforeWorkbenchClass()
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.eclipse.finder.SWTWorkbenchBot>
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.eclipse.finder.SWTWorkbenchBot>
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.eclipse.finder.SWTWorkbenchBot>
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.eclipse.finder.SWTWorkbenchBot>