Building and Testing Best Practices

Think Like a Robot, Not a Human

In an ideal world, a robot completes the same tasks every day without interruption or fail. However, in the real world, robots sometimes get stuck.

Robots typically get stuck due to the following reasons.

Scenario How to plan for the scenario

A robot doesn't understand an element in a user interface (UI)

Remember that a robot interacts with an application differently than a human does. Build your robot intentionally for the robot's requirements.

For example, many people interact with software using their vision. When people encounter issues, they often click around and troubleshoot to find a way forward. Robots don't have these abilities. A robot can do only what it's programmed to do, nothing more or less. While building a robot, thinking about its actions programmatically, rather than visually, helps you build more effectively.

The UI or HTML for a page changes

The robots in Oracle Integration are continually evolving to better handle these scenarios. Additionally, you can use global targeting in your actions so that you can more quickly update fields when needed.

Think Beyond Robots When Needed

Robots can automate many of your business processes, but remember that robots are just one of many automation technologies that are available to you in Oracle Integration. Choose the right technology for the goal you're trying to achieve.

For example:

  • If you need to insert information into a database or work with an application's APIs in another way, use an integration.

  • If you need to automate decision making, use a decision.

Define Inputs Using Robot Connections

When defining an action's input, such as the URL for a browser, use the values that you defined in a robot connection whenever possible.

Specifying a value one time in the robot connection and pointing to that variable lets you isolate this information. When you need to update the value in the future, you need to update only the robot connection, rather than every robot that uses the connection.

Use the Wait Action for Slow Applications

When the load time for a web page is slower than expected, a robot sometimes can't complete all of its work. For example, the robot might be able to enter data into all the fields but doesn't have time to capture the entered data before the application closes.

The wait action helps a robot work around application latency by pausing the robot's actions and giving the application time to catch up. See Add a Wait Action.

Use a Foreach Loop for Iterative Work

A robot signs in to an application at the beginning of its flow and signs out of an application after it completes it work. However, when a robot must perform many transactions, these repeated sign-ins and sign-outs can impact the performance of your business process.

When a robot must perform work on multiple business objects, allow the robot to iterate over them by using a foreach loop. See Add a Foreach Loop.

Use Page States to Capture UI Possibilities

When a user interface might present several conditions to a robot, use page states to handle the conditions.

To handle each page state differently, use the page in a switch condition. See Work with Page States and Add a Switch Condition.

Future-Proof Your Robots

Don't hard-code data unless you need to. Instead, future-proof a robot by using placeholder values.

See Alternatives to Hard Coding Data.

Keep the Canvas Tidy

You build your robot in the canvas. Keep the canvas organized so that you can find information quickly. For example, use clear names for actions.

For more guidance, see Quick Start for Building Robots.

Create Naming Conventions

When performing UI-based automation, you must provide names for a variety of components, including robots, the environments that the robots run on, and the actions that the robots perform.

The names of some objects, such as robots, robot connections, and environment pools, can include spaces. Other more programmatic objects, such as variables and input parameters, cannot include spaces in their names.

If your organization doesn't have them yet, create naming conventions. Then, follow the conventions so that everyone understands the components at a glance and can update a robot quickly and confidently.

Test in Real-World Conditions

Test a robot early and often using real-world conditions.

See Run and Test a Robot.

Use Screenshots to Help with Testing

When you add an action to a robot, you have several options for capturing screenshots, including capturing a robot's view before and after completing an action. The screenshots are helpful when troubleshooting a failed robot instance.

For example, if a robot's credentials don't have the appropriate access, a robot might not be able to see the field it needs to update. A screenshot of the missing field can help you quickly troubleshoot any issues that the robot encounters in the user interface.

See Capture Screenshots in Robots.