Coder Social home page Coder Social logo

freddiefujiwara / dtdt Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 810 KB

A test case generator from a decision tree to decision table.

License: MIT License

JavaScript 81.44% HTML 18.56%
decision-trees decisiontable decision-tree testcase-generator testing-tools

dtdt's Introduction

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
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

Test cases

$ 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 %}

dtdt's People

Contributors

dependabot[bot] avatar freddiefujiwara avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

qualityfrog

dtdt's Issues

Generate the full decision table with all iterations (n^2)

In your example you have three conditions, so the mathematical table has 8 iterations of y/n.

Your example shows only 6, iteration 3 and 6 have the results of "buy ties?" included (cause they dont matter for the action outcome).

For folks unfamiliar with decision tables it might be confusing, a more detailed example or describtive information could help folks understand the concept of decision tables better (if they have not read up somewhere else about it).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.