Skip to Content
Product Information
Author's profile photo Archana Taneja

SAP S/4HANA Cloud Test Automation Tool – UI Control Repository

Customers are increasingly relying on automated processes to cater to their needs of testing their critical applications. SAP S/4HANA Cloud solution comes with built-in test automation capabilities, as part of the SAP S/4HANA Cloud Test Automation Tool. The tool enables you to accelerate all business process tests in SAP S/4HANA Cloud. The business process tests can include tests during the implementation phase, user acceptance tests, or regression tests after upgrades.  

As part of SAP S/4 HANA Cloud delivery from Test Automation Tool, Standard Test Processes created based on Best Practice Documents is delivered to customers. These Standard Processes provides a template for customer explaining about the functional flow of an application. The customer can create a copy of Standard Processes and convert them into Custom Processes if there is a requirement to extend standard processes to meet their customized business requirements. The maintenance of custom processes remains with the customer.  

Over a release, if an application under test changes, then the customer needs to maintain all custom processes that they have created for that application.  The concept of UI control repository aims to bring down maintenance effort especially for custom processes with the concept of centralizing UI controls. 

UI Control Repository

Any interactable control present on the screens of various apps of the SAP S/4 HANA CE can be termed as a UI Control. It includes SAP Fiori and SAP GUI apps’ controls like buttons, Inputs, checkbox, radio button etc. 

UI control repository is the collection of various UI Controls across applications. These UI Controls are reusable, modular, maintainable, extendable, and are important components of a Process Step in Test Processes present in the SAP S/4 HANA Test Automation Tool. 

The UI Control repository shipped as a part of SAP S/4 HANA CE is called the Standard UI Control repository. The controls inside the repository are called ‘Standard’ UI Controls in the ‘Manage your test process’ application.

Need for UI Control Repository

Earlier Process step XML had Actions along with UI Control information, stored in the database directly. So, all Actions were local to each Process step. 

But now, UI Controls associated with the Actions in Process Steps are stored in one central UI Control Repository. Storing all UI controls in a central repository gives the advantage of handling app-level changes in one central repository and re-using them across different test processes.  

Actions created using the Recording module can now be categorized as Standard if there exists a mapping to Standard UI Control Repository. This gives the advantage of auto maintenance of actions even if these actions present inside custom automates.

Flow Diagram

UI%20Control%20Repository%20Flowchart

UI Control Repository Flowchart

View the controls linked to UI Control Repository after Recording

The enhancements on top of the existing recorder in SAP S/4 HANA CE Test Automation Tool enables the recorded controls to be linked to the Standard UI Control repository. 

  • Record the actions in accordance with the business process.
  • Recorded controls should be able to get linked with Standard entries from UI control repository and the same can be viewed by clicking on STANDARD hyper link present in UI control Type column

Clicking%20on%20a%20standard%20hyperlink%20to%20get%20the%20information%20about%20linked%20control

Clicking on a standard hyperlink to get the information about linked control

  • For better understanding of controls captured, customer can view the screen shot of STANDARD control on clicking on ‘Edit Details’ under ‘UI control Details’ section 

UI%20Control%20Details%20shown%20in%20Edit%20Technical%20Details%20popup

UI Control Details shown in Edit Technical Details popup 

Linking the newly added manual step to the repository 

A newly added manual step can be linked the UI Control repository by using the steps as follows: 

  • Select the action where you want to add a new step 
  • Click on Add action and choose your preference from “Add below” or “Add above”
  • Select your preferred action key e.g. Input. A new action is added. 
  • Click on ‘Edit details’ from the column ‘Technical details’. A pop up opens with a section ‘UI Control Details’. 

UI%20Control%20Details%20section%20in%20Edit%20Technical%20Details%20popup

UI Control Details section in Edit Technical Details popup

  • Click on value help of the ‘UI Control’ field. A pop-up opens with option to search and select the desired UI Control. 

Select%20UI%20Control%20popup

Select UI Control popup

  • Select the desired control from the pop-up and click on ok. The UI Control field in the Edit details pop-up shows the selected UI Control label. 

UI%20Control%20Details%20auto-populated%20with%20the%20information

UI Control Details auto-populated with the information

  • Click on ok to save the changes. 

NOTE- If any XPath is maintained, a pop is shown to confirm the clearing of XPath field. XPath supersedes the preference as compared to the UI control, so if user wishes to use UI control, XPath has to be blank. 

  • UI Control column now has a clickable link ‘Standard’. Click on the link and the pop-up shows details of the UI Control selected by the user. 

Updating an already linked step using UI Control Repository

Linking to the UI Control repository can be changed for an action where a UI Control is already linked by using the following steps: 

  • Open a test step with actions which are linked to the UI Control repository 
  • Choose the step where the currently linked UI Control needs to be changed. 
  • Click on ‘Edit Details’ for the corresponding action. A pop-up opens where UI Control field shows the currently linked UI Control.
  • Click on value help for the UI Control field. A pop-up opens where UI Controls can be searched/selected.
  • Select the desired control from the pop-up and click on ok. The UI Control field in the Edit details pop-up shows the selected UI Control label.
  • Click on ok to save the changes.
  • Following changes are made to the fields of the action-  
    • XPath- Cleared 
    • Value- Cleared 
    • Formula- Retained 
    • Label- From the new control 
    • ID- From the new control 

NOTE–  If same control is selected again then there would be no changes made to the fields specified above except XPath.

Delinking the UI Control

If the user wishes to delete the linking of control to repository it can be achieved using the following steps: 

  • Click on ‘Edit details’ from the column ‘Technical details’ of the action where it is required to delink the control.  
  • A pop up opens with a section ‘UI Control Details’.  

UI%20Control%20details%20showing%20the%20UI%20Control%20which%20needs%20to%20be%20delinked

UI Control details show the UI Control which needs to be delinked

  • Remove the token from ‘UI Control’ field by clicking on cancel icon  

Popup%20which%20appears%20when%20we%20try%20to%20delink%20a%20UI%20Control

Popup which appears when we try to delink a UI Control

  • You receive a confirmation message stating ‘Removing the UI Control will delete the current step. Are you sure you want to proceed?’ if you click yes the current action is removed. 

Sync Actions in Test Your Process App 

What does Sync Action help in achieving? 

When we are executing a test plan, we get an option to enable execution in Sync Action mode. When we execute in Sync Action mode the actions present in Process Steps of type Custom (UI) attached to the test plan gets linked to UI control Repository.  

Why did we need Sync Actions in Test Your Process App? 

The Custom Process Steps that were recorded using old recorder before the role out of UI Control Repository do not have linking to Standard UI Control repository. To establish the linking we can’t re-record all the Custom Process Steps that we have. So, we have come up with this functionality now if the customer wants, they can run the Test Plan in Sync Action mode. 

Execution in Test Your Process App with Sync Action mode 

If user wishes to Sync Actions of a Process Step to UI Control Repository, they can follow below steps:  

  • Open Test your Processes
  • Select the Test Plan having the custom process steps in which the mapping to UI Control Repository needs to be established. 
  • Now click on Execute button on the test plan level or test process level. 
  • Check the Sync Action checkbox and select the variant you want to choose then click Execute. 
  • Once the execution is completed go to logs and see if execution went green, you can also check the number of Test Processes that were successfully Synced in the header. 
  • To verify you can go to Manage your test Processes App and see that now the linking to Standard UI Control Repository is established for the actions. 

Sync%20Action%20checkbox%20added%20in%20Select%20Variant%20dialog

Sync Action checkbox added in Select Variant dialog

Conditions to adapt a test script successfully

  • When test plan executed in ‘Sync action’ mode, only custom test steps are considered for mapping control from Standard UI repository. Also, only if custom process step is created for application which is part of Standard UI repository then actions will be mapped to standard UI repository. 
  • All controls except key stroke, optional actions (if not executed successfully during ‘Sync action’ execution mode), list control selection, and toast messages are supported for mapping with standard UI controls.
  • If test plan executed in ‘Sync action’ mode fails to execute. Actions until test execution progressed gets mapped to Standard UI Repository. 
  • When executing Test Plan, Sync Action will only be enabled if at least one Test Process is custom type. Once we run the Test Plan in Sync Action mode the actions in the Process Steps of type Custom (UI) inside Custom Test Processes will be mapped to Standard UI control Repository.

Conclusion

You can use Test Automation Tool’s UI Control Repository to reduce your effort spent on maintenance by recording a new test script or manually linking the step to the desired UI Control from the UI Control Repository. So go ahead and start exploring what UI Control Repository has to offer you.

Do let us know in the comment session if you have any queries related to Test Automation Tool or would like to suggest some improvements. Please check out the links mentioned below for further information.

Click here to get more information related to UI Control Repository 

Also refer FAQs if you have further questions related to Test Automation Tool or UI Control Repository.

Assigned tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.