test-module/
The test project (add your tests there)
Do not modify following files
pom.xml
Builds and executes the test Docker imageDockerfile
Builds test Docker image compatible with AEMaaCSwait-for-grid.sh
Bash script helper to check Selenium readiness in the Docker imagedocker-compose-wdio-*.yaml
Docker compose files to demo the Docker image with Selenium Docker imagesassembly-ui-test-docker-context.xml
Packages test project for AEMaaCS
- Maven
- Latest version of Chrome and/or Firefox browser installed locally in default location
- An AEM author instance running at http://localhost:4502
- Sample application deployed on your AEM author instance (see ../README.md)
mvn verify -Pui-tests-local-execution
- After execution, reports and logs are available in
target/reports
folder
Parameter | Required | Default | Description |
---|---|---|---|
AEM_AUTHOR_URL |
false | http://localhost:4502 |
URL of the author instance |
AEM_AUTHOR_USERNAME |
false | admin |
Username used to access the author instance |
AEM_AUTHOR_PASSWORD |
false | admin |
Password used to access the author instance |
AEM_PUBLISH_URL |
false | - | URL of the publish instance |
AEM_PUBLISH_USERNAME |
false | admin |
Username used to access the publish instance |
AEM_PUBLISH_PASSWORD |
false | admin |
Password used to access the publish instance |
SELENIUM_BROWSER |
false | chrome |
Browser used in the tests (chrome or firefox ) |
HEADLESS_BROWSER |
false | false |
Set headless mode of the browser |
Run tests on local headless firefox, targeting a custom AEM author instance:
mvn test \ -Plocal-execution \ -DHEADLESS_BROWSER=true \ -DSELENIUM_BROWSER=chrome \ -DAEM_AUTHOR_URL=http://my-aem-author-instance.com \ -DAEM_AUTHOR_USERNAME=testuser \ -DAEM_AUTHOR_PASSWORD=aVVe5om3
This project also provides Maven profiles to build and execute the tests using Docker
- Maven
- Docker and
docker-compose
- An AEM author instance running at http://localhost:4502
mvn clean package -Pui-tests-docker-build
will build Docker image com.adobe.cq.cloud-com.adobe.cq.cloud.testing.ui.wdio.tests/ui.tests
locally
Remarks
- Following commands will start a Docker service with both the cloud tests and a Selenium server (using official Docker images)
- Parameters described above also apply for Docker use case
Example, your instance is available at http://localhost:4502):
mvn verify -Pui-tests-docker-execution -DAEM_AUTHOR_URL=http://host.docker.internal:4502
host.docker.internal
is a Docker convention, do not change it!
Example, you have an AEM as a Cloud Service deployment with author instance available at https://author.my-deployment.com:
mvn verify -Pui-tests-docker-execution -DAEM_AUTHOR_URL=https://author.my-deployment.com
⚠ Default tests provided in this module require sample content (module
ui.content
) to be installed in your AEMaaCS deployment!