tame/progtest
Mike Gerwitz 42d192af79 progtest: Exit with non-zero status on test failure
Not a very useful test runner if it doesn't ever fail, now is it?

* Makefile.am (check): Invoke new test/runner-test.  Depend on modindex.
* bin/runner.js: Exit with non-zero status on assertion failure.
* test/_stub: Add stub program with good and bad test cases to test
    exit code.
* test/runner-test: Add system test.
2018-04-10 15:56:38 -04:00
..
bin progtest: Exit with non-zero status on test failure 2018-04-10 15:56:38 -04:00
build-aux progtest: Generate index.js files 2018-02-19 15:21:14 -05:00
src progtest: Suppress terminating classifications during const run 2018-03-06 14:16:32 -05:00
test progtest: Exit with non-zero status on test failure 2018-04-10 15:56:38 -04:00
.gitignore progtest: Add runner script 2018-03-05 15:57:38 -05:00
Makefile.am progtest: Exit with non-zero status on test failure 2018-04-10 15:56:38 -04:00
README.md progtest/README.md: Basic test case format documentation 2018-02-23 14:30:02 -05:00
autogen.sh progtest: Add runner script 2018-03-05 15:57:38 -05:00
configure.ac progtest: Add runner script 2018-03-05 15:57:38 -05:00
package.json progtest/package.json (devDependencies): Add mocha and chai 2018-02-23 10:34:38 -05:00

README.md

Program Testing

A /program/ is a top-level package (either marked as with @program="true", or with a root rater node). This system provides a means of writing and running test cases.

Test Case Format

Test cases must be provided in a YAML file. Each test case has a description (description), input data (data), and expected results (expect).

- description: >-
    Example test case    
  data:
    state:              [ STATE_AK ]
    prem_total:         [ 9000 ]
    effective_date:     12/05/2017
  expect:
    premTaxStamping: [ 1234 ]
    premTaxSurplus:  [ 1010 ]

A file may contain any number of test cases. All identifiers in data and expect must be valid inputs (params) and outputs (classifications and calculations) respectively. Inputs are passed as-is to the program, and outputs are recursively (deeply) compared.