Discussion

98
Views
Rajesh Venkata (batcv)
PEGA
Principal Cloud Development Engineer
Pegasystems Inc.
IN
batcv Member since 2015 4 posts
PEGA
Posted: January 4, 2021
Last activity: January 4, 2021
Posted: 4 Jan 2021 13:13 EST
Last activity: 4 Jan 2021 15:39 EST

Attachments support in scenario testing

Scenario testing supports attachments in application from PRPC 8.5 and above with the help of “Pega Test Automation Kit” component available at ( https://community.pega.com/marketplace/components/pega-test-automation-kit ), Once download the latest scenario test component from URL and add to current application, If attachments are configured in application with “pzMultiFilePath” control then With this control help can attach either single or multiple files in scenario testing. Also, can modify/add new attachment keys at scenario test case step level to attach multiple new files.

 

We can simply attach a file in application with usual flow during scenario test recording. Below are some simple screen shots where we try to attach a file to work object during scenario test recording and same file is attached during scenario test run time automatically.

Example here illustrates a scenario for attachment through “Attachments” gadget in work object.

Click on “Add link -> File from device” from “Attachments” gadget in work object.

 

select file from device

 

Click “Select file” and attach file from system popup.

select file from system

Click on “Attach” button to attach file to work object. We can observe on right side pannel of scenario test attachment steps are recorded as separate steps for each action.

click attach button

After attaching the file, user can perform any other actions during recording and add multiple steps in scenario test case.

All steps will be taken care during scenario test run time. That means, during run time scenario test automatically attach the files to work object at the attachment step and goes to next steps to execute.

We can also modify the attached file by changing the attachment key in the test case step so that during run time changed attachment key related file is attached to work object.

Click on edit the test case from select test case option in the right panel of scenario testing, go to the attachment step and click on pencil icon to edit the step.

Below is the screen shot where we can modify/add new attachment key.

modify test case step

Once we modify the attachment key, from next run on words new attachment files will be attached to the work object atuomatically.

Note: Above attachment keys are from the class “Data-WorkAttach-File” as shown in the key itself in the image.

Above explanation is for single attachments, similarly we can also attach the multiple files by adding more keys in the “Attachments” section in edit option of the test case step. Scenario test will take care of all multiple attachments at run time and attach to work object.

 

Similarly, wherever the attachments possible to work objects by using the “pzMultiFilePath” control scenario test will take care of all these attachments at run time to attach files to work object.

 

***Edited by Moderator Marissa to add the Developer Knowledge Share tag***
Pega Platform 8.5.1 DevOps Testing Applications Developer Knowledge Share