adobe / adobe/aem-testing-clients

URLs on publish instance do not respect Sling Mapping

Open
#39 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
57
Forks
39
PR merge metrics
No merged PRs in 30d

Description

scenario: we want to to and end-to-end integration test using AEM Testing client involving both author and publish/dispatcher and replication between them. on publish/dispatcher a "multi domain management AEM mapping" is defined similar as described here:
https://helpx.adobe.com/experience-manager/kb/multi-domain-management-aem-mappings-for-url-shortening---aem-6-.html

that means that
* all URLs on publish are shortened (e.g. https://my-publish/en.html instead of https://my-publish/content/mysite/en.html)
* and direct access to the full access is denied (https://my-publish/content/mysite/en.html leads to HTTP 404)

with this setup it's currently not easy possible to write an integration test without hardcoding the short urls in the test. the `CQClient` class has concepts for mapping paths to URLs, but this does not take into account a sling mapping configuration applied on the publish instances testing against. thus when using built-in methods like `CQAssert.assertCQPageExistsWithTimeout` they internally alsways build paths with the full URL and fail.

of course it's not easy for the `CQClient` instance to read out the real mapping configuration form the running AEM instance (esp. because there are multiple ways to configure this, and a mapping config can get really complex). but it would be nice when it can be configured in a simplified way for the integration test similar to configuring the author/publish URLs.

are there any plans/concepts to support this properly?

Contributor guide

Open the contributing guide

Research direction

Start with CQClient's path-to-URL mapping and CQAssert.assertCQPageExistsWithTimeout, then review how author and publish URLs are configured. Define a simplified publish mapping configuration that assertions can use, and verify it with an end-to-end author/publish integration test covering shortened URLs and rejected full paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.