We are using Pega Tool for Developing a business process. Wondering can we write an Automated unit Test cases in Pega Tool? I have also referred to Pega PDN but not really how this can be achieved.
4 Answers
There is a specialized Pega development toolset called Ninja which has advanced unit testing component.
It provides capabilities comparable to, say, Java unit testing:
- Mocking and stubbing
- Test suites
- Build server integration
- Isolation control
- Code reuse
https://www.linkedin.com/pulse/gaining-confidence-comprehensive-continuous-pega-7-unit-lutay
More on Ninja tools: https://pegadevops.com
Disclaimer: I'm on the Ninja team.

- 11,718
- 21
- 43
- 52

- 632
- 1
- 7
- 17
UI components have developer configurable test IDs attributes - data-test-id='20140827063825457' - that a web driver tool like selenium with Java or RSPEC with Ruby can access to perform UI driven testing of a Pega work process.
Another approach, or in combination with UI driven testing, is url invocation of Pega Rest Process APIs to create and drive processes.

- 1
- 1
-
Tim : Appreciate your time. Can you please elaborate more or provide any link for more references – Rupesh Shinde Jul 07 '16 at 16:09
Here is some additional information from Pega's PDN.
More on test IDs: https://pdn.pega.com/release-note/add-test-id-unique-identification-ui-elements-during-testing
More on Automated unit tests for Data Pages: https://pdn.pega.com/automated-unit-testing-data-pages/automated-unit-testing-data-pages

- 21
- 4
As suggested, we use Ninja for Unit testing. But for UI automation testing, we depend on Selenium (Some use RSpecs as well) based test frame work.
We write our own UI automcation tests and the tough part is to identify the XPaths for UI elements. Here as said, there is a chrome extension we use which leverages PEGA provided data-test-id, data-node-id etc. for XPath generation. You might be interested to try :
Link: PEGA XPath Builder

- 1
- 1