My favorites | Sign in
Project Logo
                
Search
for
Updated Dec 10, 2008 by b.goodspeed
RCorOverview  
RCor Overview

RCor Overview

Here are details about the commands available, default variables, conventions, usage and reporting.

System Details

RCor operates on instrumented HTML files according to the following pseudo-grammar:

So by that grammar the following html snippet:

<p concordion:assertEquals="getGreeting()">Hello World!</p>

can be decomposed thusly:

Here are the COMMANDs available in RCor:

  • set : used to set variables in the RCor machine.
  • assertequals : used to compare an RCor variable to a value provided by the spec: specifically TAG_CONTENT.
  • verifyrows : used to automate instrumentation of assertequals.
  • execute : used to invoke the system under test through the fixture.

RCor behavior:

  • default variable #TEXT : the string inside a tag instrumented with concordion, TAG_CONTENT.
  • lookahead : looking ahead in the spec to reference variables before they are bound. More precisely, a variable in STATEMENT may be bound in TAG_CONTENT.

RCor provides a base class for fixtures:

  • ConcordionTestCase : used as a base class for fixtures, adds test method to the fixture to make it behave like a test case.
  • a convention by which specifications can be found from a fixture name.

Usage

RCor generally requires two input files to produce each output report:

RCor is generally invoked as part of an automated build, typically with Rake:

  • RCOR_OUTPUT_DIR : environment variable directing the output directory for test reports created by RCor.
  • build integration : because RCor tests mimic ruby unit tests, it is simply a matter of adding the RCor tests to the suite of unit tests already being invoked.
  • # example build environment that will run RCor specs along with regular unit tests
    require 'test/unit'
    require 'rcor' 
    
    Dir['*_test.rb'].each do |test| # find all the tests matching a certain naming convention
      require test # this adds the test to the suite
    end

Sign in to add a comment
Hosted by Google Code