Skip to main content

Creating a robotic test solution for Citrix

6 Tasks

30 mins

Pega Robotic Automation 19.1
Visible to: All users
Intermediate
Pega Robotic Automation 19.1
Robotic Process Automation
English

Scenario

The client company ABC Enterprises needs a Citrix Robotic solution that allows users to manage their legacy applications. Create a test solution to verify you can connect to Citrix with your current architecture. Then, create a local Windows Form as well as a Windows Form within your new Citrix context. Develop an automation to test the communication between the two forms and test this solution on your local machine. Update the runtime configuration files to make sure deserialization errors do not occur. Finally, test the solution locally to ensure it works as expected.

Note: Because of the technical limitations in providing a real training environment, these challenges guide you to think through testing the Citrix configuration before actual robotic solution development. The values and configuration settings provided in the steps do not connect to servers and act only as examples in the challenges.

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Challenge Walkthrough

Detailed Tasks

1 Configure the Runtime configuration file

  1. On the Windows Taskbar of the development machine, left-click the Start button, and then select File Explorer. The File Explorer window is displayed.
  2. At the top of the folder, click the file path to highlight the path, and then navigate to the installation directory to locate the Runtime configuration file within the installation folder. For this example, navigate to the following folder:

    Program Files (x86) > Pegasystems > Pega Robot Studio Plug-In

  3. Right-click to open the object menu and select the RuntimeConfig.xml file.
  4. In the object menu, click Edit with Notepad++ to open the configuration file. 
  5. Within the file, locate the IgnoreRuntimeDeserializationErrors section within the file, and then update the value to True.
    deserialize errors
  6. In the upper left of the Notepad++ toolbar, click the Save icon.
  7. Close the RuntimeConfig.xml file.
  8. In File Explorer, copy and paste %appdata%/Pegasystems into the file path to open the AppData/Roaming/Pegasystems directory.
  9. If the Runtime configuration file is present, repeat steps 3-5 to update the file.
    runtime config present
Note: You do not have to continue if the Runtime configuration file is not present in this directory because Robot Studio copies the most recent version once the solution has been run.

2 Create your Project solution and local Windows Form

  1. On the Windows Taskbar on your client machine, click the Start icon, and then select the Pega Robot Studio or Visual Studio icon to launch your development environment.
  2. In the upper-left corner, click File > New > Project to create an empty Pega Robotic Automation project.
  3. In the Name field, enter CitrixCommunicationTest for the name, and then click OK to create the new solution.
  4. In the Solution Explorer, right-click the CitrixCommunicationTest project, and then select Add > New Windows Form.
    new local windows form
  5. In the Name field, enter Local.os and click Add to add the form to the project.
  6. In the Object Explorer, click the Local.os form to select the local form. 
  7. Below the Object Explorer, click the Properties tab to configure the local form.
  8. In the Text field, enter Local Form.
    edit text local form
  9. On the left side of Robot Studio, click the Toolbox tab.
    toolbox tab
  10. In the list of All Windows Forms controls, click and drag Button to the local Windows Form.
  11. On the form, click the button object to select it and open the Properties form.
  12. In the Properties form, enter the following values to configure the local form:
    • In the Text field, enter Red.
    • In the Name field, enter btnRed.
    • update button names
  13. Repeat steps 7-12 to create an additional button with the following values:
    • In the Name field, enter btnBlue.
    • In the Text field, enter Blue.
      local form finished
  14. In the upper-left corner of Robot Studio, click File > Save All to save your changes.

3 Create and configure Citrix context for testing locally

  1. In the Solution Explorer, right-click the CitrixCommunicationTest, and then select Add > New Context > Citrix to add a new Citrix context to the solution.
    new citrix context
  2. In the Object Explorer, select the CitrixContext1 file.
  3. Click the Properties tab to configure the context.
  4. In the Debug section, to the right of Run Local, select True to ensure that the project is prepared for local deployment.
    set run local property true

4 Add a Windows Form to Citrix context

  1. In the Solution Explorer, right-click the Citrix context, and then select Add > Windows Form.
    add citrix to windows form
  2. In the Name field, enter Server.os.
  3. Click Add to add the form the project.
  4. Select the Windows Form, and then navigate to the Toolbox tab on the left side of Robot Studio. 
  5. In the list of All Windows Forms controls, click and drag Label to the server Windows Form.
    add label to windows form
  6. Select the label object.
  7. Click the Properties tab.
  8. In the Properties form, enter the following values to configure the server form:
    • In the Text field, enter Test Label.
    • In the Name field, enter testLbl.
      edit citrix form 2
  9. In the list to the right of the AutoSize field, select False to allow the ability to resize the label.
    autosize label
  10. In the Design Form of the Server.os, click and drag the corners of the label to increase the size to fill the server Windows Form.
    label on windows form
  11. In the upper-left corner of Robot Studio, click File > Save All to save your changes.

5 Create a test automation

  1. In the Solution Explorer, right-click the CitrixCommunicationTest project, and then select Add > New Automation to add a new automation context to the local context of the solution.
    Note: In this example, you are creating an automation that can use the buttons established in the local Windows Form, therefore you must design the automation in the local context.
    add new automation citrix
  1. In the Name field, enter TestAutomation.os.
  2. Click Add to add the new automation to the project.
  3. In the Object Explorer section on the right, click the Local.os object.
  4. Right-click the Local.os object, and then select Expand All to display the buttons. 
  5. Repeat steps 4-5 to expand the Server.os form and display the label object.
  6. Under the Local.os object, click btnRed to select the Red button.
    select btn red
  7. In the Object Inspector of the btnRed section under the Object Explorer, click the lightning bolt icon to display events for that object.
    object inspector btnRed
  8. Select the click event, and then drag it to the automation surface.
  9. In the Object Inspector of the testLbl section under the Object Explorer, click the wrench icon to display the properties for that object.
  10. Click and drag the BackColor property to the automation next to the btnRed form click event to add it to the automation.
    btnRed and red label
  11. In the testLbl Properties box located next to the btnRed button, click the down arrow to display a color swatch.
    btnRed and new blank label
  12. From the color swatch, select a Red box to set the property.
    add red to btn testLbl
  13. Click the connector point on the btnRed click event and draw a line to the label next to it to connect the two.
    btnRed connected
  14. Repeat steps 5-14 to create another automation that connects the btnBlue click event to a blue label. Your automation must resemble the following image:
    finished automation 2
  15. In the upper-left corner of Robot Studio, click File > Save All to save your changes.

6 Verify solution on local machine

  1. In the toolbar of Robot Studio, click Start to begin the debugging process.
    debug start button
  2. Click OK to acknowledge that you are running the solution locally.
    citrix run in loca lmsg
  3. Move the Local Form dialog box to the side of the Server Form.
  4. In the Local Form dialog box, click Red and verify that the background color displayed in the Design Form dialog box is red.
    change label to red
  5. Repeat step 3 to verify that the background color changes to blue when you click Blue.
    change label to blue


Available in the following mission:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice