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
$ npm i -g dtdt
# -h:help
# <file>:inputscript
dtdt [-h] <file>
$ 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%
$ dtdt __tests__/testData.yml
1 | 2 | 3 | 4 | 5 | 6 | |
---|---|---|---|---|---|---|
7+ items? | y | y | y | n | n | n |
buy shirts? | y | y | n | y | y | n |
buy ties? | y | n | - | y | n | - |
12% | x | - | - | - | - | - |
7% | - | x | x | - | - | - |
5% | - | - | - | x | - | - |
0% | - | - | - | - | x | x |
$ dtdt __tests__/testData.yml -t c
# | Conditions | Action |
---|---|---|
0 | 7+ items? equals y and buy shirts? equals y and buy ties? equals y | 12% |
1 | 7+ items? equals y and buy shirts? equals y and buy ties? equals n | 7% |
2 | 7+ items? equals y and buy shirts? equals n | 7% |
3 | 7+ items? equals n and buy shirts? equals y and buy ties? equals y | 5% |
4 | 7+ items? equals n and buy shirts? equals y and buy ties? equals n | 0% |
5 | 7+ items? equals n and buy shirts? equals n | 0% |
{% include form.html %}