Sunday, December 24, 2006

Pages 152-4: Organizing and running tests - Test suites


Listen to this article.

Value: Low

Level: Easy

Summary:
You can group test cases together into test suites, letting you run
them all as a group. This is easy to do in Test::Unit. All you have to
do is create a Ruby file that requires test/unit, and then requires
each of the files holding the test cases you want to group.
This way, you build yourself a hierarchy of test material individual
tests, all the tests in a file, group many file in a test suite and
run them as a unit, group test suites into other test suites.
Conventionally test cases are in files named tc_xxx and test suites
are in files named ts_xxx.

Memo: You should group cases that test different sets of functions in
different tests suites.

Example:
# file ts_dbaccess.rb
require 'test/unit'
require 'tc_connect'
require 'tc_query'
require 'tc_update'
require 'tc_delete'


Reported errata (at 10/17/06 14:17:18 PDT): 2
*Erratum #1946 is a minor typo.
*Erratum #1947, see below.

Errata I found: 1
*Erratum #1947 is a wrong erratum reporting: it's supposed to be
present in P1.0 Oct 4 2004, but it's not.

My suggestions to the author: 0

Doubts: 0

0 Comments:

Post a Comment

<< Home