SelectorsHub: The Next Gen XPath, CSS Selectors Tool

Junaid Ahmed

Posted On: August 10, 2020

view count59852 Views

Read time23 Min Read

This article is a part of our Content Hub. For more in-depth resources, check out our content hub on Selenium Locators Tutorial.

SAP applications are designed to help businesses improve customer relations and deliver a better experience. These business applications also provide users with complete access to information, helping them make faster decisions. This ability helps businesses gain a competitive advantage in the industry, no matter which market they are in. This is why it is important to have a full-proof testing phase while building or deploying new versions of SAP applications.

SAP applications

Source

In this article on SAP testing, we will look at the main reasons for testing SAP applications, best practices for doing so, and ways to make sure that your testing process is as efficient as possible.

Need to test your XPath expressions? Try Free XPath Tester tool for accurate and efficient web scraping and automation.

SAP Overview

SAP (Also known as SAP AG and SAP SE) stands for Systems, Applications, and Products is a German-based MNC, known for its leading ERP business application software in the Global market. ERP stands for Enterprise Resource Planning, is a software application providing a consolidated platform to allow organizations to integrate their business processes that are diversified in nature.

For instance: With SAP ERP solution, an organization could manage their

  • Human Resources,
  • Customer Relationship,
  • Supplier Relationship,
  • Supply chain,
  • Enterprise performance,
  • Materials procurement and tracking,
  • Financial Accounts, etc.

SAP ERP application leads the way in the overall ERP market share, and here is the 2020 report regarding the same:

ERP market share

Source

As per the report, the Worldwide ERP application market size was 95.2 Billion USD in 2020, and it is estimated to reach 100.7 Billion USD by 2025, with a CAGR (Compound Annual Growth Rate) of 1.1%.

SAP was founded in 1972 by five ex-IBM employees, and presently it is the third-largest publicly-traded software enterprise by revenue in the world. SAP has nearly half a million customers all over the world, many of them including Fortune 500 companies worldwide. Customers of SAP use its software as a solution for processing business data and generating reports in real-time, which helps all levels of people in an organization to make informed decisions. In addition, it enables an organization to manage business operations efficiently.

SAP offers a large number of products to its customers for meeting their various business goals along with IDEs, other tools, design systems, and specifications (SAP Fiori), UI framework (SAPUI5) to make their application developers and testers work easier.

This article on SAP testing is intended to serve as a testing methodology reference guide related to

  • SAP Application testing (Specific to SAP ERP) and
  • Websites/Web applications created using the SAPUI5 framework.

We will start with SAP ERP Application testing, followed by what it involves to test website/web applications created through the SAPUI5 framework and how to carry out the testing in both areas.

Overview of SAP ERP and its offerings

SAP ERP enables an entire organization to run its business operations (Human resources, customer relationship management, financial accounting, inventory, manufacturing, and management control) in an end-to-end manner using a single system. It does not matter whether an organization deals with large-scale business deals or mid-size or smaller size business operations, SAP ERP has an offering for each of these customer bases.

SAP S/4 HANA is the latest ERP offering from SAP to a large-scale enterprise. Organizations can install SAP S/4 HANA ERP systems in either on-premises data centers or the cloud. Companies such as Walmart, Apple, Ford Motor, General Motor, Alphabet, etc., use SAP S/4 HANA as their ERP solution.

SAP also offers SAP Business ByDesign ERP suite for medium scale organizations and SAP Business One (another ERP suite) for small scale organizations. Here are some of the companies that use SAP Business One:

  • Univera
  • Terracycle
  • Lewis
  • Lorventech

Testing SAP ERP Application/SAP S/4 HANA

As you are reading this article on SAP testing, you would probably know the importance of Testing in general. However, let’s discover what does it involve in testing SAP ERP or SAP S/4 HANA application before getting into the details of the types of testing involved and how to carry out the same.

What does it involve in SAP ERP testing?

SAP ERP application is composed of several interconnected business operation focussed modules. The architecture of any ERP application is quite sophisticated and involves complex design. SAP ERP is no exception in this regard. Due to this factor of a large number of integrated components, Integration testing and Performance testing are some of the key testing aspects to be considered for the success of SAP ERP application.

As SAP ERP is the lifeblood of several large-scale organizations, even minor errors in one of the modules (say Financial module) can have dreadful consequences for the customer’s business. This is a key reason for us to strategize and execute professional testing in the case of SAP ERP applications.

Also, when we deal with SAP ERP testing, it refers to the approach used for testing the customization done on top of the SAP ERP software. Although the SAP ERP application comes out of the box with various modules and enriched features and business operations-related attributes, organizations still use customization to meet their business requirements. For every customization carried out while development, you should plan and create test cases to check the newly customized feature.

Tools used in SAP ERP Testing

Based on the SAP ERP application that your organization uses (SAP ECC – SAP ERP Central Component or SAP S/4 HANA), the list of SAP testing tools applicable and to be selected would vary. This is because SAP ECC depends on certain legacy technologies, for example, SAP GUI, and for testing the changes done in that area, it would need SAP-oriented tools, languages (SAP ABAP), and framework libraries.

As we proceed further, I will be calling out programming languages and tools that can be used for SAP ERP testing in the respective sections of this article.

Various types of testing involved in SAP ERP

Following are the key types of SAP testing that need to be carried out in the case of the SAP ERP system:

  • Unit Testing
  • Integration Testing
  • Functional Testing
  • Performance Testing
  • Regression Testing

Unit Testing

SAP ERP suite is developed based on a home-grown high-level programming language called, ABAP (Advanced Business Application Programming). ABAP is also popularly known as ABAP/4, meaning 4th generation language.

SAP offers a rich set of ABAP code development, testing and analysis tools integrated with their ERP suite to ensure syntactical correctness and functional aspects of ABAP code.

In SAP, unit testing is usually carried out whenever a change takes place in the areas of Workflow, Report, Interface, Conversion, Enhancement, and Forms. In short, this is called WRICEF in SAP.

Notable tools related to the development and unit testing using ABAP:

  • ABAP Workbench: Developers can use ABAP Workbench to develop standard SAP ERP application logic and custom application logic.
  • ABAP Test Cockpit (ATC): ABAP Test Cockpit (ATC) is a test enabling framework that comes along with ABAP Workbench. With ATC, developers can execute and observe results for various tests carried out on objects developed in SAP applications.
  • ABAP Test Double Framework: While carrying ABAP unit tests for the SAP ERP application, you might want to focus only on objects of interest instead of including other variable factors that could deviate from your unit test goals. This is where a mocking framework such as ABAP Test Double Framework comes in handy.

During unit testing, dependent/external objects should be substituted with their mock objects to imitate the behavior of the real dependent objects. Testing this way aids to have a focus built on the ABAP object under test and promotes modularity.

Integration Testing

Once the unit changes are tested, the focus should be shifted to planning and developing integration test cases and codes. As part of this phase, all the different modules or external dependencies that make a feature work or are involved in a method call should be covered for testing. In other words, this would be a sort of end-to-end testing process covering various SAP modules, including systems or applications that are not part of SAP.

For instance: If an organization uses Salesforce for Customer Relationship Management (CRM) and SAP for covering other business processes, then as part of integration tests, when a new customer is provisioned in Salesforce CRM, the new customer’s data must sync with SAP ERP system modules such as financial modules, sales performance module and other such relevant business modules within SAP.

Also read: A Complete Guide To Salesforce Testing

Functional Testing

The Functional tests are crucial as they evaluate whether the functionality of all business modules in SAP meets business requirements.

SAP ERP application is highly flexible in the sense that it offers numerous configuration options for its users to tweak the functional behavior of a business module. Hence the QA engineers need to go through the design document, understand the functional features of a business module, and create test scenarios and test suites to carry out functional testing in SAP.

Performance Testing

The goal of Performance testing is to ensure that all business modules of the SAP ERP application remain in operation, even when the load of the system remains high. The increase in load could either be because of:

  • Increased number of users
  • High volume transactions happening because of business operations,
  • Background scheduled jobs that are created to satisfy a business requirement,
  • Etc.

Such stress testing is either done along with Integration testing to evaluate how all the components in the tech stack get coordinated together when put in action, or it is carried out once the integration tests are passed. Some organizations have a dedicated performance testing team to carry out infra setup and tasks related to performance testing.

Regression Testing

Regression testing must be carried out in the following scenarios:

  • Before going for a release, and after code/SAP Configuration freeze,
  • When SAP ERP is in production mode, and changes are carried out for a new change request

As part of Regression testing, we must test the whole application again and make sure that the features in production continue to work in the way it was before.

How to perform these SAP testing types?

To save effort, cost, and time, unit testing, integration testing, functional testing, performance testing, and regression testing should all be automated and executed without fail in an organization. Developers/Testers could use the ABAP programming language to develop the test scripts for all such SAP testing types.

Tools such as SAP TAO (Test Acceleration and Optimization) and eCATT (extended Computer Aided Test Tool) are widely used in the SAP community to enable automated testing. While SAP TAO is used for automated end-to-end testing purposes, eCATT can record and parameterize the test objects for automation testing by facilitating a graphical user interface along with an ABAP script editor.

In the case of SAP S/4 HANA-based ERP solution, you could use Selenium automation testing for the web-based code base (example: HTML). To make this front-end testing automated, scalable, and reliable, you could explore LambdaTest’s Selenium Grid cloud.

SAP testing tools like LambdaTest allow you to perform cross browser testing on your SAP S/4 HANA-based ERP applications on an online device farm of 3000+ real browsers and operating systems.

Here’s a quick video on performing Selenium automation testing on the LambdaTest platform.

You can also Subscribe to the LambdaTest YouTube Channel and stay updated with the latest tutorials around automated browser testing, Selenium testing, CI/CD, and more.

Now that we have completed the first part of this article on SAP testing about testing SAP ERP applications, let’s head on to the website or applications created using the SAPUI5 framework and how to test them.

Overview of SAPUI5 Framework

SAPUI5 is an enterprise-ready UI development framework for building web applications based on HTML5 standards. SAPUI5 uses front-end technologies such as HTML5, CSS, AJAX, and jQuery at its core. It comes along with the support of necessary features for MNC organizations such as internationalization, localization, other essential features such as Data-driven UIs, routing, a comprehensive suite for performance analysis, testing tools that support both unit testing and end-to-end testing approach. SAPUI5 leverages the MVC (Model View Controller) approach for developing web applications.

SAPUI5 framework comes with numerous control elements, and if counted, it would exceed more than 500 UI elements. These UI elements range anything from simple switches, buttons, Table views, and various types of report charts that are used for analytical reporting use cases. It does not stop with that, the SAPUI5 framework also takes care of rendering these UI elements in a responsive manner, making the web applications compatible with any kind of device, be it a Desktop, Laptop, Tablet, or Smartphones.

SAP suggests the developers develop websites or web applications based on the SAPUI5 framework to consider designing the UX part of the apps based on SAP Fiori and use SAPUI5 for developing the UI elements in respecting those UX design principles suggested by Fiori.

It is from SAPUI5, an open-source JavaScript application framework named OpenUI5 that was released to the open-source community by SAP. OpenUI5 is available under Apache 2.0 License, and it can be used to create cross-platform, responsive web applications. OpenUI5 is considered a subset of SAPUI5 since both are from the same code base, but OpenUI5 does not contain some of the components that are available only in SAPUI5. For example, there are a few Plotting libraries not available in OpenUI5. However, one could still build enterprise-grade web apps using the OpenUI5 framework as well.

javascript CTA certification

You can take this certification to prove your expertise in JavaScript to create automated browser tests.

Here’s a short glimpse of the Selenium JavaScript 101 certification from LambdaTest:

Testing Websites/Web applications created using the SAPUI5 framework

Since both SAPUI5 and OpenUI5 frameworks are part of the same code base, the testing approaches that I am going to cite in this article would be applicable to applications created using any of these frameworks.

Out-of-the-box SAPUI5 framework suggests and offers a lot of tools to make the development and testing process easier.

SAP Web IDE is one of the best IDEs to work in the case of SAPUI5 based applications.

For SAP testing, SAPUI5 offers QUnit for unit testing, OPA5 for integration testing, UIVeri5 for carrying out system and end-to-end tests. However, in the case of developers and testers who are already familiar with tools such as Selenium or Karma, they shall continue to use them to write automation scripts to test the SAPUI5 based applications.

Various types of testing involved in SAPUI5 based sites

Following are the types of SAP testing strategies that one should have for SAPUI5 based websites or web applications:

  • Unit Testing
  • Integration Testing
  • System Testing

The test suite should have more Unit tests, followed by Integration tests, and then System tests in terms of volume. This is because the lower level tests (starting from unit tests) are easier to develop, maintain, and faster to execute. The higher the level we traverse through the testing type, the more complex and effort it needs to develop and maintain them.

Let’s see how we can go about approaching each of these SAP testing types.

Unit Testing

QUnit, a JavaScript based testing framework, is widely used for carrying out Unit testing in SAPUI5 applications. QUnit comes with essential features such as:

  • Test runner (executes test suites)
  • Test suite (one or more tests)
  • Test case (actual test)
  • Assertion (to verify actual results against the expected)
  • Test run reports (results of test run)

And the availability of these features makes unit testing a piece of cake with QUnit.

One could also use a Selenium-based test script so that whenever a file in the application source code gets changed, you can make the test suite execute in an automated manner.

Integration Testing

Planning and developing Integration tests need a thorough understanding of the internals of the application that we are dealing with. Although it appears to be complicated to deal with integration tests, a library such as OAP5 (One Page Acceptance Tests) that comes along with SAPUI5 offerings makes the Integration test development and execution task easier.

OAP5 is a JavaScript-based library that is the same language that you, as a developer of the SAPUI5 application, are already familiar with. This is because the application by itself is built using the same JavaScript programming language. Also, this makes easy enablement of test suite integration with any JavaScript-based framework such as Jasmine or Sinon, or QUnit.

Restrictions with OAP5 library and how to deal with those restrictions

In Spite of this advantage, there are some restrictions that you as a developer/tester should be aware of when using OPA5 for testing purposes.

  • One cannot do Screen capturing with the OAP5 library.
  • In production, the application users can encounter issues in terms of functional or cosmetic problems. Although the functional checks can be achieved using the OAP5 library, due to the absence of the screen capturing feature, we have to plan for test strategies to cover the cosmetic or visual areas.

    With LambdaTest’s Smart Visual UI Testing feature, on a single button click, the testers could spot visual changes introduced in the SAPUI5 application. It can be a change in the icon size, or font size, a change of background color, UI layout, the position of the UI element, etc.; anything of such UI changes can be easily spotted.

    Given below is the screenshot taken from the LambdaTest platform.

    screenshot taken from the LambdaTest platform

    You can even schedule a time interval for the platform to perform automated screenshot testing and send them to you over email. No need to sit around and wait for the test completion.

  • Testing across more than one page at a time
  • Performing SAP testing on a single page at once is efficient, but it can be time consuming, especially if you have a number of pages to test. If you are testing a single page, it is quite easy to test on a variety of devices and browsers. However, when testing across multiple pages, the amount of combinations goes up exponentially. So why not test across multiple pages at one time?

    This is where parallel testing proves to be helpful. Parallel test execution with Selenium is one of the major factors that can affect the test execution speed. It is no secret that the number of tests executed in a given time period will be much higher if you run your test suite by splitting it into multiple jobs into different machines or virtual environments.

    Also readHow To Speed Up Selenium Test Cases Execution?

    A cloud-based automated testing tool like LamdaTest offers the benefits of parallel testing without the installation and maintenance headache of a local Selenium Grid. With LambdaTest, you can perform SAP testing in parallel on an online browser farm of 3000+ browsers and operating systems. Once executed, the test result will appear on the LambdaTest Dashboard under the Automation Logs, as shown below:

    LambdaTest Dashboard

System Testing

SAP’s team recommendation is to use UIVeri5 to implement a system and end-to-end tests. It is a framework inspired by Protractor, and it uses WebDriverJS to launch a real browser so that the scripts can interact with apps developed using SAPUI5 in the exact way a user in the real world would. Tests with UIVeri5 are usually written in synchronous coding technique, and it is compatible with browsers such as Chrome, Internet Explorer, Firefox, Safari, iOS, and Android-based browsers.

Summary

With this, we have come to the end of this article on SAP testing. As part of this article, we have covered an overview of SAP ERP applications (including the latest SAP S/4 HANA ERP suite) and the SAPUI5 framework. We also explored what are the aspects, testinLocators in Selenium play a pivotal role in defining our Selenium testing scripts. If you fail to specify the Selenium locators appropriately, then your Selenium automation script won’t be able to locate elements on the GUI of our web application. CSS Selector and XPath in Selenium are two of the most powerful ways of locating web elements for Selenium test automation. However, dealing with them will also take up a lot of your time. What if I told you there is a tool that can help you write your own XPath and CSS Selector in less than 5 seconds!! Yeah, you heard that right!

Now, you might be worried about losing your XPath writing skills by leveraging a tool. We are also bombarded with seemingly impossible questions.

Can we verify selectors for ShadowDOM elements?

If there is something wrong with our selector, is there any compiler that can tell us what’s wrong?

Because the key truth is, we prefer to write our selectors even though it takes a considerable amount of our time and effort while copy-pasting the attribute and text values from DOM.

New to CSS Selectors? Check out this Ultimate CSS Selector cheat sheet to boost your web designing career.

Why? Just because an XPath tool seems unlikely to happen? Yes, there are many impossible things in the UI automation world, but when it comes to an XPath tool. But that’s not the case anymore!!

Sanjay Kumar has come up with a browser extension called SelectorsHub, which helps software testers and developers write their own XPath and CSS Selectors within 5 seconds without compromising their learning skills.

What Is SelectorsHub?

SelectorsHub is a free-to-use browser extension that auto-suggests all the possible combinations of attributes, text, siblings, etc. to build selectors within seconds. So basically, now you are not losing your XPath skills and creating your XPath and CSS Selectors as well.

ShadowDOM Support

It was never possible to write and verify the CSS Selectors for shadowDOM elements, but now this fantastic innovation named SelectorsHub has made it possible. With the help of SelectorsHub, you can quickly inspect and verify selectors for shadow DOM elements.

Watch this video to learn what Shadow DOM is and how to automate it using Selenium WebDriver.

Compiler for Selectors

Earlier, no tool could tell us what is wrong in our selector. We were never able to understand what we did wrong with our selector until we were not experts. DevTools suggests 0 matching nodes for the wrong selector pattern. But now you have the Selector’s compiler, which will help you by displaying the correct error message and what is incorrect or missing in your selector.

iFrame Support

SelectorsHub supports iFrames as well. It will let us know if the inspected element is inside an iFrame or not. Now you can quickly write and verify selectors for elements inside an iFrame without wasting any time.

iFrame Support

This certification is for anyone who wants to stay ahead among professionals who are growing their career in Selenium automation testing.

Here’s a short glimpse of the Selenium 101 certification from LambdaTest:

SVG Element Support

Many of us are not aware that SVG elements don’t support the standard XPath format. SVG elements support different XPath patterns. SelectorsHub has made it much easier by letting you know the correct format. It also helps you in learning how to write selectors for SVG elements.

SVG Element Support

To help you get acquainted with SelectorsHub, here’s a video tutorial-

For more details about making the best of SelectorsHub, refer to SelectorsHub video tutorials.

Why Choose SelectorsHub When There Are Other XPath Tools & Selectors tools?

The biggest reason is this- SelectorsHub helps to improve XPath and CSS Selector writing skills as opposed to the other tools. But the answer is not limited to one reason; there are many reasons which makes SelectorsHub a unique and easily one of the best XPath tools available today.

  1. SelectorsHub is the only tool that has made it possible to write its own selectors in less than 5 seconds with an auto-suggest feature without compromising learning skills.
  2. SelectorsHub is the only tool that supports #shadowDOM; even Chrome DevTools doesn’t support shadowDOM.
  3. SelectorsHub is the only tool that gives a proper error message for the missing elements in your selectors.
  4. It helps you to improve your XPath and CSS Selectors writing skills.
  5. It has iFrame support.
  6. It supports SVG elements.
  7. It supports a dark theme.

Also read: XPath In Selenium.

Is it safe to use SelectorsHub?

Yes absolutely, it is the most secure browser plugin.

  • SelectorsHub injects the script only when you open the SelectorsHub tab to use it while other plugins inject the script on your website as soon as the website gets opened in the browser. This is the biggest reason many companies don’t allow the browser plugin but now SelectorsHub solves this issue and takes care of the security issue.
  • It doesn’t save any user data.
  • It runs only in your local environment.

Instantly Build XPath, cssSelectors And Run Them Over Selenium Grid On Cloud

XPath and CSS Selectors both play an integral role in identifying the web elements that users love the most. With SelectorsHub, you can build your own XPath and CSS Selectors instantaneously. What next? How can you fast track your Selenium testing experience further?

Instead of wasting your project’s bandwidth and resources in managing your in-house Selenium Grid Infrastructure, you can opt for a cloud Selenium Grid such as LambdaTest.

LambdaTest provides an online Selenium Grid of 2000+ real browsers for desktop and mobile. That way, you won’t have to worry about configuring the latest browsers and OS as we have ready to fire machines available on our cloud servers. You can even leverage parallel testing with Selenium and reduce your test cycle’s execution by multiple folds. Our Selenium Grid offers integration with numerous third-party tools for CI/CD, project management, codeless automation, and more to accelerate your test cycles even further. Check out LambdaTest integrations.

With the help of SelectorsHub and LambdaTest, you now have to put in minimal effort in writing your own XPath or cssSelector. Plus, you get to test on run your Selenium scripts on cloud-based infrastructure. Your first 100 automation testing minutes are on us, register for free, and get started with LambdaTest, the most powerful cross browser testing cloud.

Do share your experience with SelectorsHub and LambdaTest below in the comments. Godspeed!

types, and tools involved in testing the SAP ERP solution and web applications developed using the SAPUI5 framework.

Remember the fact I told you about SAPUI5 based applications testing? The approach and tools used for testing SAPUI5 based web applications also hold good for testing the application developed using the OpenUI5 framework. I hope you can use these pointers to decide on testing your SAP applications.

Happy Testing!!!

Author Profile Author Profile Author Profile

Author’s Profile

Junaid Ahmed

Junaid works as a Marketing communication specialist at LambdaTest. He is an experienced MARCOM enthusiast who loves everything around marketing, tech, food & sports.

Blogs: 3



linkedintwitter

Test Your Web Or Mobile Apps On 3000+ Browsers

Signup for free