Search This Blog

Sunday, 6 September 2015

Recording a Test Script Using Component-Based Test Automation

Recording a Test Script Using Component-Based Test Automation


To record transactions in SAP GUI or CRM Web UI systems and create automated test cases, you can use SAP Component-Based Test Automation.
You can create tests and components from the screens of a transaction, and parameterize them. These tests are for a single transaction and can be combined into a scenario test. You maintain the components in the Test Composition Environment.

Procedure

  1. Under Test Repository, choose the Test Scripts subview.
  2. Choose Create.
    A dialog box appears.
  3. Select CBTA as test tool and enter data as required.
  4. Specify the title, application component and system under test.
  5. Save your entries.
  6. Choose Start CBTA.
    A dialog box appears.
  7. Connect to the system under test.
    The Test Creation Wizard is started.
  8. Enter an analysis name. The recording is stored under this name and can later be used to generate another test script.
  9. To confirm, Choose Next.
    The executable is started. The Test Creation Wizard is in recording mode.
  10. Perform the business process.
  11. Optional: To add a checkpoint, in the Test Creation Wizard choose Add Checkpoint.
  12. To stop the recording, in the Test Creation Wizard choose Stop the PFA.
  13. Choose Next.
    The structure of the process flow is displayed.
  14. Verify that the business process is correctly and completely recorded, and choose Next to confirm.
  15. To create the test, select End the analysis and create the test, and choose Next to confirm.
    To cancel the recording, select End the recording without creating a test.
    The test components are uploaded to the Test Composition Environment.
  16. Choose Finish.

    Source: www.help.sap.com

Technical Bill of Materials (TBOM)

Technical Bill of Materials (TBOM)


A TBOM contains a list of all objects in an executable entity. These objects are, for example, elements of the user interface, module pools, function modules or tables.
These objects are assigned to a TBOM Enhancement. When a TBOM is created, the system creates a first TBOM enhancement which contains all objects in this initial recording. You can add any number of enhancements to a TBOM, increasing the list of relevant objects.
TBOM extensions can be generated dynamically or statically. For more information about the creation types, 

The Business Process Change Analyzer can use a TBOM to determine whether an executable entity is affected by a change (for example, by changed objects in a transport request).

Structure

Information About TBOM Enhancement
The following information is saved with every TBOM enhancement (you can view this information on the TBOMtab page in the Enhancements dialog):
  • Enhancement name
  • Enhancement type (dynamic, static, or automatic test case)
  • Logical component
  • Managed system name
  • Managed system client
  • TBOM enhancement status
  • Number of objects in the enhancement
  • Managed system product version
  • Managed system role
  • Created by and on/at
  • Name of the automatic test case by means of which the enhancement was created
The system also saves the following dates for each TBOM enhancement:
  • Creation date
  • Last change date
  • Date of last obsolescence check
These dates are used during the obsolescence check. Based on these dates, the system defines the scope of transport requests for which objects must be checked.
Information About the Objects Contained
The TBOM also contains the following information about the individual objects involved in the executable entity (you can view this information in the TBOM content display):
  • Program ID: ID of the object, for example, R3TR for complex objects such as programs and all related elements or LIMU for subobjects
  • Object type: Precise assignment of the object to a type, for example, REPS for Report Source, FUNC for functions, TABL for tables
    There are several hundred different object types.
  • Object name: Technical name of the object
Program ID, object type, and object name together uniquely identify the object.
  • Origin: Origin of the object
    • D for dynamically generated objects
    • S for statically generated objects
  • Classification type: Different object types are summarized to a classification type. The default assignment of classification types to object types is stored in the system.
    The following classification types have been predefined:
    • TABC = Table Class
    • UI = User Interface
    • TRAN = Business Transaction
    • FUNC = Business Function
    • DOKU = Technical Documentation Object
    • DDIC = Data Dictionary
    • AUTH = Authorization Object
    • CUSX = Customer Extension Points (EnhSpots)
    • MISC = other classification types
  • Classification values: Objects of classification type TABC (tables) are subdivided further using the classification value as follows:
    • A = Application table (master and transaction data)
    • C = Customizing table (entries and changes can only be performed by the customer, no SAP Import)
    • L = Table for storing temporary data (supplied blank)
    • G = Customizing table (new entries only from SAP, existing entries in the customer system are protected)
    • E = Control table (SAP and customer have own key areas)
    • S = System table (entry and changes can only be made by SAP, change = modification)
    • W = System table (content can be transported using own TR objects)
  • Package: Development class
  • Software component: Name of the application from which the object originates, for example SAP_BASIS.
  • Object type: Designation from the version database. Since reference objects are used there, the designation can deviate further from the object type mentioned earlier in some rare cases.
  • Object name: Designation from the version database. Since reference objects are used there, the designation can deviate further from the object name mentioned earlier in some rare cases.
  • Table key: When database tables are accessed, the values of the key fields used to access the tables are also entered in addition to the database tables. This enables the system the reduce the number of hits in the change impact analysis.

    Note
    Only the following table types can be accessed:
    • C = Customizing table
    • G = Customizing table
    • E = Control table
    • S = System table
    • W = System table
    Whether the system can record a key value for table access also depends on the type of access. The following access types are supported:
    • Any access covered by the SAP table buffer
    • Access for which at least one key field is specified
    The following access types are currently not supported:
    • Access with SQL statement SELECT FOR ALL ENTRIES
    • Access with range tables
    • Access with join expressions
    If the system cannot record a key value when accessing a table, the TBOM contains the table name only. In the change impact analysis, each changed entry in such tables leads to hits in all executable entities that access these tables.

Integration

The TBOM is an attribute of an executable entity in the Business Process Hierarchy (SOLAR01).
Dynamic TBOMs: In systems with kernel 620/640, the creation of dynamic TBOMs is only possible after status ST-PI 2008_01 SP03. In all other systems (kernel 46C or after 640), the creation of dynamic TBOMs is available.
Cross-system TBOMs: If an executable entity addresses other systems (e.g. by RFC), the objects in the other systems are also recorded. A separate TBOM enhancement is created for these objects per system. This function is available if all managed systems involved have a kernel status of at least 700.
Web applications: To record TBOMs for web applications, the managed systems must have a kernel status of at least 700.

Analyzing Business Processes Affected by Changes

Analyzing Business Processes Affected by Changes


You can use this analysis to check whether a process structure is affected by specific changes. You can precisely specify both the relevant parts of the process structure and the relevant changes. The result of the analysis is a list of the affected nodes in the process structure. You can use the result to create test plans to retest the affected scenarios, processes or process steps after the change.

Prerequisites

You have created TBOMs for all executable entities in your process structure.
You have ensured that the TBOMs are up-to-date. You only get correct and reliable analysis results if the TBOMs are up-to-date.
For more information about identifying errors or out-of-date TBOMs, 
You can update TBOMs in the following ways:
  • You can re-record or recalibrate TBOMs. For more information
  • You can schedule a background job. For more information, see the Customizing for   SAP Solution Manager under  Capabilities (Optional)  Business Process Change Analyzer  .
Analysis Results with Out-of-Date TBOMs
You can also run analyses with TBOMs that have the status Out-of-Date. This status is simply used to identify TBOMs that are potentially out-of-date. However, the analysis results are generally accurate. An out-of-date TBOM can only produce inaccurate analysis results in the following special cases:
  • An influence is not identified although the analyzed changes do affect objects of a program flow.
    This can occur when an object contains too few objects. New objects have been added to the program flow since the TBOM was last updated. The planned change affects only these new objects.
  • An influence is identified although the analyzed changes do not affect the program flow.
    This can occur when an object contains too many objects. Objects have been removed from the program flow since the TBOM was last updated. The planned change affects only these objects that are no longer relevant.
Both of these special cases occur very rarely since a change generally affects not only the deleted or new objects, but also older objects already contained in the out-of-date TBOM.

Procedure

  1. Expand the information area Change Impact Analysis.
  2. Under 1., select the type of analysis that you want to run. There are the following scope types:
    • Support Packages/ Support Package Stacks: This option offers a basic selection of support packages. The support packages must have been installed in the managed system using the SAP Maintenance Optimizer.
    • Enhancement Packages: This option offers a basic selection of support packages and enhancement packages. The delivery transports must have been installed in the managed system using the SAP Maintenance Optimizer.
    • Planned Activation of a Business Function: You can select business functions and check which parts of business processes will be affected, before activation. You can either select the business functions directly from the managed system or use the business function scope of a project or solution as the source. Prerequisite for the use of this function is that the managed system has at least one of the following software statuses:
      • SAP NetWeaver Enhancement Package 1: Support Package Stack 06
      • SAP NetWeaver Enhancement Package 2: Support Package Stack 02
      • SAP ERP 600 Enhancement Package 4: Support Package Stack 06
      • SAP ERP 600 Enhancement Package 5: Initial delivery
      • SAP CRM 7.0 Enhancement Package 1: Initial delivery
    • Transport Requests: You can select any transport requests from a managed system.
    • Object List: You can directly enter and analyze the objects that you are planning to change.
    • Change Transaction: You can analyze the impact of change transactions from Change Request Management.
  3. Under 2., specify the system and client in which you have or plan to make the change. If you are analyzing change transactions, select the type of change transaction here.
  4. Under 3., enter details of the change that you want to analyze (for example, the number of the transport request, the number of the change request, or the names of objects).
  5. Under 4., specify which projects or solutions you want to analyze. You can use the following parameters:
    • Project: Choose this option if you want to analyze projects only. In the Project ID field, you can restrict the projects further. If you do not specify a project ID, all projects are analyzed.
    • Solution: Choose this option if you want to analyze solutions only. In the Solution ID field, you can restrict the solutions further. If you do not specify a solution ID, all solutions are analyzed.
    • Project/Solution: Choose this option if you want to analyze both projects and solutions. In the Project ID and Solution ID fields, you can restrict the selection further. If you do not specify a project ID or solution ID, all projects and solutions are analyzed.
  6. Under 5., enter a description for the analysis.
  7. Optional: To specify additional optional parameters for the analysis, choose Details under 6.. You can use the following optional parameters:
    • Location of Test Cases: You can specify in which system you manage your test cases. You have the following options:
      • If you do not manage your test cases centrally, you can select the system role of the system in which you manage the test cases. If you manage your test cases centrally, this selection has no effect.
      • If you use partner tools to manage test cases, you can select the partner tool used. If you choose Test Organizer, the system only takes into account test cases from SAP systems.
    • Filter Options for Business Process Nodes
      • Node Type: You can restrict the nodes to be analyzed to a certain level or business process hierarchy.
      • Logical Component: You can restrict the analysis to executable entities that are assigned to a specific logical component.
      • Test Cases: You can select whether you want to analyze nodes with test cases, nodes without test cases, or all nodes.
      • Extended Parameters: If you have assigned attributes to nodes in the business process hierarchy, you can use these attributes to restrict the nodes for the change analysis. 
    • Filter Options for TBOMs
      • TBOM Item Criticality: You can specify whether you want to restrict the analysis to objects with a specific weighting.
      • TBOM Usage: You can select whether you want to use only dynamic TBOMs, only static TBOMs, or all TBOM types for the analysis.
    • Filter Options for Executable Units: You can specify further parameters to restrict the executable entities that are relevant for the analysis. You can use the following parameters:
      • Only in scope: You can use this checkbox to restrict the analysis to those nodes that are defined as In Scope in the Business Blueprint. For more information
      • You can also specify additional filter criteria for each type of executable entity.
  8. To start the analysis immediately, choose the Execute pushbutton.
  9. To start the analysis at a later time:
    1. Choose Schedule.
    2. Select the starting point and confirm your entries.
    The result ID is displayed at the top of the screen; you can find the analysis results using this ID.
  10. Refresh the results list so that you can select your analysis results.
    Scheduled analyses that have not yet been executed are also included in the results list. The scheduled start date and scheduled time of these analyses are displayed. After this time, you can access the analysis results in the same way as the other analyses.

    Source: www.help.sap.com