Skip to main content

Unit Tests in Pega Robot Studio

Unit testing is a technique used in software testing to evaluate small, individual units of the source code. The purpose of unit testing is to ensure that the code meets the design requirements by simulating scenarios with specific data sets. This testing method plays a crucial role in the project by contributing to code quality assurance, safeguarding legacy functionality from unintended breakage by new code, and serving as current software documentation. 

Unit tests are designed for the smallest application flow that you can isolate from a complex project. In Pega Robot Studio, these testable parts can be identified by determining the Entry and Exit Points for each automation, along with their associated input/output parameters.  

For example, if the development team is automating the application for an online shop, one of the first tasks is to automate the process of creating an account based on an email address. This automation contains three different possible flows, as shown in the following figure: 

The automation validating an email of a new customer, containing two exit points and two output parameters.

Each automation flow can be reached using various values of the input parameter. A test case is a set of the input parameter values associated with the output parameter values specific for a particular case. The following figure shows the possible test cases created in Pega Robot Studio, that cover all scenarios for this automation: 

Three test cases created for the automation: one for the successful scenario, one for email address empty,  one for incorrect email.

 

Check your knowledge with the following interaction:

 


This Topic is available in the following Module:

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