Skip to content
This repository was archived by the owner on Nov 23, 2021. It is now read-only.

Getting Started

karol.kujawiak edited this page Jul 6, 2016 · 22 revisions

How to write 'hello world' test case?

Do you want to start playing with Bobcat framework? There is no easiest way as start by example. Let’s start and generate project from archetype.

Archetype

In order to generate new project from archetype please type following command in the command line:

//TODO
mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=5-SNAPSHOT

select an archetype you want to generate:

//TODO
1:  -> com.cognifide.qa.bb:bobcat-archetype-bdd (-)
2: -> com.cognifide.qa.bb:bobcat-archetype (-)

select newest available version, e.g. 1.0.0 and define following properties:

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

When the project is successfully created your console should display something like:

[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: bobcat-archetype:1.0.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.cognifde.qa.bb
[INFO] Parameter: artifactId, Value: hello-world
[INFO] Parameter: version, Value: 1.0.0
[INFO] Parameter: package, Value: com.hello.world
[INFO] Parameter: packageInPathFormat, Value: com/hello/world
[INFO] Parameter: package, Value: com.hello.world
[INFO] Parameter: version, Value: 1.0.0
[INFO] Parameter: groupId, Value: com.cognifde.qa.bb
[INFO] Parameter: artifactId, Value: hello-world
[INFO] project created from Archetype in dir: /bobcat-arch-testing/hello-world
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16:56 h
[INFO] Finished at: 2016-07-06T08:50:28+01:00
[INFO] Final Memory: 12M/81M
[INFO] ------------------------------------------------------------------------

Project structure

JUnit Archetype

└───hello-world
 |   └───src
 |       ├───main
 |       │   ├───config
 |       │   │   ├───common
 |       │   │   ├───dev
 |       │   │   └───integration
 |       │   └───java
 |       │       └───com
 |       │           └───hello
 |       │               └───world
 |       │                   ├───feedback
 |       │                   ├───login
 |       │                   └───summer
 |       └───test
 |           ├───java
 |           │   └───com
 |           │       └───hello
 |           │           └───world
 |           │               ├───feedback
 |           │               ├───login
 |           │               └───summer
 |           └───resources
 └───pom.xml

BDD Archetype

Running sample AEM test cases

  1. Edit /src/main/config/integration/instances.properties and provide your AEM instance details,
  2. Edit /src/main/config/common/webdriver.properties and provide your browser details,
  3. Execute following command from the command line:
mvn clean test -Pintegration

First test case

Getting started with Bobcat

  1. Getting started

AEM Related Features

  1. Authoring tutorial - Classic
  1. AEM Classic Authoring Advanced usage
  1. Authoring tutorial - Touch UI
Clone this wiki locally