question on input

32 views
Skip to first unread message

Fernando Jara

unread,
Mar 15, 2017, 4:08:17 PM3/15/17
to Tcases Forum
Hi,

I have 3 variables that represent required fields of a form and each of them has 2 possible values: exist and empty, where "empty" is an error I just want to generate a single failed test case, when the form has an empty field (one of the variables takes the empty value), it does not matter which one. I am currently generating 3 failed test cases, one for each variable, when they take the empty value respectively. Is there a way to represent this condition in the generation?

Thanks

Kaipire

Kerry Kimbrough

unread,
Mar 16, 2017, 8:55:59 PM3/16/17
to Tcases Forum
Hi, Kaipire

That's an interesting question! 

My first thought was that, from a testing perspective, this is an odd thing to attempt. If you want to verify that leaving any one field empty is an error, why would you stop with one failure case? A defect that allowed an empty field to be accepted could go undetected.

My second thought was "Oh well, there's probably a way to do it anyway."

But the only answer I could find was the trivial one below. 

My conclusion: The result you want is fundamentally incompatible with the purpose of Tcases, which is all about getting good coverage of the input space. But the result you want is less than the minimum coverage Tcases will produce.


<System name="Examples">
    <Function name="Form">
        <Input>
            <Var name="All-Fields-Defined">
                <Value name="Yes"/>
                <Value name="No" failure="true"/>
            </Var>
        </Input>
    </Function>
</System>



Message has been deleted

Fernando Jara

unread,
Mar 17, 2017, 3:01:43 PM3/17/17
to Tcases Forum
I think that's it, as I tried to realize that there was no way to achieve it, and as you said, I realized that what I was trying was incompatible with the purpose of tcases,

In short, I reach the same conclusion as you and I came up with the same solution that you proposed 
Another query ...
If I have these variables: 
  • Type: values(normal,emergency)
  • Analysis: values (yes,no)
  • RequiredFields: values(exist, empty(failure))
  • Action: values(acept,adjust,refuse)
  • Obs: values(exist,empty(failure when type is emergency)
And I'm just interested in these cases:

id0: (type: normal, analysis: yes, required fields: exist, action: acept, obs:exist OR empty(random))

id1: (type: normal, analysis: no, required fields: exist, action: acept, obs: exist OR empty(random))

id2: (type: emergency, analysis: (This value is not enabled when type is emergency) , required fields: exist, action: acept, obs:exist OR empty)

id3: (type:normal OR emergency(random) , analysys: depends on type, required fields: exist, action: adjust, obs:exist(obs is only required when action is adjust, obs empty is an error if action is adjust))

id4: (type: no required, analysis: no required, required fields: no required(when action is refused, the fields are not required), action: refuse, obs: no required)

id5(failure): (type: normal or emergency, analysis: depends on type, required fields: empty(failure), action: acept or adjust, obs: depend on action)

  • In the case id2 "analysys: (This value is not enabled when type is emergency)" is achieved with a "whenNot="emergency"
  • It is possible to have the variables randomly take one of their values?
  • It is possible to achieve the conditions of the case id3
  • It is possible to achieve the conditions of the case id4
  • The cases with adjust and refused only want to prove once
  • In general, is it possible to get some of this, make these cases the minimum cases?

Kerry Kimbrough

unread,
Mar 19, 2017, 6:21:38 PM3/19/17
to Tcases Forum
Hi, Kaipire

Sorry, I'm not sure I understand your questions. Perhaps if you posted your input model and its results, it might help.

You can't ask Tcases to invent random values. But you can randomize the combination process -- the Tcases Guide explains how. 
Reply all
Reply to author
Forward
0 new messages