Common Automation Framework Engine. Core driver for CloudCAFE
Go to file
OpenDev Sysadmins 86d73baa0e OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:58 +00:00
cafe Merge "Fixed format_exception vs format_exec bug" 2017-02-15 16:54:45 +00:00
docs Change repositories from stackforge to openstack 2015-10-19 22:38:33 +05:30
examples Adds new Brew file runner. 2016-05-10 11:55:20 -05:00
scripts Move parallel runner plugin to core opencafe 2015-05-30 19:00:32 -05:00
tests Merge "Add skipped tests to output of parallel runner" 2016-05-16 15:25:57 +00:00
.gitignore Add .python-version file to .gitignore 2016-05-27 12:02:16 -05:00
.gitreview OpenDev Migration Patch 2019-04-19 19:51:58 +00:00
AUTHORS.md Refresh Some Documentation 2016-07-18 09:37:44 -05:00
HACKING.rst Change repositories from stackforge to openstack 2015-10-19 22:38:33 +05:30
LICENSE Fixing a couple copyright lines 2014-05-15 21:53:20 -05:00
MANIFEST.in Modernize setup.py and add wheel support 2015-10-11 22:15:08 -05:00
README.rst Refresh Some Documentation 2016-07-18 09:37:44 -05:00
doc-requires Adding sphinx documentation starter 2013-12-13 14:25:19 -06:00
setup.cfg Modernize setup.py and add wheel support 2015-10-11 22:15:08 -05:00
setup.py Increments version number for release. Removes temporary setuptools version restriction 2017-01-11 14:03:01 -06:00
test-requires Adds new Brew file runner. 2016-05-10 11:55:20 -05:00
tox.ini Add Python 3.5 to tox.ini for test runs 2016-05-11 12:29:30 -05:00

README.rst

Open CAFE Core

( (
   ) )
 .........
 |       |___
 |       |_  |
 |  :-)  |_| |
 |       |___|
 |_______|
=== CAFE Core ===

OpenCAFE, the Open Common Automation Framework Engine, is designed to be used as the base for building an automated testing framework for API and other (non-UI) testing. It is designed to support all kinds of testing methodologies, such as unit, functional and integration testing, using a model-based approach. Although the engine is not designed with performance or load testing in mind, as it prioritizes repeatability and (verbose) logging over performance, it can be used to that end.

Installation

Source code is available at https://github.com/openstack/opencafe

Supported Operating Systems

Open CAFE Core has been developed primarily on and for Linux, but supports installation and execution on BSD and other *nix's, as well as OS X and modern Windows. It can be installed from pypi via pip or from source.

It is recommended that you install OpenCAFE in a python virtualenv.

From pypi via pip

$ pip install opencafe

From source

$ git clone https://github.com/openstack/opencafe.git
$ cd opencafe
$ python setup.py install

Post-install Configuration

Post-install, the cafe-config cli tool will become available. It is used for installing plugins and initializing the engine's default .opencafe directory.

Initialization

OpenCAFE uses a set of default locations for logging, storing test configurations, test data, statistics, and the like; all of which are set in, and read from, the engine.config file (in order to make it easy for the end user to override the default behavior). The engine.config file, and the directories it references, can be created on demand by running:

cafe-config init

This will create a directory named .opencafe in the user's home directory, or in the case of a python virtualenv, in the virtualenv root folder.

Installing Plugins

The cafe-config plugins command is used to list and install plugins.

Example:

$ cafe-config plugins list
=================================
* Available Plugins
  ... elasticsearch
  ... http
  ... mongo
  ... pathos_multiprocess
  ... rsyslog
  ... skip_on_issue
  ... soap
  ... ssh
  ... sshv2
  ... subunit
  ... winrm
=================================

$ cafe-config plugins install http
=================================
* Installing Plugins
  ... http
=================================

Package Structure Overview

cafe.common.reporting

Provides tools for logging and reporting. This namespace should be used by plugins to add logging and reporting features.

cafe.configurator

Used by the cafe-config cli tool for setting up new installations of opencafe.

cafe.drivers

Houses various test runner wrappers and supporting tools. This namespace should be used by plugins to add new test runner support.

cafe.engine

Includes the base classes that OpenCAFE implementations will use to create behaviors, configs, clients and models. This namespace should be used by plugins to add new clients.

cafe.resources

Deprecated. Historically contained all modules that reference external resources to OpenCAFE. Currently acts only as a namespace for backward compatability with some plugins.

Terminology

Following are some notes on Open CAFE lingo and concepts.

  • Implementation

    Although the engine can serve as a basic framework for testing, it's meant to be used as the base for the implementation of a product-specific testing framework.

  • Product

    Anything that's being tested by an implementation of Open CAFE Core. If you would like to see a reference implementation, there is an Open Source implementation based on OpenStack.

  • Client / Client Method

    A client is an "at-least-one"-to-"at-most-one" mapping of a product's functionality to a collection of client methods. Using a REST API as an example, a client that represents that API in CAFE will contain at least one (but possibly more) method(s) for every function exposed by that API. Should a call in the API prove to be too difficult or cumbersome to define via a single client method, then multiple client methods can be defined such that as a whole they represent the complete set of that API call's functionality. A client method should never be a superset of more than one call's functionality.

  • Behavior

    A behavior is a many-to-many mapping of client methods to business logic, functioning as compound methods. An example behavior might be to POST content, perform a GET to verify the POST, and then return the verified data

  • Model

    A model can be many things, but generally is a class that describes a specific data object. An example may be a collection of logic for converting an XML or JSON response into a data object, so that a single consumer can be written to consume the model.

  • Provider

    This is meant to be a convenience facade that performs configuration of clients and behaviors to provide configuration-based default combinations of different clients and behaviors.