Home / Educational Content / ERP Cloud / Utilizing Selenium and Java for Automated Testing in Cloud ERP

Utilizing Selenium and Java for Automated Testing in Cloud ERP

Voya Financial has begun utilizing Selenium and Java to implement automated testing for Cloud ERP releases.  This post will cover the challenges of release management testing Voya has experienced, their reasons for implementing automated testing, business tools they use for automation, and how they’ve configured JDeveloper with Selenium and Java.

Introduction

Voya Financial, an Oracle Cloud ERP customer, originally had no plan in place for release management testing at Voya Financial. The implementor Voya used sent minimal release notes, and that was it. Voya decided to start testing. They began with manual testing. After a year of manual testing, Voya hired an individual to write scripts in-house so that they could automate as much testing as possible.

Today, Voya uses automated testing on GL, Assets, Projects, Lease Accounting, Payables, Procurement, Sourcing, Contracts, and Self-Service Procurement. Additionally, they will inherit supply chain modules over the next year. In the future, automated testing will occur on up to twelve modules.

Voya’s first priority with automated testing considered their mission-critical processes. They’ve just completed all mission critical modules in Financials and are set to prioritize non-mission critical processes in Financials next. After that, Voya will expand automated testing to EPM.

Voya says that they find something new to test or add scripts to each quarter. They are in the process of training more people how to use the testing tools to add scripts, run scripts, and fix scripts.

Challenges of Manual Release Management Testing

Typical challenges of manual release testing for Oracle Cloud include:

  • Can take a very long time
  • Prone to human error
  • Requires many resources
  • Requires maintaining test cases
  • Lack of scalability

Why Automate?

By implementing automated testing, Voya was able to reduce release management testing time in procurement and AP modules from four days to a few hours each cycle. They added the ability to automatically test twenty-five reports that were not being tested prior to the project. Voya also reduced testing time in fixed assets and projects from two days to a handful of hours.

These savings equipped Voya to know sooner if there was a problem. If there is an issue, Voya can go to Oracle quickly for resolution. They also have more time to allocate toward non-automated testing. As Voya scales, they plan to build out more automated tests for drastically reduced testing time.

While there are partners that can be paid to provide testing services, Voya wanted to take care of it in-house so that they would have control over the process. They preferred being able to choose what to script. They enjoy the ability to change a script or add new scripts in the middle of a test cycle. This flexibility was a major factor in choosing to automate testing from in-house.

Through automation, Voya is able to:

  • Identify problems quicker than before
  • Allocate more resources to testing items that are not automated
  • Allocate more resources to resolving issues that are identified
  • Have a continuous ROI each cycle

Business Tools for Automation

Voya has used several tools for testing automation, including Selenium and Java.

What is Selenium?

Selenium is an open-source umbrella project for a range of tools and libraries aimed at supporting browser automation.

Selenium is made up of three main components:

  • Selenium WebDriver
  • Selenium IDE
  • Selenium Grid

How is Java Used?

Java is a general purpose, class-based, object-oriented programming language designed for having lesser implementation dependencies. It is a computing platform for application development. Programs written in Java are faster than other popular languages. Java comes with multiple complete automation frameworks like TestNG, Junit, etc., that can be leveraged with Selenium for better coding, reporting, and maintenance.

Tools Needed and Pre-Requisites

To get started, you’ll download Oracle JDeveloper and Java (JDK). You’ll also need the Selenium Library and Language Bindings.

  • Oracle JDeveloper – Integrated development environment (IDE) used for development of Java applications
  • Java (JDK) – Java development kit is required to write and run Java programs
  • Selenium Library and Language Bindings – Selenium supports several languages and each has its own client driver. To use Selenium and Java, the Java bindings need to be installed.

Selector Hub

While it’s not a required tool, Selector Hub is a free Chrome plugin that can save you a ton of time. Selector Hub identifies web elements for you, meaning you don’t need to identify the HTML code.

Configure JDeveloper with Selenium

To configure JDeveloper with Selenium, launch JDeveloper Studio to create a new application and project. This will be the workspace used to write an automation test.

To configure JDeveloper with Selenium, launch JDeveloper Studio to create a new application and project. This will be the workspace used to write an automation test.

Once the application and project are created, a Java class needs to be created as seen in the image below.

Then, add the Selenium Jars to the project by right-clicking the project folder and selecting Project Properties, high-lighted in yellow in the image below.

From the Project Properties menu, navigate to Libraries and Classpath. Select Add JAR/Directory. Navigate to where the Selenium jar is located. Left-click the jar and add it to the project.

After the Selenium jar has been added, select Add Library and add the Junit 4 Runtime Library.

JDeveloper is now ready to execute Selenium.

Real-World Examples

To find elements with Selenium and Java, use the syntax:

WebElement elementName = driver.findElement(By.LocatorStrategy(“LocatorValue”))

Possible Locator Strategies are:

  • ID
  • Name
  • Class Name
  • Tag Name
  • Link Text
  • XPath

If you use Selector Hub, it will deliver all of the Locator Strategies listed above for you to choose from.

If you do not have Selector Hub, elements can be located directly in the HTML of a web page as shown below.

For this example, the ID “loginForm” can be used to interact with the login section of a page. You can either right-click and select inspect or navigate to developer tools in your browser to view the code.

Again, Selector Hub Plugin makes locating much easier. It’s the recommended approach.

Below is a view of Selector Hub’s results.

There are five Selenium Method Categories to use in automation:

  1. Browser Methods perform actions on a browser (Maximize Window).
  2. WebElement Methods perform actions on WebElements (Click, Type)
  3. Navigation Methods load a web page, refresh a web page, or move backward and forward in the browser’s history.
  4. Wait Methods pause between execution statements.
  5. Switch Methods switch to alerts, windows, and frames. An alert is also known as a pop-up.

Below is an example of Java and Selenium at work.

This image is an example of Java and Selenium for automated testing at work.

Common Problems with Automation

Some common roadblocks that Voya has experienced with automated testing using Selenium and Java are:

  • Timeout issues – Testing in a dev environment can be very slow.
  • Locating correct elements – If Selector Hub doesn’t work, you have to use Selenium IDE to watch it record your steps to find the element.
  • iFrames – When you have multiple windows and pop-ups, it can be difficult to navigate to the correct frame.
  • Manual work still required – Writing the scripts is still part of the process.

Key Takeaways

Voya Financial has already managed to reduce testing time with automated testing with Selenium and Java and is still working to continue the scope of its testing automation. To view a demo of the script/test-case of manually adding an asset, watch this BLUEPRINT 4D session recording from 25:43 to 29:00.

For more Cloud ERP content check out the Quest Content Library. To connect with other Cloud ERP users like those at Voya Financial, consider joining Quest’s Cloud ERP Community.

For more education sessions like the demo above, consider attending a Cloud ERP Quest Events.

Utilizing Selenium and Java for Automated Testing in Cloud ERP