Technology Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 

The challenge


Selective data transfer (SDT) allows to migrate test cases in "Test Steps" format from Solution Manager 7.2 to CLoud ALM.
However, if your test cases in Solution Manager happen to be document based (for example word/excel) SDT will only convert them to "test documents" in Cloud ALM, but they will not be available as actual test cases. 
This is an issue because all the test management functionality in Cloud ALM only works with native Cloud ALM test cases, but not with documents. For example only a native Cloud ALM test case an be added to a test plan and executed.  This article outlines an approach how to still bring document based test cases to CALM.


Solution part 1 of 3: Downloading test documents from Solution Manager 7.2

First of all:
If you happen to have your test case documents available outside of solution manager (on a network drive or sharepoint), you are in luck, because you can skip this step.
In case you don't, follow the steps below:

  1. In Solution Manager 7.2, go to Solution Documentation. Be sure to have the correct solution and branch selected and navigate to the (hierarchically lowest)  folder containing all test documents to be downloaded. Probably your test documents will be spread out across several scenarios and processes, so that folder will likely be " Business processes".

  2. Switch from "Browser" view to "List" view. While browser view only displays documents assigned to the current folder, list view will include documents assigned to all subfolders - so we don't have to navigate to and download each folder separately.
    TSTOFFELS_7-1784653635193.png

  3. In List view, filter the displayed documents by type to display only type "Test document".  
    TSTOFFELS_8-1784653779043.png

  4. Click the top check box to select all displayed documents. Next, right click one of the selected documents and select from the context menu "Document download (only originals)".  This will attempt to download a .sap file to your frontend. 
    TSTOFFELS_9-1784653952776.png  TSTOFFELS_4-1784564459508.png

  5. Opening the file will prompt for a download directory on your local computer. Once selected you may be prompted an additional 2 times for permissions to write to that folder and to execute an ABAP report on Solution Manager. Provided these permissions are given, the selected test documents should be downloaded to the selected folder:TSTOFFELS_5-1784564513525.png TSTOFFELS_6-1784564569681.png TSTOFFELS_10-1784654248037.png

Solution part 2 of 3: Transforming test documents to Cloud ALM test cases using a coding agent

The complexity of this part will vary depending on how uniform the test documents are in terms of file type and formatting (the more variety, the more complex the task / the  prompt will be). In this example we use excel test cases with a rather uniform formatting and employ claude code as a tool to 

  • read all downloaded excel test documents from an "input" folder
  • convert them to the Cloud ALM upload excel format (specified by example Cloud ALM test cases in a "template" folder) with a specific column mapping.
  • save them (the CLoud ALM test cases)  all in 1 file (in the "output" folder) - so we can upload all test cases to Cloud ALM in one go.

Probably other tools like windsurf or codex will work just as well. What's important is their ability to access and make changes to the local file system.  For this example the below prompt was used:

---
In the current folder you will find:
- a folder "input", containing the excel test cases to be converted. 1 excel file is 1 test case.
- a folder "template" containing the format to convert into. This format supports multiple test cases in 1 excel file.

The target format has a 3-tier hierarchy: a test Case contains one or more actions.
An Action consists of 1 or more activities. Each activity has a title, an instruction and an expected result.
There may be more columns in the target format.

Convert all test cases in "input" to the format found in "template" and put them all into the same excel file. Save that file (the converted test cases) to the "output" folder as (named like a timestamp): "YYYYMMDD_hhmm.xlsx".

Column mapping (template column <-- input column):
Test Case Name <-- Sequence
Activity Title <-- Description
Action Title <-- No. Sequence, Name (if Name is empty, use Description instead)
Action Instruction <-- Node Text
Action Expected Result <-- Document No
Test Case Status = "Prepared" (fixed, for each test case)

If Action Title, Action Instruction or Action Expected Result are empty, enter "-".
Work autonomously and do not ask for any confirmations or permissions.
---

TSTOFFELS_0-1784711154413.png

 

 

Before continuing:
Being the responsible "humans in the loop", that we are, we of course check whether what the AI created still resembles a test case and that no relevant information has been lost. I recommend to at least check one or two examples for each file type and document format.

 

Solution part 3 of 3: Uploading converted test cases to Cloud ALM

Before upload the test cases to Cloud ALM, it's recommended to create a single purpose scope to use for the upload, especially if you already have test cases in Cloud ALM. Why that? We will specify that scope when uploading (at least for the first time), so all uploaded test cases get assigned to that scope. If  we find that something wrong with the test cases in Cloud ALM post upload, we can simply select all uploaded test cases by that scope, delete them and start another attempt.
A scope can be created in Cloud ALM under Implementation --> Projects and Setup --> <Your project> --> Scopes:

TSTOFFELS_0-1784572464886.png

Just create the simplest version of a scope with just a title - don't select any solution processes.
The test case upload can now be performed from Cloud ALM's "Test Preparation" app, and is initiated through the upload button:

TSTOFFELS_5-1784651985468.png

 

 

 

 

 

1 Comment
Labels in this area