This content has been archived.

Pega Platform application testing in the DevOps pipeline

Having an effective automation test suite for your Pega® application in your continuous delivery DevOps pipeline ensures that the features and changes that you deliver to your customers are of high-quality and do not introduce regressions.

At a high level, the recommended test automation strategy for testing your Pega applications is as follows:

  • Create your automation test suite based on industry best practices for test automation
  • Build up your automation test suite by using Pega Platform capabilities and industry test solutions
  • Run the right set of tests at different stages of your delivery pipeline
  • Test early and test often

Industry best practices for test automation can be graphically shown as a test pyramid. Test types at the bottom of the pyramid are the least expensive to run, easiest to maintain, take the least amount of time to run, and should represent the greatest number of tests in the test suite. Test types at the top of the pyramid are the most expensive to run, hardest to maintain, take the most time to run, and should represent the least number of tests in the test suite. The higher up the pyramid you go, the higher the overall cost and the lower the benefits.

Ideal test pyramid

Ideal test pyramid

UI-based functional and scenario tests

Use UI-based functional tests and end-to-end scenario tests to verify that end-to-end cases work as expected. These tests are the most expensive to run. Pega Platform supports automated testing for these types of tests through the TestID property in user interface rules. By using the TestID property, you can write dependable automated UI-based tests against any Pega application by uniquely identifying a user interface element.

For more information about the TestID property, see Test ID and Tour ID for unique identification of UI elements.

API-based functional tests

Perform API-based testing to verify that the integration of underlying components is working as expected without going through the user interface. These tests are useful when the user interface changes frequently. In your Pega application, you can validate case management workflows via the service API layer through Pega APIs. For more information about the Pega API, see Getting started with the Pega API. Similarly, you can perform API-based testing on any functionality that is exposed through REST and SOAP APIs.

Unit tests

Use unit tests for most of your testing. Unit tests test the smallest units of functionality and are the least expensive tests to run. In a Pega application, the smallest unit is the rule. You can unit test Pega rules as you develop them by using the PegaUnit test framework. For more information, see PegaUnit testing.

Automation test suite

Use both Pega Platform capabilities and industry test solutions, such as JUnit, RSpec, SoapUI, and so on, to build your test automation suite. When you build your automation test suite, run it on your pipeline. During your continuous integration stage, the best practice is to run your unit tests, guardrail compliance, and critical integration tests. These tests ensure that you get sufficient coverage, quick feedback, and fewer disruptions from test failures that cannot be reproduced. During the continuous delivery stage, the best practice is to run all your remaining automation tests to guarantee that your application is ready to to be released. Such tests include acceptance tests, full regression tests, and non-functional tests such as performance and security tests.

You get the following benefits by running the appropriate tests at each stage of development:

  • Timely feedback
  • Effective use of test resources
  • Predictable pipeline
  • Reinforcement of testing best practices

100% found this useful


Related Content

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.