0.0.3 • Published 4 years ago

dtdt v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Node.js CInpm version

Dtdt

This is a Dtdt class. It's a A test case generator from a "D"ecision "T"ree to "D"ecision "T"able.

Try it in your browser! TRY IT NOW

Document is here

install

$ npm i -g dtdt

Usage

command line

# -h:help
# <file>:inputscript
dtdt [-h] <file>

sample data

$ cat __tests__/testDataa.yml
7+ items?:
  'y':
    buy shirts?:
      'y':
        buy ties?:
          'y': 12%
          'n': 7%
      'n': 7%
  'n':
    buy shirts?:
      'y':
        buy ties?:
          'y': 5%
          'n': 0%
      'n': 0%

Decision table

$ dtdt __tests__/testData.yml
123456
7+ items?yyynnn
buy shirts?yynyyn
buy ties?yn-yn-
12%x-----
7%-xx---
5%---x--
0%----xx

Test cases

$ dtdt __tests__/testData.yml -t c
#ConditionsAction
07+ items? equals y and buy shirts? equals y and buy ties? equals y12%
17+ items? equals y and buy shirts? equals y and buy ties? equals n7%
27+ items? equals y and buy shirts? equals n7%
37+ items? equals n and buy shirts? equals y and buy ties? equals y5%
47+ items? equals n and buy shirts? equals y and buy ties? equals n0%
57+ items? equals n and buy shirts? equals n0%

{% include form.html %}