QA/TCM/BDD

From MozillaWiki
< QA‎ | TCM
Revision as of 17:08, 13 December 2010 by Camd (talk | contribs) (→‎Requirements)
Jump to navigation Jump to search

Summary

The new Test Case Management (TCM) system is broken into two main parts:

  • Back-end REST interface written in Java
  • Front-end GUI interface written in Python and Django

We chose Behavior Driven Development (BDD) as the general approach to our automation. For REST endpoint tests, we chose a Python Framework called Lettuce. For UI automation, we will use Selenium in one fashion or another, ideally controlled by Lettuce as well.

Mission

Goals

  1. Automate as much functionality as possible and practical
  2. Automate in a way that it's easy to determine what each test case covers


Requirements

  • Python 2.6 or later
  • Lettuce 0.1.15
  • Numpy 1.2.1

Setup

I use a custom installation of Lettuce.  The main version of Lettuce doesn't support HTML output yet.  So I have a custom fork or the code that provides this support.  It is available here:
https://github.com/camd/lettuce/tree/html_output

To install this package, check out the source code locally, then do the following:

$ cd lettuce
$ python setup.py install


Checkout the tests from here: https://github.com/mozilla/tcm

I also (for now at least) use an additional package called numpy:

$ pip install numpy

Running the tests

cd to the parent of the /features directory

$ cd tcm/tests/bdd

To run the tests with text output

$ lettuce

To run the tests with HTML output

$ lettuce -v 5 > tcmout.html

Then load that file into the browser of your choice. However, if you don't use Firefox or Minefield, then you may experience accelerated tooth decay, so please choose wisely.