Troubleshooting intermittent test failures and slow execution in AEM Cloud Manager

This article explains how to troubleshoot intermittent integration test failures and slow execution times in Adobe Experience Manager as a Cloud Service (AEMaaCS) for Cloud Manager environments. Tests that complete successfully in local environments may fail or take significantly longer to run in Cloud Manager. To resolve the issue, implement retries and review pipeline logs.

Description description

Environment

  • Adobe Experience Manager as a Cloud Service (Cloud Manager environments)
  • aem-cloud-testing-clients 1.2.1

Issue/Symptoms

  • Integration tests intermittently fail or hang due to timeouts when they run in Cloud Manager environments.
  • The same tests consistently pass locally in a significantly shorter time, for example, under five minutes, but take more than 35 minutes or fail in Cloud Manager.
  • Rerunning the pipeline often results in a successful execution without any code changes, indicating inconsistent behavior.
  • Tests typically use com.adobe.cq.testing.client.components.AbstractComponent to create pages and component instances.

Root cause

Transient environment-level conditions in Cloud Manager, such as resource contention or infrastructure variability, contribute to intermittent test failures and extended execution times rather than issues in the test code itself.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Review the test implementation and ensure that functional test cases use polling or retry mechanisms to handle transient conditions in Cloud Manager environments. Refer to best-practice examples such as CQAssert.java, CreatePageIT.java, and CreatePageAdminIT.java for guidance.
  2. Download and review the full logs from both successful and failed pipeline executions in Cloud Manager. Look for patterns, bottlenecks, or specific stages where tests hang or time out.
  3. Compare the same test commit across multiple pipeline runs. If the behavior varies without code changes, this suggests environment-level or infrastructure-related causes.
  4. Monitor and document the frequency and timing of failures to help correlate the issue with platform maintenance activities or resource contention.
  5. If the issue persists, collect updated pipeline execution details and logs for further analysis or to share with Adobe Support.
  6. After implementing polling or retry mechanisms and reviewing the logs, rerun the pipeline to verify whether test execution times and reliability improve.
recommendation-more-help
experience-cloud-kcs-help-kbarticles