This project is Maven archetype for Bobcat using BDD tests with support for AEM. It contains tests examples and page object ready to use in AEM .
- JDK 8
- Maven 3
mvn archetype:generate \
-DarchetypeGroupId=com.cognifide.qa.bb \
-DarchetypeArtifactId=bobcat-archetype-aem-bdd \
-DarchetypeVersion=1.0.0 \
Example properties for archetype
Define value for property 'groupId': : com.cognifde.qa.bb
Define value for property 'artifactId': : hello-world
Define value for property 'version': 1.0-SNAPSHOT: : 1.0.0
Define value for property 'package': com.cognifde.qa.bb: : com.hello.world
└───hello-world
| └───src
| ├───main
| │ ├───config
| │ │ ├───common
| │ │ ├───dev
| │ │ └───integration
| │ ├───features
| │ │ ├───components
| │ │ └───login
| │ ├───java
| │ │ └───com
| │ │ └───hello
| │ │ └───world
| │ │ ├───hooks
| │ │ ├───pageobjects
| │ │ │ ├───feedback
| │ │ │ └───login
| │ │ └───steps
| │ └───resources
| └───test
| └───java
| └───com
| └───hello
| └───world
└───pom.xml
Test cases written in Gherkin are in features in directory:
└───hello-world
| └───src
| ├───main
| │ ├───features
BDD project contains also runners for Gherkin scenarios:
| └───test
| └───java
| └───com
| └───hello
| └───world
Package com.hello.world.steps for steps implementation:
└───hello-world
| └───src
| │ ├───java
| │ │ └───com
| │ │ └───hello
| │ │ └───world
| │ │ └───steps
There is also special place for hooks (com.hello.world.hooks) - actions to be executed before and after tests execution (e.g. browser window maximize):
└───hello-world
| └───src
| │ ├───java
| │ │ └───com
| │ │ └───hello
| │ │ └───world
| │ │ ├───hooks
Instruction is the same regardless of a project archetype:
- Edit /src/main/config/integration/instances.properties and provide your AEM instance details,
- Edit /src/main/config/common/webdriver.properties and provide your browser details,
- Execute following command from the command line:
mvn clean test -Pintegration