Testing Business Processes

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Understand the SAP S/4HANA Cloud, public edition test strategy
  • Review the functionality of the automated testing tool in SAP S/4HANA Cloud, Public Edition
  • Manage your test processes by adapting standard automates or creating custom automates
  • Assign test processes to a test plan and execute the test
  • Analyze results of post upgrade and customer-managed automated tests
  • Understand the test management functionality of SAP Cloud ALM

Test Strategy

Test Objectives

There are three key elements, namely ‘Functionality Testing’,‘Roles & Authorization Testing’, and ‘Sprint Cycle Test Planning’, each of which is explained in this interaction.

Click on each of the options to reveal an explanation.

Testing Mapped to the SAP Activate Roadmap Phases

Tests are conducted at various stages of the implementation project, with different purposes and objectives. Select the numbers 1, 2, and 3 below to learn more about Implementation Tests, End User Acceptance Tests, and Regression Tests.

Roles and Responsibilities for Testing

Click each role below to reveal the description and responsibility.

Formal vs. Informal Testing

Informal testing is not recorded or eligible for sign-off. This is often the case where test variants are likely to be so numerous that logging each would add an excessive amount of time to the task. Unit and string tests are examples of informal tests.

Formal testing refers to tests that require formal documentation of their completion status in SAP Cloud ALM. Business process tests, systems integration tests, and user acceptance tests are examples of formal tests.

Testing Activities after Go-Live

After a customer is live, a release upgrade or activation of new business processes makes it necessary to test the processes again to validate their functionality. Activating scope for a new country will require the type of unit, string, business process, integration tests and others that were completed in the Realize phase during implementation. All other testing triggered by changes to the system is considered regression testing since it requires a re-test of functionality or roles and authorization tests that were already passed. Regression testing can be completed much faster with the Test Automation Tool for SAP S/4HANA Cloud.

There are two primary types of tests managed by the Test Automation Tool and a third manual test:

TestDescription
Post-Upgrade Testing (Automated)A customer may grant SAP permission to carry out Post-Upgrade Testing (PUTs) on their behalf using the Test Automation Tool. If permission is granted and the prerequisites are completed, SAP will automatically execute post upgrade test scripts in the customer's Test system and the customer can review the completed test results to address any issues. PUTs are typically unit or string tests, but do not typically cover entire business processes.
Customer Testing (Automated)A customer can use the Test Automation Tool to run automated scripts that align with the SAP Best Practice business processes. If a customer-specific configuration prevents the usage of the standard test process, the customer can make a copy of the existing process and customize it. Customers can also create entirely custom business processes from scratch with the tool.
Regression Testing (Manual)If a predefined automated test script is not available or viable, customers can use SAP Cloud ALM Test Management to build and track completion of manual test cases.

The Automated Testing Tool

Test Automation Tool for SAP S/4HANA Cloud

The Test Automation Tool is integral part of SAP S/4HANA Cloud. With preconfigured test scripts you can automate your business process tests. In addition, you can change existing or create new test cases via a recording functionality. In addition, improved regression testing is supported by SAP delivered test automats on app level.

Click on each of the five headings in the graphic below to find out how the Test Automation Tool uses preconfigured test scripts to automate business process tests as an integral part of SAP S/4HANA Cloud.

Stay lifecycle enabled with customer specific test processes

To reduce the efforts for regression testing, use test automation wherever possible. Ensure that you stick to the following recommendations to stay as far as possible lifecycle enabled:

  • Stick to standard test automats wherever applicable.
  • Leverage data variants, instead of changing the standard test automats.
  • To use customer specific master data for testing, do not change the standard test process in the Manage Your Test Processes app. Exchange master data via data variants at test plan level in Test Your Processes app. Upload and download feature is available.
  • Change only deviated process steps (for example, if extension/customization is made to business process flow).
  • If a deviation from a standard process is needed, copy standard processes and change only the deviated steps (or add custom steps, or delete steps). All other process steps will stay standard and will be updated during upgrades by SAP.

Test Execution Engine on Business Technology Platform

When a test is performed in the Test Your Processes application, a Test Execution Service performs actions in a simulated user interface on behalf of your test user. The Test Execution Service runs on Business Technology Platform. The first step in the communication between the Test Execution Service and the simulated user interface of S/4HANA Cloud is to authenticate the test user through the identity provider.

The test plan covers:

  • Information on the business app(s) to be performed
  • Information on your actual tenant configuration
  • The business data to be used for each screen/dialog step

The Test Execution Service:

  • Inserts the data into the simulated browser window for each screen of the business app(s) and triggers.
  • Filled screens are sent to the S/4HANA Cloud frontend.
  • Records log entries (screen shots and processing status) for each dialog step of the business app(s) and sends to the Test Your Processes App.

Manage Your Test Processes

Manage Your Test Processes App

With the Manage Your Test Processes app, you can create and manage test processes that represent the business processes in an organization. A test process, or multiple processes must be added to a test plan in the app, Test Your Processes to execute the actual test in the system. The implementation team works with customers to build test plans with the standard test processes, and modify test processes to align with any extensions or customizations made based on the Fit to Standard workshops. The test processes available in the Manage Your Test Processes app are based on the scope enabled in your system, as each test process automate aligns directly with a business process (scope item) active in your system. The test process automates are essentially automated versions of the test scripts you find in SAP Best Practices Explorer to manually test the business processes in the S/4HANA Cloud system.

Note
Example: If you define with the custom business logic BADI (business add-in) that managers are required to approve time sheets submitted by internal employees (by default, this is only required for contingent workers, not internal employees), then the standard test automate for Time Recording (1Q4) must be edited to align with the customized process in the S/4HANA Cloud system. You can copy the existing Time Recording (1Q4) standard automate to make a custom process, then record the additional actions in the custom process. You should also download the editable Process flow (BPMN2 version) from SAP Best Practices Explorer for the Time Recording (1Q4) scope item and use an editor that supports editing BPMN2 files to add the additional required manager approval step to the process flow. This is important because customers should have documentation of any customized process flow that deviates from the standard process flow listed in Best Practices Explorer.

Test Process Types

A test process is comprised of one or more steps and typically maps to an SAP Best Practices process. A process step is a series of actions or keystrokes to accomplish a business task within the larger test process. For example, creating a purchase order is a test process step within a larger test process. Because SAP defined the keystrokes to create a purchase order, this is a standard test process step. If you record your own keystrokes for a particular step, it would be a custom process step.

We refer to test processes as test automates in the SAP S/4HANA Cloud Test Automation Tool, because each process is essentially an automated version of the test script you could use to manually test the business process.There are three types of test processes / automates:

  • Standard test automates / process: Standard test automates / processes are created and delivered by SAP as per SAP Best Practice processes. Users can view standard automates based on active scope items in their Q-System. Note, that you can't edit or delete a standard test automate / process.
  • Custom test automate / process: Custom test process are created by users either copying from Standard process or by creating a new one according to your business needs.
  • Post Upgrade Test automate / process: Post Upgrade tests are created by SAP and the focus of these automates is to test the key functionality of applications based on active scope in Q-system after upgrade. Post upgrade tests are performed by SAP based on customer consent.

Use Cases for the Manage Your Test Processes Application

  • If you have not changed a business process from the standard process flow, you can search for the corresponding standard test process automate in the Manage Your Test Processes app and change the test data to align with your organizational data. Then you can use the Test Your Processesapp to assign the process to a test plan and execute the plan.
  • If you have made edits to the standard process flow (for example, custom fields/custom logic), you can copy the standard test process automate in the Manage Your Test Processes app to edit the steps (for example, delete, add new, and so on). You will also need to define the test data to align with your organizational data. Then you can use the Test Your Processes app to assign the process to a test plan and execute the plan.
  • If you want to test some, but not all, of the steps from one business process, and some from another process, you can create a new test process in the Manage Your Test Processes app and manually add empty steps. You can then select the empty step and use the search options to find the standard automates you want to pull steps from to create your custom process. You will also need to define the test data to align with your organizational data. Then you can use the Test Your Processes app to assign the process to a test plan and execute the plan.
  • If you find that none of the standard test automates meet your requirements, you can create a new test process and add test process steps by recording the actions (such as recording your keystrokes) in the applications directly. The functionality to "record" keystrokes is available in the Manage Your Test Processesapplication.

Create a Test Process

Try it out

Learn how to create and edit a test process.

Record and Add Actions to a Process Step

Try it out

Learn how to record and add actions to a test process step.

Edit a Process Step

You can edit the recorded actions of a custom process step or record actions on application. Every action in a process step has Action No., Optional, Action Type, Label, Value, Data Binding, and Technical Details. With the Edit option at process step level, you can add actions and edit Label, Value, Data Binding, and Technical Details columns.

Procedure to Edit a Process Step

  1. Choose Edit to edit the actions.
  2. Add Action: To add an action manually, select a specific action and chooseAdd Action to add keyboard action.
  3. Choose Add below or Add above to add an action below or above the selected action.
  4. Select Action Key from drop-down list. You can enter Element Label.
  5. Click Submit.
  6. Add below/Add above: To add a new action by recording, choose Add below or Add above. The application will launch in a separate window and recording starts.
  7. Optional: Switch to YES to make an action optional. If the action marked as Optional fails during execution, the test run continues for succeeding actions in a test process step. If the action not marked as Optional fails during execution, the test run terminates at that action and all succeeding actions remain untested.
  8. Label: Under the Labelcolumn, you can change label as per your need.
  9. Value: Under the Value column, you can change value as per your need. You can change values for editable action types. For example, Input) either manually or by selecting value (System Variable or Input Help) for standard process steps.
  10. System Variables include the formulas of the input values. These formulas are calculated during execution of test plan. For example, if you want to assign current date in any field during execution, you can use variable $TODAY[]. You must select right combination of data.
  11. Input Help includes standard values (delivered by SAP) for actions. It is only available for a copy of standard test process step. Select System Variables option if you want to assign any formula for the value of action. Select Input Help option if you want to use standard value for the action.
  12. Data Binding: Under the Data Binding column, you can rename an existing data binding variable or parameter or you can select a new one. You can also create a data binding variable manually. A data binding variable or parameter is required to bind the data from any previous action. The variable is either created using the Read option in the Recording Panel while recording, or by creating it manually while editing actions. The value or message that you read is stored in a variable. In the Data Binding process, there is a source and a destination. The Read action is always a source for data binding. Data Binding can be done in two ways:
    • Data binding within test process step: Select the action to which you want to bind the data. Enter the name of variable for data binding that is present in Read action. The syntax is: SequenceNo.ofPreviousStep-BindingParameter.
      Note
      If you create any variable through Read, it is not available on for the same test process step.
    • Data binding with previous test process step: Select the action, choose, and select the test process step from which you want to bind. Then select the variable name. The syntax is: SequenceNo.ofPreviousStep-SequenceNo.ofPreviousProcess-BindingParameter.
      Note
      If you create any variable through Read, it is available for subsequent steps.
  13. Edit Details: Choose Edit Details to edit technical details of the action.
    Note
    Editing technical details is not recommended to functional users. Any discrepancy in the details might cause failure during execution. These details are used to safeguard testing.
  14. ID: You can edit the technical ID of the UI element. Please be careful while changing the ID as the change in ID of UI element might cause failure during execution. If you are a technical user, you can change the ID .
  15. Formula Name: You can also edit the formula applied for the action. This option is used when you want to provide a formula. For example, if you want to introduce extra waiting time before performing an action, corresponding formula can be provided.
  16. Choose Save to save the changes in actions.

Features of Manage Your Test Processes App

Try it out

Learn how to use the Manage Your Test Processes app in SAP S/4HANA Cloud.

Test Your Processes

Test Your Processes App

With the Test Your Processes app, you can view Post Upgrade test plans; and create, manage, and execute Customer test plans. The app (SAP S/4HANA Cloud- Test Automation Tool) enables the user to automate end to end business process testing in a faster and easier way. Automated testing not only validates your SAP S/4HANA business processes, but also reduces effort in manual testing by using the Standard test processes delivered by SAP. You can re-use Standard test processes by providing custom test data for testing. Use this app to create and maintain automated test plans and to view post upgrade test plans for current release.

Test Your Processes Key Terms:

  • Test Plan: A test plan represents an end-to-end business scenario. Test Plan is a set of one or more Standard/Custom test processes.
  • Test Process: A test process represents a business process and is a set of one or more process steps.
  • Process Step: A process step is a series of actions.
  • Action: An action is a user action performed on the application for the test. Some examples of actions include: Input, Click, Select, and Search.

Use the Test Your Processes App

Try it out

Learn how to use the Test Your Processes app.

Checking Test Execution Results

You can check the text execution results by viewing the Status of your test plan. After completing execution, the test plan Status becomes either Success or Failed. The execution of a test plan occurs in two ways:

  • Dependent execution of test processes: If there's data binding between two or more test processes in a test plan and if the source test process becomes Failed, then the destination test process status does not execute. Subsequently, destination test process status becomes Failed and process steps statuses become Canceled, as it is dependent on the source test process.
  • Independent execution of test processes: If there's no data binding between two or more test processes in a test plan and if source test process status becomes Failed, then the destination test process will execute independently and its status becomes Success if it passes.

Why does a test plan fail?

One or more failed actions in a process step leads to a failed test process, and ultimately, a failed test plan. Failed actions are followed by Canceled actions because they are not executed.

How can you identify errors in a failed action of a failed process step?

If a test plan fails, we recommend checking the Logs and Screenshots of the failed process step.

Procedure to check test execution results:

  1. Open the failed test process and select the failed process step. The process step will open, and you will see all the actions with the Action ID, Action Type, Label, Value, Data Binding, Status of Last Run and Screenshot of Last Run.
  2. Select the Failed action. The failed action is followed by the Canceled actions.
  3. Choose Logs. You can view and print screenshots and a Detailed Action Log of all the actions. The screenshot of the Failed action can help you identify the actual error that caused failure of test process step.

Correcting Errors and Executing/Resuming Failed Test Plans

If the error is because of system failure, you must fix the system configuration issue. If there is a recording issue, re-record the action. After identifying the issue and correcting it, you can re-execute or resume the failed test plan.

Procedure to resume a failed test plan:

  • Choose Execute at the test plan level to re-execute the test plan.
  • Choose Execute at the test process level to re-execute a failed test process.
  • Choose Resume at the action level to resume execution from a failed action.

Analyze Automated Test Results

Analyze Automated Test Results Application

The Analyze Automated Test Results app enables you to view the Post Upgrade and Customer test results with visual cards. You can also share the dashboard link via e-mail or save as tile.

Test Results Cards:

  • Processes (Executed): Displays the Total number of Processes executed. The card displays a bar chart which is based on the Process type available in the Customer system.
  • Test Execution Status (Post-Upgrade Test Plans): Total number of Post Upgrade Test plans executed. The card displays the doughnut chart which is based on the status of the Test Plans executed for Post Upgrade Tests.
  • Test Execution Status (Customer Test Plans): Total number of Customer Test Plans executed. The card displays the doughnut chart which is based on the status of the Test Plans executed by the customer.

Display Test Results

Filters available on the Display Results screen include:

  • Test Plan Name: Filters results displayed based on the Test Plan Name.
  • Test Plan Type: Filters results based on who created the test plan. "Post Upgrade Test" plans are created by SAP and "Customer Test" plans are custom test plans created by the customer.
  • Release: Filter results based on the quarterly release.
  • Application Area: Filter the results based on the Application Area maintained in the test plan.
  • Status: Filter the results based on the Status of execution of the Test Plan.
  • Process Step Type: Filter the results based on Process Step type the test plan contains.
  • Last Run On: Date range to search for test results.

Review Test Plan Status

Test plan status can include:

  • Success: All actions in the process steps are executed successfully.
  • Failed: One of the test actions failed, which causes failure of all following actions.
  • In Process: Test plan execution is ongoing.
  • Canceled: Test plan execution was stopped by the user manually.
  • Untested: Test plan has not been submitted for execution.
  • Not Executable: Data required for the automates to successfully execute is not available in the system (specific to post upgrade tests).

Try it out

Learn how to use the Test Automation Tool to automate business process testing in SAP S/4HANA Cloud.

Test Management with SAP Cloud ALM

SAP Cloud ALM for Implementation Test Management

The Test Management features of SAP Cloud ALM are grouped under the SAP Cloud ALM for Implementation capabilities. They enable consultants and customer project team members to prepare and execute tests based on SAP content for both automated and manual testing. Instead of documenting test efforts in a spreadsheet, we recommend using the Test Preparation,Test Execution, and Defects apps in SAP Cloud ALM to document completion of the required formal tests.

Test Case Preparation & Execution

Steps to prepare and execute business process tests:

Test Case Preparation StepTasks
Testing experts prepare test cases.
  1. Create new test cases.
  2. Define the structure and scope of test cases.
  3. Build and edit the content of test cases.
Testing experts manage and monitor the progress of test preparation.
  1. Access information about test cases.
  2. Release test cases and process flows for test execution.
Test Case Execution StepTasks
Testers execute test runs.Execute test runs, assign statuses, and enter comments based on results.
Testing experts monitor the progress and results of test execution.
  1. View the test progress.
  2. View a history of executed test runs and performed actions.
  3. View the results of the current or last closed test run.

SAP Cloud ALM Internet Demo System

Get a hands-on experience with SAP Cloud ALM in a public system with pre-loaded data at no cost. Demo users are provided to enable you to instantly log into the system at any time.

Multiple users can be logged into the system with the same user credentials, but you will not be able to overwrite each other. For example, if two users logged in with the same credentials try to create a test case at the same time, only one user will be able to create the test plan, and the other will see a message that a test plan is already open in another session.

In the Test Preparation app, you can manage and prepare test cases to ensure the requirements you've implemented work from a functional perspective. Testing experts use this app to create and prepare automated and manual test cases. You can manage the predelivered automated test cases and import custom test cases from the Test Automation Tool in SAP S/4HANA Cloud through the Test Preparation app. You can also assign requirements and user stories to test cases.

Test Execution App

Testers use the Test Execution app to run automated tests in the Test Automation Tool in SAP S/4HANA Cloud or execute manual test runs by carrying out the test activities, assigning statuses, and entering comments based on the results. Testers can also create defects and assign defects to test runs and test actions.

Testing experts use the Test Execution app to monitor the progress and results of test execution by viewing test progress and results, viewing a history of all executed test runs and the performed actions in the test runs.

Defects App

In the Defects app, you assign test cases to defects if problems were discovered during testing that need to be resolved. After a defect is documented, it should be assigned to a team, role, or processor. The processor is notified about their defect assignment and can analyze and correct the defect. Once the defect has been corrected, the processor changes the defect status to Retest Required and assigns it to the original reporter of the defect. The reporter is notified and can retest the case via the Test Execution app. If the retest is successful, the defect status can be set to Closed.

Note
Learn more about Test Management in the SAP Cloud ALM for Implementation Expert Portal.

Log in to track your progress & complete quizzes