Thursday, 17 August 2017

SAP Test Acceleration and Optimization (TAO)

SAP Testing TAO:

What is SAP TAO?
SAP TAO (Test Acceleration and Optimization) is an application that facilitates test automations by generating draft test cases and components for various transactions in SAP system.The tester can customise the generated test cases using SAP TAO and SAP Quality Center. As SAP TAO can be integrated with SAP Solution Manager,SAP TAO can easily identify and generate test cases. Test components created like this are normally for the single transactions and can be later used to create test scenarios.

What are the key features of SAP TAO?

  • Supports flexible reuse of test cases and data.
  • Easy to maintain test-cases because of the change, in case of any functional change in the system.
  • Can be easily integrated with various tools to create automated test-cases

What are the common tools which SAP TAO integrates with?

  • SAP Solution Manager (Solman).
  • HP Quality Center QC.
  • HP Quality Test Professional QTP.


SAP TAO 2.0:-
SAP TAO 2.0 is used to create automatic test-cases and components from the screens of a transaction and parameterize them during Regression testing of a system.These test components are created normally for one transaction code and later they can be combined to test scenarios. It can be easily integrated with the Business Process Change Analyzer in SAP Solution Manager. Itcomes with different Service pack SP 02, SP 04, and SP 06.

SAP TAO performs the following tasks in SAP Testing Lifecycle:

  • Test Cases creation
  • Regeneration of affected components
  • Test Cases Consolidation
  • Test Execution

How is SAP TAO Process Architecture?
SAP TAO Process Architecture

Steps:

  • Generate the requirements for SAP Testing and understanding the functionality of SAP modules
  • Get the information from the requirement analysis to generate the Test components.
  • Generate test-cases and components using SAP TAO tool.
  • Document the test results and update the analysis with test results.

What are the prerequisites for installing SAP TAO?
Visit http://service.sap.com and download the correct versions of SAP Solution Manager Solman Compatibility Matrix, Quality Center, and SAP TAO. Go to Test Management and Additional Information > Test Management to find the compatible components supported by SAP TAO.

  • SAP Solution Manager
  • ST-PI 
  • ST-A/PI on systems under test of type CRM.

Ensure that the systems on which testing has to be done are connected to SOLMAN for SAP Solution Manager Configuration work center

What are the prerequisites on local computer of SAP TAO Client?

  • 4 GB RAM
  • 500MB free disk space
  • LAN connection to SAP Quality Center QC server and SOLMAN
  • Administration Rights
  • SAPGUI with the latest patch level
  • Microsoft Excel 97 or higher
  • Microsoft Internet Explorer for CRM UI support

Create your first SAP Testing Cases

SAP Testing Cases

What is the relevance of SAP test cases?
SAP test-cases are performed to check if the installation and configuration of the SAP system, any new implementation, multi-language and device testing, intranet testing, real-time testing, etc are performing correctly. Since the ERP system is a common centralized system used by multiple users simultaneously in real time, it is important to write the test-cases carefully. Test data should be passed carefully and each test should have a column with name output data.

Example:
Test Case ID − XYZ_ERP_SD_A20301
Module − SAP Sales & Distribution SD

Let us check the transaction VA01 to create a sales order in the Sales and Distribution (SD) system.

Input the following:
  • Order Date
  • Order Type
  • Expiry Date
  • Customer ID
  • Shipping Id, Shipping Details, etc


Once you enter the details, press Enter and add all the details in the Sales Order.


To create a SAP test-case, you can pass input data (correct and Incorrect and see the outcome):-

Correct Input Data:
  • Order Date 01/01/2016, Order Type Sales Order
  • Expiry Date 15/01/2016, Shipping Date 10/01/2016,
  • Select Payment Due Date 10/01/2015, Item Qty 10, etc.
Incorrect Input Data:
  • Order Date 01/01/2017, Order Type Sales Order
  • Expiry Date 15/01/2017, Shipping Date 10/01/2017,
  • Select Payment Due Date 10/01/2017, Item Qty 0, etc.
Output Data - With Correct Data:
  • Order is successfully saved in SAP module and invoiced.
  • Next is Packing slip number.
  • Next is Shipping Order number, etc.
Output Data - With incorrect Data:
  • Error message for incorrect data input. Text message for incorrect input data should be defined in the system.
Expected Output:
  • Sales Order#
  • Sales Invoice#
  • Packing List#, etc.

SAP Testing Interfaces - SAP Testing Tutorial

SAP Testing Interfaces

What is an interface?
An Interface in an ERP system is a tool to transfer data between systems. For example, say there is a program that produces a report in XML format. Then this program reads the XML file to provide input to another system. You may manipulate while passing the information from one system to other.

Ex:
Consider a vendor tool that takes care of employee attendance. The system interface will take this information and populate it in the SAP HR system. Interface testing ensures that this job is running successfully. It ensures that the data is transferred completely and there is no error while transferring the data to the SAP HR system.

SAP Interface Testing:
SAP Interface testing is purely dependent on the operations and organizational processes. The following points are to be considered while performing SAP Interface Testing:
  • Understand the purpose of using SAP Interface and the business scenarios which are processed by the interface
  • Check if the Interface is processing all business scenarios accurately as per the test strategy.
  • To perform Interface testing, the best practice is to start with performing Unit testing.
  • Check if the outbound interface is performing well. Ensure the file meeting specifications in terms of layout, etc are performed.
  • Check if the inbound interface is running well. Ensure that the file is read correctly and performs the correct steps in the target system.

SAP Testing Modules

SAP Testing Modules Types


What are the common SAP modules implemented in an organization ?

Financial Modules:
  • Finance Accounting and Controlling (FICO)
  • Treasure (TR), and Enterprise Control (EC).
Logistics Modules:
  • Material Management (MM)
  • Plant Maintenance (PM)
  • Sales and Distribution (SD)
  • Quality Management (QM)
Human Resource Management:
  • Accounting Payroll
  • Time Management
  • Training and Event Management.
The modules are inter-dependent and the functionality of one module affects the functionality of other modules.
Here is an example. Let us see a case of creating a Sales Order in Sales and Distribution (SD) module. First step is to enter the transaction code(e.g., Transaction Code VA01). Then check the stock of the item in Inventory module and check the credit limit available on Customer profile in Customer Relationship Module. This shows the interdependency of all these modules. The customisation of any of these modules will affect the related ERP system.

It is important to understand the features, functionalities and workflow of SAP modules to perform SAP testing effectively. Proper understanding can avoid the failure of ERP implementation project as incorrect test planning and the use of wrong test-cases are found to be the most common reason. It is also important to the functionality of complete systems as non SAP ERP systems like PeopleSoft, Edwards, Oracle E business suite have different customers and capabilities.

What are the different types of testing team?
There are normally two types of testers available in SAP projects:
Core Testers: who are responsible to perform basic testing of ERP system and modules.

Implementation Testers: who work on implementation project and cover the customization functionalities of SAP modules.

The testing team should record each customization request received from the customer and its impact on the other SAP modules.

Which testing method is recommended for ERP systems?
Automation testing is the ideal testing method for ERP systems considering the size of the systems. Manual testing is time-consuming and lengthy process. Since accuracy and effectiveness cannot be guaranteed without testing each component of the SAP system, automation testing is preferred for successful implementation of SAP project.


Example - SAP testing using QTP

Let us recall the example used above. To perform SAP testing QTP,
  • Install HP QTP tool and necessary plug-ins within QTP to make it compatible to connect to ERP system.
  • Using HP Quality Center (QC), develop the test plan and convert it into Test Scripts using HP QTP.
  • Record the R/3 GUI screen of SAP system for SD module while creating Sales Order or creating PR in MM.
  • Create a script in VB.
SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access - User")
 .SAPGuiOKCode("OKCode").Set "/nVA01"
SAPGuiSession("Session").SAPGuiWindow("SAP Easy Access - User"). SendKey ENTER

​Feel free to experiment with different parameters and customizations.

SAP Testing Screen Flow Logic

SAP Testing Screen Flow

What is the Screen flow logic in SAP testing?
Screen flow logic in SAP Testing can be compared to an ABAP program that holds the processing blocks. It contains the procedural part of the screen. It is created in screen painter and is similar to an ABAP editor. Screen flow logic involves no external data declaration and each processing block is defined with a prefix ‘PROCESS’. For example,
  • PROCESS AFTER INPUT
  • PROCESS BEFORE OUTPUT
  • PROCESS ON HELP-REQUEST
  • PROCESS ON VALUE-REQUEST
Each screen flow logic should contain appropriate keywords like PROCESS AFTER INPUT and PROCESS BEFORE OUTPUT.
The following are the keywords which can be used with the event blocks:
S.No.Screen keyword & Description
1
MODULE
Calls a dialog module in an ABAP program
2
FIELD
Specifies the point at which the contents of a screen field should be transported
3
ON
Used in conjuction with FIELD
4
VALUES
Used in conjunction with FIELD
5
CHAIN
Starts a processing chain.
6
ENDCHAIN
Ends a processing chain.
7
CALL
Calls a subscreen.
8
LOOP
Starts processing a screen table.
9
ENDLOOP
Ends processing a screen table.

How to create the Screen Flow
Screen Flow Logic is created in the Flow Logic Editor of the Screen Painter. Double click the name of a screen and it will display the flow logic of the screen from the Repository Browser. The Flow Logic Editor of the Screen Painter will open up and you edit the screen flow logic. You can use any of the available ABAP source code editors to define the flow logic.
The following keywords can be used to create the screen flow logic −
S.No.Keyword and description
1
CALL
Calls a subscreen.
2
CHAIN
Starts a processing chain.
3
ENDCHAIN
Ends a processing chain.
4
ENDLOOP
Ends loop processing.
5
FIELD
Refers to a field. Can be combined with the keywords MODULE and SELECT.
6
LOOP
Starts loop processing.
7
MODIFY
Modifies a table.
8
MODULE
Identifies a processing module.
9
ON
Used with FIELD assignments.
10
PROCESS
Defines a processing event.
11
SELECT
Checks an entry in a table.
What are testing screens?
This procedure is used to test the appearance of a screen as it will appear at runtime. If you have already programmed the flow logic, you can choose whether to simulate the screen with or without it.
Procedure to perform Screen test
  • Select Screen and then, Test. Now you can see a dialog box for the runtime simulation.
  • Change the window coordinates, if required.
  • Define the scope of simulation.
  • Select 'Complete Flow Logic' to include the flow logic in the simulation.
  • Click Continue to see the screen simulation.

SAP Testing Navigation

SAP Testing Navigation Methods


What is the role of SAP testing navigation?
SAP testing navigation ensures that you cover each module of your SAP system and perform at least one test for each functionality. It also reduces the manual testing effort and covers most of the testing paths in a SAP system.
OPA tests can be performed to check SAP Testing Navigation. OPA is known as Open Source Programming language and it is mostly used for developing web applications. For compilation of OPA program, you can use Node.js on the server and JavaScript on the client side.

How to create a test using OPA?
OPA allows you to use three objects in Qunit. These functions should be defined in a test so that OPA knows what actions to be taken.

  • Given − to pass arrangements.
  • When − actions to be taken.
  • Then − assertion.

Example
The following example shows how to use all the 3 objects in Qunit:
jQuery.sap.require("sap.ui.test.Opa");
jQuery.sap.require("sap.ui.test.opaQunit");
opaTest("press a Button", function (Given, When, Then) {
 // Arrangements
 Given.iStartMyApp();
 //Actions
 When.iPressOnTheButton();
 // Assertions
 Then.theButtonShouldHaveADifferentText();
}

The next step is to define the three functions.

How to define the Functions
var arrangements = new sap.ui.test.Opa ({
 iStartMyApp : function (){
   return this.iStartMyAppInAFrame("../index.html");
 }
});

In the above function, we have assumed that the app runs in a page called index.html. Our OPA test is located in the test/opa.html folder.

How to define Arrangements
var actions = new sap.ui.test.Opa ({
 iPressOnTheButton : function (){
   return this.waitFor ({
    viewName : "Main", id : "pressMeButton", success : function (oButton) {
      oButton.$().trigger("tap");
    },
    errorMessage : "No Button found"
   });
 }
})

How to define Assertions
var assertions = new sap.ui.test.Opa ({
 theButtonShouldHaveADifferentText : function () {
   return this.waitFor ({
    viewName : "Main",
    id : "pressMeButton",
    matchers : new sap.ui.test.matchers.PropertyStrictEquals ({
      name : "text",
      value : "got pressed"
    }),
    success : function (oButton) {
      Opa.assert.ok(true, "The button's text changed to: " + oButton.getText());
    },
    errorMessage : "No change in Button's text"
   )}
 }
})  

How to run the OPA test
sap.ui.test.Opa.extendConfig ({
 arrangements : arrangements,
 actions : actions,
 assertions : assertions,
 viewNamespace : "view."
});

SAP Testing Process - SAP Testing Tutorial

SAP Testing Process

What are the different phases of SAP testing process?
  • Test Planning
  • Test System setup
  • Test Execution and evaluation
What are the steps involved in test planning?
Test planning includes the steps that are involved in the initial phase of testing:
  • Gathering the requirement. What needs to be tested? Functional requirements to be collected for system and application testing.
  • Test-case development for manual and automation testing. In automation testing, various tools can be used for creating test-cases.
  • Reviewing the test-cases.
What are the steps involved in test system setup?
Test system setup involves setting up the test environment to run the test-cases. Here, the tester needs to define key metrics for reporting.

What are the steps involved in test execution and evaluation?
Test execution and evaluation involves executing the test-cases and noting down the output.
It includes the following activities:
=> Defect handling and reporting.
=> Assessment of Test plans as per result.
=> Documentation of all defects and compare the results with key metrics.

SAP Testing – Critical Process
In SAP system testing, you need to identify critical business processes that will be affected by implementing changes in a SAP system. It mostly comes under Regression testing, where you apply a patch or implement a new system.
The first step before applying these changes is to perform change impact analysis. This covers critical processes that will be affected by implementing the change.


Example:
Suppose the planned changes are as follows:
1. Planned changes
SAP support pack 7
Custom code
SAP enhance package

2. System effected
Sales Order
Delivery of goods
Payment method

3. Impact Analysis for Critical Processes
Here, the following activities are to be carried out in Impact Analysis:
  • Identification of the critical business processes impacted by change implementation.
  • Business justification to be provided as to why this change has to be implemented.
  • Creating the test plan to monitor critical processes for SAP testing while performing the change.
  • Evaluation of impact of change on critical processes and the purpose to implement the change.