Ask the Expert - Test Automation with Prasad Vadlamudi
Join Prasad in this month's Ask the Expert session on Test Automation!
Meet Prasad: Prasad is a senior product manager for Pega test automation area. He has been working with Pega for about 1.5 years. He owns out of the box unit testing capabilities in Pega platform using PegaUnit framework. He has been managing the demos and workshops across various stakeholders and helping teams to adopt the framework.
Message from Prasad:Hi, PegaUnit is a simple and easy to use framework which improves the speed & quality of your application testing. Please post your doubts, queries related to this area and I will be happy to answer them.
automated test suites within PEGA for testing connections. What are options for efficiently testing connection points as we move through enviornments or add new functionality? Does Pega offer any automated testing functions?
I want to Automate the connections (like Soap) when we move to different environments like (Production) it should automatically test the connection and should display the connection is established successfully.
I gave that link as a general starting point for PegaUnit framework. It was not a reply to your query:-). Sorry about that. Right now we are not providing automation for integrations & advise users to use tools like soap UI or wrap them with data pages / activities and use PegaUnit framework.
There is no course for PegaUnit yet in PDN. We will be launching a course & few demo videos very soon. For now, you may please go through below documentation & in case of any queries/doubts, please approach us and we will be able to help you out.
We have plans to extend PegaUnit framework to cater UI automation (Sections & respective actions). As of now, there is no in-built feature for this purpose. You may leverage flow automation (Using PegaUnit) to verify the results of UI actions in the whole process but as such not the UI components.
Are there future plans to release more PegaUnit test REST calls besides 'pzExecuteTests'? We would like to integrate our Valori Data subsetting and anonimization solution with PegaUnit (and any other Pega Framework). Data subsetting and anonimization isquite a daunting challenging, but mandatory due to government regulations. Automating this process saves a lot of time and will even be beneficial to unittesting.
There are currently don't have any plans to release more REST services which can offer data masking / sub-setting capabilities. Reason behind this is that the test data is tightly coupled with the PegaUnit test cases. One may use the existing service to select which tests to be executed but not with what data they should be executed with. If you referring to something else, please let us know what type of APIs are you looking for and your requirements, so that we can get back more precisely.
If you are referring to the code related to test cases/suites, then it is very much similar to your other rules in Pega. Test case / suites in Pega are nothing but rules. So, the process of RAP, import remains same. The general guidance is to store all test case / test suite rules in a separate ruleset, so that you can restrict shipping of any such test rulesets to environments like production where you don't want your tests to be visible.
I have a scenario where Pega unit test is not working. Please let me know if there is any way to achieve this
I had created the test case using flow .
1. On Submit of a work object 2 assignments are getting created.
2. From review harness , Other Actions -> if we perform recall, the flow is getting rerouted to initial stage.
3. after performing update continue the flow and resolve work object.
After recording the test case and if I run the test case , the work object is stuck at the point of recall and test result is failing as the flow is not able to progress further and other assertions are not working.
Is there a way to progress the flow?
Please Note: Recall functionality is customized in our application
Any customized actions may not work with this framework's current version as it supports only the out of the box local actions & flow actions that are configured as part of the flow or case type. It's a known limitation.
Even if there is no human intervention or the flow doesn't need any inputs from user, we can still go ahead and record a test case using the "Create test case" button that is shown once the flow execution completes.
Hi Prasad - I am currently working on Jenkins CI/CD Pipeline implementation for a Pega project on top of Pega 7.2.2 platform. I have the following questions on Pega Unit Test.
1. Can we use PegaUnit to define test cases for application flows which are built on some Pega Framework say Pega Survey, Pega CPM which might have custom rules like "Question", "Intent" and so on? Or does it only support vanilla Pega application(s)?
2. Does PegaUnit in platform 7.3 provide full end to end coverage of all types of rules? Even for Pega Frameworks?
3. Is there any limitation of PegaUnit for Pega 7.3 platform?
For all PegaUnit supported rules you are creating in your application you can create test cases using PegaUnit framework, irrespective of the applications it is built-on. Flow & Case type rules are supported only in 7.3 version by PegaUnit but not in 7.2.2. As of 7.3, most commonly used rule types are supported but there are other rule types which are yet to be supported. PDN can be referred to know the list of rule types.
When creating a test case for flow/case type rule. There is an OOTB Data transform created for user inputs under the Recorded case section with a shortcut link labelled “View test data”. Is there a way to customise the name used for this Data transform without editing the OOTB activity rule (ID: Save, Ruleset: Pega-AutoTest) during the creation?
There is no way other way to change the auto generated name for the data transform used to store the user inputs. As the activity that generates this name is Pega's internal code, it is not advisable to modify or overwrite it as it may have other impacts during upgrades. Is it that you want to follow your own naming convention for the DT or something else?