wttech / aet-cookbook

Apache License 2.0
1 stars 7 forks source link

AET Cookbook

This cookbook prepare virtual machine for Automated Exploratory Tests (AET).

It may be used to quickly create platform for AET demo or to setup an environment for AET development. Required artifacts are downloaded by this cookbook from AET GitHub releases page.

Supported Platforms

Because this cookbook is used for demo instances or development platforms we are not supporting a wide range of platforms. CentOS release 6.8 (Final) is supported currently.

Usage

For demo instance default recipe should be used. For development purpose use aet::_develop and aet::default recipes. The aet::_develop recipe provides additional user used by Maven to upload AET artifacts.

Preparing virtual machine

Include aet in your node's run_list:

{
  "run_list": [
    "recipe[aet::_develop]",
    "recipe[aet::default]"
  ]
}

Using AET

After you have AET instance up and running you could prepare a Maven project to run AET tests. Please refer to the AET documentation on how to setup a test suite.

AET Components

The cookbook installs following components required by AET:

Those components may be installed on separate machines provided they have been configured to work with each other. The configuration is done within Karaf Web Console.

Validation of AET components

HTTP/1.1 404 Not Found
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 1267
Server: Jetty(7.3.0.v20110203)

Recipes

Recipes below are presented in groups. Each group (except common) should be installed on same system.

Common

Active MQ

Recipes:

Apache and AET report web application

Recipes:

Karaf, Browsermob, XVFB and Firefox

Recipes:

Tomcat and Sample Site

Recipes:

Selenium Grid hub

Selenium Grid Firefox node

_develop recipe

Mongo DB

Recipes:

X Window

Recipes:

Attributes

See attributes/ folder for default values.

Hashed passwords

In order to generate hashed password for an user please use following command:

[vagrant@aet-vagrant ~]$ openssl passwd -1 "password"
$1$WxkKLOya$9ZOsQs7YdfjZB1wsaJPkW0
[vagrant@aet-vagrant ~]$

Automated tests with Kitchen

kitchen list command shows list of available suites. Sample test execution might look like this:

berks update
kitchen verify karaf-centos-68

To run all existing tests you cun use this command:

berks update
kitchen test --concurrency 4 --parallel

New version release

Deployment of new versions of this cookbook is managed with Stove. For Ruby on windows you can use Ruby Installer. Chef Supermarket login and key is required for new version deployment.

New version needs to be numeric in form of X.Y or X.Y.Z.

Prepare Stove

Inside the aet-cookbook install bundler:

gem install bundle

Then install gems required by stove (which is already added to Gemfile):

bundle install

Configure your Chef credentials (see stove configuration)

Create new version

  1. Update metadata.rb file to contain the version that should be released (Cookbook Versioning Policy).
  2. Update CHANGELOG.md file: provide version number for unreleased changes.
  3. Commit and push changes. Create a GIT tag with version number i.e. v3.1.0.

Deploy Cookbook

To send the current version of cookbook to Chef supermarket run

stove --no-git --username <your username> --key <path to chef private key>

Update to next version

After cookbook deployment update metadata.rb and CHANGELOG.md files for new development lifecycle.

License and Authors

Authors:

License: Apache License, Version 2.0