Package ghidra.test
Class AbstractGhidraHeadedIntegrationTest
java.lang.Object
generic.test.AbstractGTest
generic.test.AbstractGenericTest
generic.test.AbstractGuiTest
docking.test.AbstractDockingTest
ghidra.test.AbstractGhidraHeadlessIntegrationTest
ghidra.test.AbstractGhidraHeadedIntegrationTest
- Direct Known Subclasses:
AbstractProgramBasedTest
,AbstractScreenShotGenerator
public abstract class AbstractGhidraHeadedIntegrationTest
extends AbstractGhidraHeadlessIntegrationTest
-
Nested Class Summary
Nested classes/interfaces inherited from class generic.test.AbstractGuiTest
AbstractGuiTest.ExceptionHandlingRunner
-
Field Summary
Fields inherited from class ghidra.test.AbstractGhidraHeadlessIntegrationTest
PROJECT_NAME
Fields inherited from class generic.test.AbstractGenericTest
concurrentTestExceptionRule, DEFAULT_TEST_TOOL_NAME, DEFAULT_TOOL_NAME, repeatedRule, ruleChain, TESTDATA_DIRECTORY_NAME, watchman
Fields inherited from class generic.test.AbstractGTest
BATCH_MODE, DEFAULT_WAIT_DELAY, DEFAULT_WAIT_TIMEOUT, DEFAULT_WINDOW_TIMEOUT, PARALLEL_MODE, PRIVATE_LONG_WAIT_TIMEOUT, testName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Plugin>
TaddPlugin
(PluginTool tool, Class<T> c) Adds the given plugin to the tool and then returns the instance of the plugin that was addedprotected void
click
(FieldPanel fp, int clickCount, boolean wait) protected void
click
(FieldPanel fp, Point p, int clickCount, boolean wait) void
click
(ghidra.app.plugin.core.codebrowser.AbstractCodeBrowserPlugin<?> codeBrowser, int clickCount) Triggers a browser click at the current cursor location.void
click
(ghidra.app.plugin.core.codebrowser.AbstractCodeBrowserPlugin<?> codeBrowser, int clickCount, boolean wait) protected ApplicationConfiguration
protected ApplicationLayout
static DockingActionIf
static Plugin
getPluginByName
(PluginTool tool, String pluginName) static PluginTool
saveTool
(Project project, PluginTool tool) Save the given tool to the project tool chest.static DialogComponentProvider
showDialogWithoutBlocking
(PluginTool tool, DialogComponentProvider provider) Shows the given DialogComponentProvider using the given tool'sAbstractDockingTool.showDialog(DialogComponentProvider)
method.static PluginTool
showTool
(PluginTool tool) static void
waitForBusyTool
(PluginTool tool) Waits for the tool to finish executing commands and tasksstatic void
waitForProgram
(Program program) Flushes the given program's events before waiting for the swing update managerMethods inherited from class ghidra.test.AbstractGhidraHeadlessIntegrationTest
applyCmd, cleanDbTestDir, clearSelection, createDefaultProgram, createDefaultProgram, debugProgramInTool, deleteProject, getLanguageCompilerSpecPair, getLanguageService, getPlugin, getSLEIGH_8051_LANGUAGE, getSLEIGH_X86_64_LANGUAGE, getSLEIGH_X86_LANGUAGE, getUniqueSymbol, getUniqueSymbol, getZ80_LANGUAGE, goTo, goTo, initializeSystemProperties, makeSelection, makeSelection, makeSelection, makeSelection, modifyProgram, modifyProgram, redo, redo, redo, replaceService, toAddressSet, toAddressSet, toAddressSet, toAddressSet, tx, tx, undo, undo, undo, undo, waitForScriptCompletion
Methods inherited from class docking.test.AbstractDockingTest
assertEnabled, assertIconsEqual, assertToggleButtonSelected, capture, clickComponentProvider, clickComponentProvider, close, close, closeAllWindows, closeAllWindows, closeAllWindowsAndFrames, closeProvider, closeSaveChangesDialog, createContext, createContext, createRenderedImage, createScreenImage, disposeErrorGUI, dockingSetUp, dockingTearDown, expandPath, expandTree, findButtonByActionName, findButtonByIcon, findButtonByName, findButtonByText, findComponent, findComponentByName, getAction, getAction, getAction, getActionsByName, getActionsByOwner, getActionsByOwnerAndName, getClipboardText, getComponentProvider, getDialogComponent, getDialogComponentProvider, getDockableComponent, getLocalAction, getMessageText, getNode, getOpenWindowsAsString, getStatusText, getTitleForWindow, getURL, getWindow, getWindowByTitle, getWindowByTitleContaining, getWindows, isEnabled, isEnabled, isEnabled, isSelected, isUseErrorGUI, performAction, performAction, performAction, performAction, performDialogAction, pressButtonByText, pressButtonByText, printOpenWindows, selectPath, selectTabIfAvailable, setErrorGUIEnabled, setToggleActionSelected, setToggleActionSelected, setToggleButtonSelected, setToggleButtonSelected, showProvider, triggerActionKey, triggerActionKey, triggerBackspaceKey, triggerEnter, triggerEscapeKey, triggerKey, triggerKey, triggerKey, triggerText, triggerText, waitForComponentProvider, waitForComponentProvider, waitForComponentProvider, waitForDialogComponent, waitForDialogComponent, waitForDialogComponent, waitForErrorDialog, waitForInfoDialog, waitForJDialog, waitForJDialog, waitForTableModel, waitForTree, waitForUpdateOnChooser, waitForWindow, waitForWindow, waitForWindow, waitForWindowByName, waitForWindowByTitleContaining, writeImage, writeImage
Methods inherited from class generic.test.AbstractGuiTest
assertColorsEqual, clickListRange, clickMouse, clickMouse, clickTableCell, clickTableRange, doubleClick, dragMouse, editCell, executeOnSwingWithoutBlocking, findAbstractButtonByName, findAbstractButtonByText, findButtonByIcon, findButtonByName, findButtonByText, findComponent, findComponent, findComponentByName, findComponentByName, findComponents, findComponents, findOwnedWindows, findPathToText, findTreePathToText, fixupGUI, getAllWindows, getRenderedTableCellValue, getSwing, getText, leftClick, middleClick, moveMouse, postEvent, pressButton, pressButton, pressButtonByName, pressButtonByName, pressButtonByText, pressButtonByText, printMemory, privatewaitForSwing_SwingSafe, rightClick, runSwing, runSwing, runSwing, runSwingLater, runSwingWithException, setComboBoxSelection, setText, waitForPostedSwingRunnables, waitForSwing, waitForTasks, waitForTasks, yieldToSwing
Methods inherited from class generic.test.AbstractGenericTest
createStackTraceForAllThreads, createTempDirectory, createTempFile, createTempFile, createTempFileForTest, createTempFileForTest, createTempFilePath, createTempFilePath, deleteMatchingTempFiles, deleteSimilarTempFiles, findTestDataFile, getDebugFileDirectory, getFontMetrics, getInstanceField, getInstanceFieldByClassType, getTestDataDir, getTestDataDirectory, getTestDataFile, hasTestFailed, initializeLayout, invokeConstructor, invokeInstanceMethod, invokeInstanceMethod, loadTextResource, loadTextResource, resetLogging, setErrorsExpected, setInstanceField, setLogLevel, setLogLevel, testFailed, toString, windowForComponent
Methods inherited from class generic.test.AbstractGTest
assertArraysEqualOrdered, assertArraysEqualUnordered, assertArraysEqualUnordered, assertContainsExactly, assertContainsExactly, assertContainsString, assertContainsStringIgnoringCase, assertListEqualOrdered, assertListEqualOrdered, assertListEqualsArrayOrdered, assertListEqualsArrayUnordered, assertListEqualUnordered, bytes, failWithException, getName, getRandomInt, getRandomInt, getRandomString, getRandomString, getTestDirectoryPath, sleep, waitFor, waitFor, waitFor, waitFor, waitFor, waitForCondition, waitForCondition, waitForCondition, waitForConditionWithoutFailing, waitForValue, waitForValueWithoutFailing
-
Constructor Details
-
AbstractGhidraHeadedIntegrationTest
public AbstractGhidraHeadedIntegrationTest()
-
-
Method Details
-
createApplicationLayout
- Overrides:
createApplicationLayout
in classAbstractGhidraHeadlessIntegrationTest
- Throws:
IOException
-
createApplicationConfiguration
- Overrides:
createApplicationConfiguration
in classAbstractGhidraHeadlessIntegrationTest
-
waitForProgram
Flushes the given program's events before waiting for the swing update manager- Parameters:
program
- The program whose events will be flushed; may be null
-
addPlugin
Adds the given plugin to the tool and then returns the instance of the plugin that was added- Parameters:
tool
- the toolc
- the class of the plugin to add- Returns:
- the newly added plugin
- Throws:
PluginException
- if the plugin could not be constructed, or there was problem executing its init() method, or if a plugin of this class already exists in the tool
-
getPluginByName
-
showTool
-
showDialogWithoutBlocking
public static DialogComponentProvider showDialogWithoutBlocking(PluginTool tool, DialogComponentProvider provider) Shows the given DialogComponentProvider using the given tool'sAbstractDockingTool.showDialog(DialogComponentProvider)
method.- Parameters:
tool
- The tool used to show the given provider.provider
- The DialogComponentProvider to show.- Returns:
- The provider once it has been shown, or null if the provider is not shown within the given maximum wait time.
-
waitForBusyTool
Waits for the tool to finish executing commands and tasks- Parameters:
tool
- the tool- Throws:
junit.framework.AssertionFailedError
- if the tool does not finish work within a reasonable limit
-
getAction
-
saveTool
Save the given tool to the project tool chest. If the tool already exists, then it will be overwritten with the given tool.- Parameters:
project
- The project which with the tool is associated.tool
- The tool to be saved- Returns:
- the new tool
-
click
public void click(ghidra.app.plugin.core.codebrowser.AbstractCodeBrowserPlugin<?> codeBrowser, int clickCount) Triggers a browser click at the current cursor location. Thus, this method should be called only after the browser location is set the the desired field.- Parameters:
codeBrowser
- the CodeBrowserPluginclickCount
- the click count
-
click
public void click(ghidra.app.plugin.core.codebrowser.AbstractCodeBrowserPlugin<?> codeBrowser, int clickCount, boolean wait) -
click
-
click
-