-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapping between DMN and test XML #145
Comments
Detailed description of correspondence between DMN model and XML test file is given on a page: |
5 - input node name Every "inputData" entry from DMN model must have exactly one equally named "inputNode" in every test case present in test file. |
Does DMN standard require that a name of "inputData" must be unique per each DMN model? Example: DMN file defines 10 decision tables. Every decision table has 10 inputs. Do we have a requirement that inputs are named differently for every table or globally? For instance, is it possible that any two tables have any equally named input? |
Some test cases have more complex structure:
How relevant tree of "component" nodes should be constructed from an arbitrary DMN file? |
How many inputs has DMN model? Should test XML describe a test of the whole DMN model or its parts? Example: DMN file defines 10 decision tables. One decision table has all but one its inputs as information requirements for outputs from 9 other decision tables and one external input variable. How many inputs will have a test for this model? 10? 91? 100? |
I am planning another page about compound (structured) values. However, the short story is that in the case that you reference above, the DMN model defines the structure of the data item that you must submit: You will see, once again, that there is a one-to-one mapping between the input data structure, and the inputNode structure. |
As for how many inputs you need ... that is up to the model itself. The model might require some inputs, and then of course it will fail if you don't supply them. Others might be able to default values and therefor they work with or without inputs. The TCK framework does not enforce anything with this regard, it merely presents all the inputs specified, and then receives the results back, and compares to what is expected. |
Aha.. It clarifies to some extent.. So, we are getting the following schema: Element "inputData" may have type reference in attribute "typeRef". If type reference is "itemDefinition", then every "itemComponent" found in "itemDefinition" becomes "component" of XML with tree structure exactly replicating tree of item definitions in DMN. Is it correct? |
That is it. Some of the elements may or may not be required -- that depends on the model itself whether it requires everything. Here is a better way to put it: it can't have anything different from the defined type structure. It is the same with output as well. |
Thank you so much! Things become getting clear. It was only a set of questions on inputs. I will now inspect structure of outputs in similar way. Maybe more questions will appear. I would say, original blog looks exactly as it is named "simple" example. Full specification of test XML definitely requires more details as established here. But we are gradually approaching complete formal description. |
Please write a description of what is missing from the description on https://github.com/dmn-tck/tck/wiki/How-to-Create-a-Simple-Test-Case Much appreciated. |
In my attempt to infer test XML structure from DMN appeared the following logic (possibly incomplete): Determining inputs for decision tables:
|
Determining inputs for information requirements
|
I created a new wiki page with this information: https://github.com/dmn-tck/tck/wiki/Test-Case-Generation-Strategy-Details |
I cannot find exact specification of correspondence between elements of DMN and test XML to establish universal translation of entries. Does it exist? If yes, I will be grateful for a link. If not, it might have sense to formalize.
Below are my guesses of intended mapping. On left is DMN. On right - XML. Please correct or extend where appropriate.
definitions -> testCases
DMN file name -> modelName
??? -> [label]
decision -> testCase
decision.id -> testCase.id ?
informationRequirement -> inputNode
??? -> inputNode.name
requiredInput -> component
inputData [href from requiredInput] -> value
inputData.variable.name -> component.name
??? -> component.component.... - according to nesting of boxed expressions?
decision.invocation -> resultNode
??? -> resultNode.name
binding -> expected ?
The text was updated successfully, but these errors were encountered: