Transfer test cases from Micro Focus ALM to SAP Solution Manager Test Steps
This Blog was created together with
Thomas Stoffels (SAP)
Inga Heimbuch (SAP)
With the Test Steps Addon, Solution Manager 7.2 now offers the capability to model individual test steps (as opposed to only modelling test cases for which a document could be uploaded). This closes a gap to Micro Focus ALM which has offered modeling test steps ever since. With both tools now sharing the same granularity, the opportunity of a smooth transfer of test assets between tool arises. While transfer of test cases for manual functional is a frequent topic in customer projects, it will be even more so with the growing adoption of Focused Build.
Focused Build offers an integrated Requirements-to-Deploy process. The decision to use Focused Build oftentimes incurs using Solution Manager 7.2’s Test Suite for functional testing.
In this article we outline how to transfer test cases from Micro Focus ALM to Solution Manager Test Steps. This encompasses exporting from ALM to Excel/CSV and then importing from Excel/CSV to Test Steps.
Export from ALM Test Plan
While there are several possible methods to export test cases, we will – for this article at least- focus on exporting from ALM’s Test Plan module by taking advantage of the Excel Report functionality offered by ALM’s Analysis Module.
Using this method, the export can be accomplished in minutes and requires virtually no coding skills or 3rd party tools. (We will assume you have access to a spreadsheet processing tool like Excel or Openoffice Calc though.) This Sample Export was performed on ALM 12.01.
- Logged on to the ALM project to export from, switch to the Dashboard Module ,navigate to Analysis View and add a new Excel Report (via the small context menu next to the “Plus” button):
When prompted, enter a name for the new Excel Report:
- With the new report highlighted, make sure the configuration à query tab is displayed and copy/paste the SQL statement below to the “Query1“ tab:
- In case you do not want to export the whole test plan of your ALM project, but rather one or several specific test cases (or folders worth of test cases), uncomment the corresponding filter lines.
For our example we will export all test cases from Test Plan Folders containing “outgoing payment within accounts receivable”: – so we adjust the where -clause as follows:
(The “%” serves as a wildcard; Search-term is treated as case-insensitive)Tip: Use the Query Builder to conveniently adjust/test your selection (The Query Builder’s “Run Statement” command will automatically limit selection to 10 rows).
- Click “Generate” and chose a location to export the Excel file to.If there is a popup complaining about the report status not being “ready” choose to proceed. (This setting can be made on the “Generation settings” Tab).
- The structure of the resulting excel will (with some formatting applied) look like this:Figure 1 Excel ViewWe are looking at 1 excel row per test step and can see that the exported content matches the content in ALM’s test plan module:Figure 2 Test Plan View
Prepare import file
The import into the test steps is normally not a problem. However, the import file must have certain characteristics:
- the encoding must be UTF-8
- columns separated by (;)
- no line breaks (CR or LF) in the lines
- no double quotation marks
In order to obtain this format, the following procedures have proven to be helpful. Depending on the Excel version, some steps can already be done in Excel or have to be modified to get the right format at the end. However, it is up to you to optimize these steps.
First, the export file should be edited in Excel.
- Since the semicolon (;) is used as a separator, existing semicolons must be replaced by other characters, e.g. the hyphen (-)
- hard line breaks in the cells must be replaced by another character. Search & Replace is best. The line break is entered in the search field in Excel using the ALT+010 (number pad on the right of the keyboard)
Now the Excel file can be saved as a CSV (delimited) (*.csv) file.
Since the file created in this way can still contain line breaks and double quotation marks and is also created in ANSI format, it is also edited with an editor, e.g. Notepad++.
- remove the line breaks (CR) by searching and replacing them with a space.
Attention: The line feed (LF) must not be replaced.
- quotation marks (“) are converted into single quotation marks (‘)
- the file is converted to UTF-8 format
The file is then saved and ready for import.
If you want the test cases to be stored in separate folders within Solution Manager Test Step Designer, they must be created in Solution Manager beforehand. Folders themselves are not mandatory but make it easier to edit many test steps in the Test Step Designer.
It has turned out that long folder names are impractical. They should therefore be shortened accordingly.
Import to SAP Solution Manager Test Steps
The FIORI app “Administration – Test Suite” is used to create the folders in Solution Manager.
Under the tab “Test Suite Extensions” there is the item “Folders for Steps Designer”.
For further processing, it is also important that the test cases have a unique Test_Name.
If you later want to assign the test cases to a process step in the library for each folder, it has proved helpful to split the import file into one subfile for each process step. This is particularly useful if a large number of test cases are assigned to a process step.
The FIORI app “Test Steps Designer” is called for importing.
The button “Upload new Test Cases from file” is used for importing.
The corresponding file is selected there.
In the second step, the columns of the file are mapped with the fields in Solution Manager.
The mapping remains active even after the import until it is locked out, so that further files can be imported after the import of a file without having to make all the settings again.
In the third step, the data is imported:
After importing, the test cases are available in the Test Steps Designer.
Assign Test Steps test cases to Solution Documentation
For assignment in the solution documentation, it makes sense to call up a corresponding process step folder in the library and search for the test cases or for all orphan test cases. If all test cases were previously assigned in the library, only the newly imported test cases are displayed. These can then be assigned to a single process step.
This allows you to very quickly import several or all test cases from ALM into Solution Manager as test steps.
The procedure shown here proves that it is possible to transfer masses of test step test cases from Micro Focus ALM into the new SAP Solution Manager world with simple means. This closes another gap in the application possibilities of SAP Solution Manager. Especially for companies that are planning to consolidate their test landscape or still have old test cases in ALM, this is a great opportunity to switch completely to SAP Solution Manager.