Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Attachment support in scenario testing

Updated on April 8, 2022

Enhance your end-to-end UI testing of run-time scenarios by simulating the user experience of interacting with attachments. When recording scenario tests, you can add and edit files attached to a test case and view the interaction during playback.

To interact with attachments during a scenario test recording, perform the following steps:

Note: You can only add attachments in a scenario test if the attachment field is configured with the pzMultiFilePath control.

  1. Launch App Studio or Dev Studio, based on where you want to perform the test.
  2. Do one of the following to open the automation recorder:
    • In App Studio, on the lower-left side of the screen, click the Test icon.
    • In Dev Studio, on the lower-right side of the screen, toggle the run-time toolbar, and then click the Toggle Automation Recorder icon.
  3. In the Scenario tests pane, click Create test case, and then select the test type:
    • To record a test for a portal, select Portal.
    • To record a test for a case, select Case type, and then select the type of case for which you want to record the test.
      Note: When you select the case type, a new case of that type is created.
  4. Record the steps for the test by clicking the UI elements.
    Result: When you hover over a testable element, an orange highlight box appears. When you click an element, you record an implicit assertion and add the interaction to the list of test steps.
  5. Click Attachments to attach a file to the work object. You can also attach files from Recent attachments, or anywhere that files can be attached from the UI.
    1. To attach a local file, select File from device.
    2. To attach a link, select URL.
  6. Provide the required information and select Submit to attach the file to the work object. Attached files appear on the Files & documents pane on the right side.
  7. Continue recording as many steps as necessary. When you finish adding steps, in the Test case pane, click Stop and save test case.
  8. You can edit attached files by changing the Attachment key in the test case step. To edit the attachment:
    1. Navigate to the test case that you want to edit and select Edit. See Opening a scenario test case for more information.
    2. Identify the step that includes the attachment and select the pencil icon to edit that attachment.
    3. Edit the Attachment key to configure the test case attachment as required.
    4. Click Save step.
    5. Click Save to exit the editor and update the test case.
    Result: The test case appears on the Scenario testing landing page.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us