Pre-General Availability: 2024-09-02

Test a Robot on Its Environment

After you finish building a robot, test the robot on its real-world environment by running the robot from within the project.

Prerequisites

  • Specify where the robot runs and activate the robot. See Specify Where a Robot Runs and Activate a Robot.

  • If your organization hasn't updated its allowlist to allow outbound calls to Oracle Integration, the robot agent might not be able to contact Oracle Integration so that it can poll for work, and your robot might not run if you're on a company VPN or wired network. See Review Your Network Configuration.

  • You don't need to design the integration that calls the robot.

Test a Robot in Its Environment:

If the robot is associated with an environment pool that contains multiple environments, you can't choose the environment that the robot runs on. If you want to control this aspect of testing, associate the robot with an environment pool that has only one environment.

  1. Open a project.
    1. In the navigation pane, select Projects.
    2. Select the project name.
  2. In the left toolbar, select Robot Robot.
  3. Run the robot.
    1. In the Robots box, point to an Active robot, select Actions icon, and select Run.

      The Configure and run page appears.

    2. In the Input field, enter or paste the JSON code for the trigger's input.

      To test your robot effectively, you must enter JSON code that matches the values that you defined in the input.

      When the robot runs in the real world, the integration passes this value to the robot. However, you're running the robot independent of its integration, so you must pass this value manually.

      Formatting rules

      • Enclose all code in curly brackets: { }

      • Include a comma after each line.

      • Enclose the property names and the values of strings in quotation marks: " "

      • Enclose the values of collection variables in brackets: [ ]

      • If a value is a string and is part of a collection variable, include the quotation marks within the brackets. For example:

        "Property_Name": ["Value"],

      Sample code: Input with multiple properties

      The input for a robot contains a number of properties, including Department, Name, Activity_Type, and so on, as shown in the following example. You can pass values for these properties to the robot.

      {
        "Department": "Finance",
        "Name": "Travel expenses",
        "Activity_Type": ["Adjustments"],
        "Active": "Yes",
        "Account_Source": ["Travel account"],
        "Tax_Rate_Code_Source": ["Activity"],
        "Activity_Account": "ABCD-123456-789000",
        "searchTask": "manage expenses"
      }

      Sample code: Passing multiple records for an input that is based on a data type with four properties

      The input for a robot is named Invoices and is of the InvoiceType type. The InvoiceType data type contains the following properties:

      • InvoiceNumber
      • SupplierName
      • InvoiceAmount
      • DueAmount

      The input must include the name of the input, the name of its properties, and the values for its properties. If the robot iterates over multiple records, you can pass multiple records to it in the input, as shown in the following example.

      {
        "Invoices": [{
          "InvoiceNumber": "US123456",
          "SupplierName": "Big Computers",
          "InvoiceAmount": 98437,
          "DueAmount": 500.00
        }, {
          "InvoiceNumber": "US234566",
          "SupplierName": "Small, Inc.",
          "InvoiceAmount": 128,
          "DueAmount": 128
        }]
       
      }
    3. Select Run.

      Below Instance ID, the identifier of the robot instance appears.

Next, monitor the robot to verify that it ran as expected.

After verifying that the robot runs successfully in its environment, test the robot with its integration. See Test a Robot and Its Integration.