Last activity: 29 Jul 2022 2:26 EDT
Running the test cases using an Activity
anybody know how to run all the test cases using an activity? Please help
I think you need to create test suit first and then execute them in a batch. Please find the article: https://docs-previous.pega.com/devops/86/grouping-test-cases-suites
When executing the test suite try to trace and understand which activities were involved. Try to analyse them which would give some idea.
Updated: 27 Jul 2022 5:27 EDT
@SHIVANIS5138 , for running Test Suite from activity, you can use OOTB activity pxRunTestSuite in Rule-Test-Suite class by passing the right pzInsKey in the Parameter. You can use the Reference activity pzRunTestSuitesInBatch to see how the above activity is called. Below is the screenshot of where the pzRunTestSuitesInBatch activity is called.
For running all test Cases for your application to check for passed and failed test cases, no need to create Activity unless there is a Business requirement, you can go to the Test Cases Landing page and execute all the test cases for the application. Have attached screenshots on how to navigate to landing page.
@ShintoG9 For a specific business requirement, I need one test suite to run in the background and display the results in an embed section using an OOTB Activity. The selected property in a page list must define which test suite to run.
@SHIVANIS5138 , Okay did you try this OOTB activity pxRunTestSuite in Rule-Test-Suite class by passing the pzInsKey of the Test Suite you want to Execute, in the Parameter suiteInsKey?
@ShintoG9 I did try the steps that you mentioned but wasn't able to come to a result if possible can you provide me with detailed documentation would be of great help!! Thanks
@SHIVANIS5138 , sorry couldn't find any documentation on this. Can you try to debug on the Test Suite Landing Page by selecting One test Suite (Navigation option shown in the above post Picture 1) and trace and check how to call the activity. The Activity that will be executed on the button click Run Selected will be pzRunTestSuitesInBatch and the OOTB activity pxRunTestSuite will be called in one of the Java Step.
Virtusa Consulting Services Pvt. Ltd
Hello @ShintoG9 , As per the steps you mentioned we created an action sett in the run selected button to call the pzRunTestSuitesInBatch and the OOTB activity pxRunTestSuite in the Java Step. It throws an error. I have attached the screenshot below.
Updated: 29 Jul 2022 2:26 EDT
Hello @kajolm72, No Please don't call the Activity in Java Step that for was just for reference to see where it is used. The pxRunTestSuite activity can be called directly by Passing the pzInsKey Parameter. Please see the Screenshots below.
Provide the required Test Suite pzinskey in parameter and Execute
Below are the Tracer Result
Test Suite Result will be in the Clipboard Page TestSuiteRunOutput (the selected TestSuite failed that is the result is failed)
Screenshot of the Test Suite Execution in Landing Page