This directory contains the Autotest (part of Autoconf) testsuite for
ncml_module.  We are deprecating the use of DejaGNU (as exists in
../bes-testsuite) for the ncml_module (as of 4 Aug 2009) and
preferring the use of this testsuite. 

@author mjohnson <m.johnson@opendap.org>

----------------------------------------------------------------------------
CONTENTS

	* HOW IT WORKS
	* AUTOTEST MACROS FOR BES DAP RESPONSES
	* CREATING BASELINES
	* TODO AND KNOWN ISSUES

----------------------------------------------------------------------------
HOW IT WORKS

The main Autotest macro file is testsuite.at which is processed by
Makefile.am for the 'make check' target.  This runs autom4te to create
the actual "./testsuite" shell script that does the testing.  Note
that testsuite also includes "atconfig" and "atlocal" which are
auto-generated by ../configure.ac and by the Makefile.am from
atlocal.in respectively.  Also, the "package.m4" is auto-generated by
Makefile.am from the ../configure.ac for the package.

The file testsuite.at contains a set of macros that help with doing
the standard "run the besstandalone on a given file for a given DAP
response and compare the output to a baseline file" tests that are
done in the old DejaGNU bes-testsuite. 

The standard recipe to test the DAP responses for a test file $testfile:

    * Create a baseline file for each tested $response type of the form
      ./baselines/$testfile.$response

    * Add the appropriate macros calls to testsuite.at to run the
      besstandalone test and compare the output to the baseline

Note that other new tests can be added, such as running CPPUnit harnesses,
etc.

----------------------------------------------------------------------------
AUTOTEST MACROS FOR BES DAP RESPONSES

There is a macro for each response (AT_CHECK_DAS, AT_CHECK_DDS,
AT_CHECK_DDX, and AT_CHECK_DATADDS), or the tester can use the
AT_CHECK_ALL_DAP_RESPONSES to run all four of the previous macros.
The testsuite runs besstandalone on the given NCML filename given as
the only arg of the macro (only use the basename of the file) for the
requested response type ("das", "dds", "ddx", "dods") by creating a
temp "test.bescmd" file from "template.bescmd.in" and then processing
it.  It compares the stdout of this call to an expected file
"baselines/$filename.$response" where $filename is the basename of the
tested NCML file (e.g. "fnoc1_explicit.ncml") and $response is the DAP
response (one of {"das"|"dds"|"ddx"|"dods"}),  

----------------------------------------------------------------------------
CREATING BASELINES

In order to simplify the creation of baselines, there is a script
"./generate_baselines.sh" which can be run in this directory.  Its
only argument is the basename of an NCML file which is assumed to
exist in "../data/ncml".  It simply runs the besstandalone on the
local ../bes-testsuite/bes.conf for all four response types and saves
the resulting outputs into the baselines directory as expected by the
testsuite.  It is up to the tester to:

  * Generate the baselines
  * Verify the baselines are correct by hand
  * Add the AT_CHECK_ALL_DAP_RESPONSES call to testsuite.at

----------------------------------------------------------------------------
TODO AND KNOWN ISSUES

@TODO We need to move the local testing bes.conf creation from
../bes-testsuite at some point to this directory.  Right now we rely
on its existence, implicitly assuming that 'make check' was run in
../bes-testsuite prior to this directory!  

@TODO Migrate all the bes-testsuite tests into this new Autotest framework.










