Introduction
In the first part of our test automation blog series, we explored why test automation is essential for AEM as a Cloud Service (AEMaaCS), where continuous delivery and shared code ownership simply make manual testing inefficient. We covered the four pillars of a robust testing strategy:
- Unit tests to catch backend bugs early
- UI tests to protect the end user and authoring experience
- Lighthouse tests to ensure great frontend performance and SEO
- Backend performance tests to validate scalability
With these foundations in place, in the second part, we'll focus on automating test execution and reporting, turning strategy into action. First, we'll discuss which tooling options are available for writing and executing different types of tests in AEMaaCS. Then, we'll check which automation options are available in Cloud Manager. Finally, we'll demonstrate how to get this type of automation in place using Adobe Developer Console, Cloud Manager Events, GitHub Actions, and a few lightweight services running on AWS.
Key points
Modern AEMaaCS development requires not just writing tests, but also executing them automatically within the deployment pipeline. Several tools and integrations are available to support unit, UI, performance, and Lighthouse testing at every stage of delivery.
Unit Testing should be implemented using JUnit, with AEM Mocks preferred for mocking AEM-specific APIs and Mockito as a complementary tool. These tests should run with every build to maintain high coverage and fast feedback. While Adobe enforces a 50% code coverage threshold, aiming for 80% or more is strongly recommended. Integrating SonarQube (Adobe’s or a custom instance) with pull request decoration helps block deployments triggered from non-compliant code.
UI Testing is supported directly within Cloud Manager pipelines using frameworks like Cypress, Playwright, or Selenium. Although Adobe recommends Cypress, many teams find Playwright more modern and faster. Due to Cloud Manager's slower pipeline runtimes, UI tests can also be run more efficiently through external CI/CD systems like GitHub Actions.
Lighthouse Testing (referred to as Experience Audit in AEMaaCS) is built into the Cloud Manager pipeline and offers fast, configurable performance and SEO checks. These can be supplemented or replicated using third-party tools, provided the infrastructure remains consistent across runs to ensure reliable comparisons.
Performance Testing of backend services is partially handled by Cloud Manager, which runs out-of-the-box load simulations during production deployments. However, these don’t test custom code. To validate custom APIs and backend logic, teams should implement their own performance tests using tools like K6, JMeter, or Gatling, ideally integrated into CI pipelines such as GitHub Actions. K6, in particular, is a good choice for its simplicity and CI/CD compatibility.
To integrate custom test tools with Cloud Manager workflows, teams can use Cloud Manager Events. By enabling events via the Adobe Developer Console and configuring webhooks (e.g., AWS Lambda, Adobe I/O Runtime), test automation can be triggered in response to pipeline lifecycle events. This setup allows seamless execution of custom test tools at various deployment stages.
Automated testing is only as valuable as its execution. With tools like GitHub Actions, AWS Lambda, and Cloud Manager Events, teams can create powerful test automation pipelines tailored to their stack. This approach not only ensures reliability but also builds a culture of fast, informed decision-making. Integrating these tools from day one transforms testing from a checkbox into a continuous quality driver, supporting faster releases without compromising confidence or control.