Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Workbench Asset Export and Import Improvements

Micro Focus Contributor
Micro Focus Contributor
0 0 552

Asset export and import has been a staple of Silk Test Workbench. It allows users to export assets from one database and import them for use in another database.  This process has worked well but customers have experienced issues where assets cannot be exported or imported due to increases in the amount of data that can be stored for individual assets.

Background

Previous versions of Silk Test Workbench offered a variety of options to export assets (single file, multiple files, multiple files in folders). Whatever method was selected the target was an XML file that contains an individual asset or an XML file that contained multiple assets.
For assets such as .NET scripts, Object Maps, Image Verifications, Image Assets, ActiveData, these XML files are typically reasonably sized and could be exported and imported successfully. However, for assets such as Visual tests and Results, file sizes can easily explode as these assets contain screen shots and control enumeration data to allow for offline editing. Additionally, Result assets can become very large as they can encompass the output of multiple scripts, for example driver scripts calling other child scripts.

Customers could overcome some of these issues by exporting assets to individual files, however this has the side effect of consuming much more disk space as screen shots were duplicated across multiple files.

New export file format

To address these issues we had to come up with something that would scale when users have large assets and many of them.

We wanted to stick with the XML file format because it met the requirement of representing the data that formed the asset, but we needed to change how we handled these XML files.

Here are some of the decisions we made:

  • Screen shots and enumerations should be held separately to the asset data XML for Visual tests and Results.
  • Exporting would be to a single ZIP file.
  • Exporting will always succeed regardless of the number of assets and their size.
  • Importing must always be able to import any number of assets regardless of their size.

From a user perspective, the main change is that instead of the ultimate target of an export being an individual XML file (or multiple files), the target is a ZIP file.

  • The ZIP file will be compressed taking up less disk space.
  • When multiple versions of an asset are exported, screen shots that are shared are only stored once, saving disk space.
  • An exported Result asset is stored in a manner that will guarantee that it will import successfully.
  • The user only has a single file to deal with.
  • The user interface and command line programs have been simplified.

Changes to the Export Wizard

Starting the export process has not changed and the first three pages have stayed the same, i.e. Welcome Page, What to Export, and Items to Export.

If you are coming from Silk Test Workbench prior to version 18.5, you will notice a difference on the page where you decide where the exported assets will be saved.

Figure 1: Where to store the data page prior to version 18.5. Multiple export location options are presented.  It is unclear what option is best for the user.

 

Figure 2: Where to store the data, 18.5 and beyond.  This shows the current version of this page, where the user is asked to provide the name of the ZIP file that will be created.

The remaining pages of the Wizard just show the name of the ZIP file instead of the name (or names) of the XML files.

Figure 3: Start Exporting Assets page. The Export Location shows the name of the ZIP file.

Figure 4: Export Progress shows the ZIP filename as the Location.

Figure 5: Export Wizard Complete, the summary shows the location of the ZIP file that was created along with the names of the assets that the file contains.

 

Changes to the Import Wizard

The Import Wizard has also been updated to cater for the new file format and the fact that there is only one option available when importing assets; the goal was to make the import process similar to the previous versions.

The page that is used to select where the exported assets are located has changed to only allow the user to select a single ZIP file. Figure 6 and Figure 7 show the previous and current versions of this page.

The advantage of the new scheme is that the user does not need to know how the original files were exported, because there is only one method available.

Figure 6: Import File Name or Directory page prior to 18.5. The user needs to know how the files were exported.

Figure 7: Import File Name page, 18.5 and beyond. This only has a single option to specify the name of the ZIP file.

Figure 8: Import Progress page shows the Location as the ZIP file.

Figure 9: Import Wizard Complete page shows the Import Location as the name of the ZIP file.

Changes to the command line

STWExport.exe

The parameters medianame and mediatype have been removed and replaced with exportfile, which is the name of the ZIP file to create. Note that if the file exists, it will not be overwritten; an error message will be displayed and the export process stops.

STWImport.exe

The parameters medianame and mediatype have been removed and replaced with importfile, which is the name of the ZIP file.

Importing Old XML Files

To import XML files created by versions of Silk Test Workbench prior to 18.5 must be converted to the new ZIP file format. A new new command line program named STWConvertExportedXml.exe has been created that will perform the conversion.

If you type STWConvertExportedXml.exe at the command prompt (with no parameters) it will show its usage, for example:

STWConvertExportedXml.exe
Copyright (C) Micro Focus 2014-2018. All rights reserved.
Usage: STWConvertExportedXml  [-overwrite]  path_to_old_export  path_to_new_export.zip

Parameters:

path_to_old_export is either the name of an XML file or the name of a folder containing XML files. If a folder name is specified the program will traverse all files in that folder and all sub-folders.

path_to_new_export.zip is the name of the ZIP file that will be created. If you specify just the filename the ZIP file will be created in the current folder. You can also specify a folder and filename if you wish.

-overwrite is an optional parameter that will overwrite the ZIP file if it already exists. If you do not specify this parameter and the ZIP file exists the program terminates and nothing is created.

Examples:

Convert XML files in the folder named E:\ExportFiles and all its child folders and create a new ZIP file in E:\NewFiles\MyExport.zip.

E:\> STWConvertExportedXml.exe E:\ExportFiles E:\NewFiles\MyExport.zip

Convert the XML file LargeExportFile.xml and create a ZIP file named LargeExportFile.zip, because no folder names were specified the program assumes the XML file is in E:\ and the ZIP file will be created in E:\.

E:\> STWConvertExportedXml.exe LargeExportFile.xml  LargeExportFile.zip

Conclusion

The changes to the export and import mechanisms greatly improve the usability of the feature, ensuring that exported assets can always be imported.  The conversion program ensures that existing exported assets can still be imported.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.