Skip to content

headwirecom/aem-selenium-automation-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AEM Test Framework

Installation

To use the framework in a maven project, first you must connect to the CQ Blueprints Maven Repository and add the following dependencies:

<dependency>
    <groupId>com.cqblueprints.testing</groupId>
    <artifactId>test-framework</artifactId>
    <version>0.6.0</version>
</dependency>

The jar file can be downloaded dirctly here

Test Environment Setup

The framework loads the test environment from a json file. The structure of the file is as follows:

{
  "authorUrl" : "http://localhost:4502",
  "publishUrl" : "http://localhost:4503",
  "testUser" : "admin",
  "testPassword" : "admin",
  "version" : "6.3",
  "browser" : "firefox",
  "proxyEnabled" : "true"
}

By default, the framework will use a settings.json file located in the root directory of the project. Alternative locations for the file can be specified by using the TestEnvironmentLoader:

The authorUrl and publishUrl parameters point to the instance under test and the user and password refer to a user with the correct ACL to create, edit, and delete pages under the test page path. The confguration also contains the version of AEM being tested. Valid values for browser are firefox, chrome, ie and html. HTML is a headless version of a browser and is a quick way to run tests if an actual browser is not required. The last settings parameter determines if a browsermob-proxy will be set up to intercept requests. A value of a "true" will configure the proxy and apply BASIC authentication to requests so the tests will not need to log in. Additional information on the proxy can be found here

Usage

The testing framework uses JUnit and follows the same conventions for writing tests. To begin using the built in functionality, the test should extend the TestBase class and use the provided page objects which expose high level AEM functions that will simplify test writing and reduce the need to use low level selenium in your test cases.

The TestBase uses the environment variable to setup and instantiate the WebDriver. A proxy is loaded and connected to the WebDriver which will add authentication info to each request and collects performance data.

More Information

The project is hosted by cqblueprints and more information can be found on their site

Examples

More examples can be found in the aem-selenium-automation-examples project

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages