As the title says, we use Pega extensively, and was wondering, whether it is possible to implement TDD in the same fashion as .NET or Java.
1 Answers
It depends on version of Pega platform you are using.
Prior to Pega 7.2.2 test cases used to be created through running a Rule and recording Clipboard state before and after Rule run. Initial state recorded was used to setup environment for every test case run, final state recorded was assumed as expected reference state to get after each run. There was no convenient way to configure this.
As so, it was impossible to implement TDD using built-in Pega test case capabilities, because you had to implement your rule completely before creating a test case for it.
In Pega 7.2.2 you can manage the way environment is set up for a test case run and assertions made. But be aware that Pega test cases still lack rule dependency isolation, thus you cannot test a Rule in isolation.
We are using Pega extensively as well, so given aforementioned restrictions we decided to create our own testing framework for Pega.
The problem of unit testing Pega applications I've described in more details in the following article.
https://www.linkedin.com/pulse/gaining-confidence-comprehensive-continuous-pega-7-unit-lutay

- 41
- 3