If you have imported date from Microsoft Excel, Microsoft Word, or When you customize the example import formatter, you must determine the modifications to make. This topic reviews the modifications you can make and describes the classes, interfaces, and methods to use to implement them in the Java code.
Creating a customized import formatter requires knowledge of Java programming.
You can modify the
The source type specifies the format of source data to be transformed into a Manual Tester test script. The user selects the source type information on the first page of the import wizard. Select the source type for your customized import formatter based on the existing data that you want to transform into Manual Tester scripts.
If your source data is in a format other than Microsoft Excel, Microsoft Word, or TestManager ManualTest, you must create a new source type. If your source data is in one of these formats you may be able to use the on of the source types included in Manual Tester, or you may have to create a new source type. To determine whether or not you need to create a new source type, build the example import formatter with one of the existing source types, for example, Microsoft Excel. Import some source data.
If the resulting test script does not meet your needs, for example, it does not include all of the data you wanted it import, you must create a new source type in addition to modifying the configuration page and finish action.
The configuration page must implement the IMTAImportConfigPage interface, which contains methods that add the Configuration page into the import wizard.
The configuration page is specified in the plugin.xml file, which ties it to the import formatter.
ExampleImportConfigPage in the example import formatter is a working example of a configuration page. In this example, the creation and control of GUI control widgets are in a separate class called ExampleConfigPage for clarity. You are not required to split the configuration page functionality into separate classes.
Interface and Methods | Description |
---|---|
IMTAImportConfigPage interface | |
|
Specifies the configuration page for the input wizard to work with. The configuration page caches the IWizardPage value so that it can notify the wizard when all values on the configuration page are valid. |
|
Creates the GUI control widgets that are displayed on the configuration page. |
|
Called after the Finish button is pressed. Returns the information that is passed to the finish action initialize() method. |
The import finish action must implement the IMTAImportSource interface, which specifies methods that initialize, request statements, and clean up the import operation.
The finish action is specified in the plugin.xml file, which ties it to the import formatter.
Interface and Methods | Description |
---|---|
IMTAImportSource interface | |
|
First method called in the finish action. Passes the information set in the configuration page get(ConfigSettings() to the finish action. |
|
Last method called in the finish action. Frees up allocated resources. |
|
Returns the file is being imported. |
|
Returns a Java iterator, which returns one top-level statement at a time. Each Iterator.next() call returns an IMATImportNode. |
|
Returns the last error that occurred so that it can be reported to the user. |
IMTAImportNode interface | Defines the manual test statement, which is returned by the getStatements() method. |
|
Returns the statement type, which can be one of the
following:
|
|
Returns the statement name, which is displayed in the Outline view. If this method returns null, the Outline view displays the first 32 characters of the description. |
|
Returns the statement description, which is displayed in the Editor view. This method may return null. |
|
Returns an array of strings, each of which is the full path file name of an attachment. |
|
If the statement type is block and the block has children, returns a Java iterator; otherwise returns null. Returns one statement at a time, that is, each Iterator.next() call returns an IMTAImportNode. |
|
Called after all information has been extracted. Frees up allocated resources. |
Parent topic: Creating an Import Formatter