9.0 Importing and Exporting Components

The Import and Export module primarily works in the background any time you transfer components between the SAP TAO Client and HP Quality Server. The user interface is useful for manual maintenance activities. You may want to transfer components to:
  • Back up components on the HP Quality Server or on a hard drive.
  • Transport components from one HP Quality Server project to another, or from one server to another
  • Download components from HP Quality Center.
There is no limit to the number of components you can import or export.

Exporting Test Components


When you export a component from SAP TAO to the HP Quality Center, the component gets stored in the file that you designated in Connections.
To export components from the SAP TAO Client
1. In the SAP TAO navigation bar, click Import/Export.
2. Navigate to the directory in the SAP TAO directory.
3. Select the checkbox next to the transactions that you want to export to HP Quality Center.
4. Click Export to QC. The status bar indicates the export’s progress.
5. Check the designated folder on the HP Quality Center to make sure the Export succeeded.


Importing Test Components
When you import a component from the HP Quality Center, you can store the component in any location for
which you have permission.
To import components from the HP Quality Center
1. In the SAP TAO navigation bar, click Import/Export.
2. Navigate to the directory you want to import from on the HP Quality Center.
3. Click the box next to each of the components you want to transfer.
4. Click Import From QC.
5. A Browse For Folder popup opens. Browse to the folder where you want to store the components.
6. If you need to make a new folder:
a. In the Browse Window, browse to the folder or directory where you want to make a new folder.
b. Click Make New Folder. A new unnamed folder appears in the directory.
c. Enter a name for the new folder
7. Click OK.
8. Make sure that the new folder exists and that it contains the exported components.


8.0 Consolidating Test Scripts

Consolidating creates one component from the elements in your test script. The new component contains all the code and screen elements from the test script.

Consolidating Test Plans

When you save a test script in the HP Quality Center, the components are saved in a designated folder in the SAP TAO system.
To consolidate in the SAP TAO Client
1. Make sure to save the test script in the HP Quality Center.
2. Open the SAP TAO Client and click Consolidate.
3. Choose the Select a Test Plan tab.
4. Navigate to the folder where you saved your test script.
5. Select the test script you want to consolidate and click Consolidate.
6. A message at the bottom of the screen details the Consolidation progress.


Consolidating Selected Components


Use this screen when you update a component and need to propagate the update to multiple business processes.
To consolidate selected components:
1. On the Consolidate page, click the Select by Component tab.
2. In the tree view, navigate to the test component you want to consolidate.
3. Click the test component. The Business Processes that use this component appear in a table below the test component.
4. Select the business processes you want to update with the new information. Deselect a business process if you do not want to reconsolidate it.
5. Click Consolidate.

7.0 Building Test Scripts

Building your SAP application test scripts requires the HP Quality Center, a robust application that provides many test management functions.

SAP TAO components should not contain flow logic or operations that span multiple SAP screens or views. An ideal component contains a small number of operations and can function independently. An example of a SAP TAO component is entering an activity. The component definition only contains the steps required to complete the form or applet. It does not include application logic, such as clicking on the New or OK button. You can add these buttons as separate components during the script building process.

Some operations are always performed together; therefore it is makes sense to group these together in a
component. For example, whenever a user clicks a Query button, the next step requires the user to perform the
query, followed by clicking GO.


HP Quality Center buttons and actions that you use to build test scripts. Use the Test
Plan section in Business Components to build a test script. Refer to the HP Quality Center documentation for
information about other functionality.


To log on to HP Quality Center
1. On the upper right corner of the SAP TAO Client, click the HP Quality Center link to open the HP Quality Center Home Page.
2. Click HP Quality Center on the Quality Server Home Page.
3. On HP Quality Center Home Page, enter your user ID and password.
4. Click Authenticate. If you checked “Automatically log in to my last domain and project on this machine,” HP Quality Center automatically completes the fields with your domain and project and logs you in.


Building a Test Script

Use the Test Plan module in HP Quality Center to build a test script.

To build a test script
1. Navigate from Business Components to Test Plan in HP Quality Center.
2. Click Test Plan.
3. To create a new folder:

a. Click Tests.
b. Select New Folder.
c. Enter a name for the folder.
d. Click OK.

4. To create a new test:
a. Select the folder where you want to save the test.
b. Select New Test. A pop-up dialog box opens.
c. Select Business Process from the pull-down test type.
d. Enter a name for the Test.
e. Click OK. The Details tab displays your name, the test name, the creation date, and the status.

5. Click the Test Script tab to build your script. A components tree opens in the right column. Navigate to the location on the components tree where your transactions are stored.
6. Navigate to the Actions folder: Business Components/Components/SAP R3/Common Functions/Actions

a. Open the Actions folder and navigate to Initialize Script.
b. Make the first component in the test plan Initialize Script if you plan to parameterize the values in this script.
c. Initialize Script adds a link in the test script title to the Excel spreadsheet. See the next section,Parameterizing the Elements in the Test Script, for more information.

7. Use drag and drop commands, buttons, and transactions as needed to create the test.
8. Save the disk. Use the small disk icon. After you build the script, verify that you have added all the necessary elements in a logical order. Once you have verified the elements, you may parameterize elements or proceed to the next chapter to consolidate the test script.


Parameterizing the Elements in the Test Script

Parametrization allows a business component to receive data from an external source, or to return data for use in other components. You can store the parameterized elements in an Excel spreadsheet or in the HP Quality Center custom database.

SAP TAO provides an Excel spreadsheet to store parameters. The Initialization Script that you create in the HP Quality Server Test Plan specifies the name of the associated spreadsheet.

All parameters that you intend to store in the Excel spreadsheet must use the DT_ prefix. The DT_prefix parameters are useful for storing and creating variables that change from execution to execution. For example, a payroll application may include a current date that changes from week to week. By storing the parameter in an Excel spreadsheet, you can create a function to update it. SAP TAO reads the new value from the spreadsheet each time you re-execute this script.

If you parameterize a value, but do not include the DT_ prefix, the value becomes static or hard-coded. Designate a value as hard-coded when it stays the same from one execution to the next. When you hard code a value into a parameter, the HP Quality Server inserts this exact value each time it encounters this parameter in a test script.


To create a SAP TAO parameter entry
1. Open the test script that you want to parameterize.
2. Click the data value that you want to parameterize. The Components Iteration window opens.
3. Enter the value and include the DT_ prefix to the data value name.
4. Specify whether this value is output for use in another component, or whether you want to save it for reuse.
5. (Optional) You may enter an description for this value.
6. Click OK.
Follow these six steps to parameterize as many values as required.


To create a hard-coded parameter entry
1. Open the test script.
2. Click the data value that you want to parameterize. The Components Iteration window opens.
3. Enter the value.
4. Specify if this value is output for use in another component or whether you want to save it.
5. (Optional) You may enter an description for this value.
6. Click OK.