ANN: ADEPT (A Declarative, Eval()-based Program Tester) 
Author Message
 ANN: ADEPT (A Declarative, Eval()-based Program Tester)

ADEPT--"A Declarative, Eval-based Program Tester"--is an open source
unit testing tool that allows users to define test cases as tuples--
e.g.,

    # reworking of unittest example from python unittest doc,
    # minus initializers and finalizers

    getTest =\
         ( "check default size", eqValue((50,50)),
           Widget("The Widget").size )
    testWidget = Widget("The widget")
    setTest =\
         ( "check resize", eqValue((100,150)), "testWidget.size()",
            testWidget.resize, (100,150) )
    testSuite =\
         (("get actions", (getTest,)), ("set actions", (setTest,)))

--and then execute, label, log, and check the tests' results:

    # widgetLogger labels tests, and stores labels and test results
    #
    >>> suite =\
        [("get actions",(getTest,)), ("set actions",(setTest,))]
    >>> widgetLogger = TestLogger()
    >>> doTestSuite(suite, widgetLogger)
    #
    # assumption here: all tests succeeded, hence, no advisories
    #
    >>> widgetLogger.failureCount()
    0
    >>> widgetLogger.successCount()
    2
    >>> widgetLogger.failures()
    ()
    #
    # cases could be stored to a list and sorted, if required
    #
    >>> widgetLogger.successes()
    ((2, 1), (1, 1))
    >>> map(widgetLogger.getBanner, widgetLogger.successes)
    ('2.1. set actions: check Widget.resize(100,150)',
     '1.1. get actions: check Widget default size')

The getTest and setTest tuples shown here typify what ADEPT calls "get
actions" and "set actions" tests: checks for a callable object's
returned results and effects, respectively.

*.  The getTest tuple, when evaluated as a "get actions" test, directs
ADEPT to evaluate eqValue((50,50))(Widget("The widget").size()), and
record success iff this expression evaluates to 1 (true).

*.  The setTest tuple, when evaluated as a "set actions" test, directs
ADEPT to execute testWidget.resize(100,150), then record success iff
the expression eqValue((100,150))(testWidget.size()) evaluates to 1.

I wrote ADEPT as a tool for creating succinct, self-documenting test
cases for a large utility that I've been working on since
March--3,000+ test cases, with about 3/4 of the way to go.  I'm
releasing ADEPT because I've appreciated having it, and would like to
get people's impressions of ADEPT--along with suggestions for
improvement.

ADEPT is at http://www.*-*-*.com/
This first release includes the following:

-.  a 5 pp. HTML overview of ADEPT's functionality, features, and
    limitations ( http://www.*-*-*.com/ ).

-.  adept.py, ADEPT's source code:
      about 950 lines of Python,
      with about 1,000 lines of banners, comments and whitespace
    ( http://www.*-*-*.com/ ).

-.  adept.txt, the ADEPT user manual:
      about 40 pp. of text (60 lines x 80 columns), organized as
      -.  an introduction, plus sections that describe
      -.  ADEPT's nine types of tests:  
            get actions, set actions, get+set actions, null actions,
            error actions, get prop actions, set prop actions,
            get prop error actions, set prop error actions
          --with comments on strategies for using each kind of test,
            and a special section on repr string testing.
      -.  ADEPT test indexing.
      -.  additional ADEPT features, including nested test suite
          execution and the use of AND/OR-tree-like objects to apply
          multiple predicates to a single test.
      -.  ADEPT's design--including notes on how to add test types,
          and comments on the tool's limitations.
    ( http://www.*-*-*.com/ ).

-.  adeptExamples.py, a program that illustrates the operation of the
    examples in the ADEPT manual.
    ( http://www.*-*-*.com/ ).

-.  adeptTestSuite.py, a 782-test-case-long validation suite for
    ADEPT, written in ADEPT.
    ( http://www.*-*-*.com/ ).

===================
Phil Pfeiffer/East TN State U. |Kindness in thought leads to wisdom.
Dept. of CIS /P.O. Box 70711   |Kindness in speech leads to eloquence.
Johnson City, TN. 37614-1266   |Kindness in action leads to love



Fri, 23 Dec 2005 11:20:54 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. NEW FREEWARE : Programming Language Creator by Adept Software (includes a C interpreter module)

2. Tcl-based forms tester

3. Transition from Clipper DOS based to Windows based Programming language

4. defclass-eval-bases

5. CFP: Workshop on Declarative Programming in the Context of OO Languages

6. CfP: DPCOOL - Workshop on Declarative Programming in the Context of OO Languages at PLI'03

7. Functional and Declarative Programming in Education (FDPE02)

8. interactive program optimization for a pure declarative language

9. Functional and Declarative Programming in Education (FDPE02)

10. Definition needed for pure declarative programming language

11. integrating declarative language in C++ program

12. Question on The Design of Declarative programs

 

 
Powered by phpBB® Forum Software