AEM provides a framework for automating tests for your AEM UI. Using the framework, you write and run UI tests directly in a web browser. The framework provides ajavascript API for creating tests.

The AEM test framework uses Hobbes.js, a testing library written in Javascript. The Hobbes.js framework was developed for testing AEM as part of the development process. The framework is now available for public use for testing your AEM applications.

When opening the console, the Test Suites are listed to the left along with an option to run all of them sequentially. The space to the right shown with a checkered background, is a placeholder for showing page content as the tests run.

Running a Single Test Suite

Tests Suites can be run individually. When you run a Test Suite, the page changes as the Test Cases and their Actions are executed and the results appear after completion of the test. Icons indicate the results.

A checkmark icon indicates a passed test:

An "X" icon indicates a failed test:

To run a Test Suite:

In the Tests panel, click or tap the name of the Test Case that you want to run to expand the deatils of the Actions.

Click or tap the Run test button.

The placeholder is replaced with page content as the test executes.

Review the results of the Test Case by tapping or clicking the description to open the Result panel. Tapping or clicking the name of your Test Case in the Result panel shows all details.

Running Multiple Tests

Test Suites execute sequentially in the order that they appear in the console. You can drill down into a test to see the detailed results.

On the Tests panel, tap or click either the Run all tests button or the Run tests button below the title of the Test Suite that you want to run.

To view the results of each Test Case, tap or click the title of the Test Case. Tapping or clicking the name of your test in the Result panel shows all details.

Creating and Using a Simple Test Suite

The following procedure steps you through the creation and execution of a Test Suite using We.Retail content, but you can easily modify the test to use a different web page.