-
Notifications
You must be signed in to change notification settings - Fork 54
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
Allow configuring type of NA #34
Comments
I think I can just create my own SubClass to VarValueDef that returns true for isNA() for now, since VarNaDef is has no other functional use than overriding that method. |
The concept of "not applicable" here represents the situation where a variable is irrelevant to the test case -- its value is meaningless or non-existent (or perhaps "any will do"). VarNaDef acts as a marker of this situation. It's not part of the actual input model. As a tester, you can't choose how to use it. It's assigned by the system based on the constraints. By definition, it is valid (can occur in either success or failure cases) and can have no input properties. |
I admit that the VarNaDef implementation is hacky. VarNaDef and VarValueDef really ought to be sibling subclasses of a more abstract base class. But I wasn't willing to make such a big and incompatible change to the class structure. |
No change planned to current "not applicable" concept. |
Putting it differently, say I want to test a function taking n String arguments. And I want to generate testcases where for each argument, the test values are: As a tester I can choose a dummy String value like "<use_null>", and then when running the test do the transformation, but to me that looks dirty. TCases prevents me still from using a VarValueDef with variable value null in |
I see now that this is the real issue. And, yes, this is totally different from NA. I suppose the real question is if For the moment, I would just use a name for this value, e.g. "null". |
I created #35 to track this. I am not sure what further representations could suffer. To me it still seems for input in XML, null should be easily representable, and for output null values would be no different (in terms of effort) from the current NA values in all externalized forms of output. E.g. When an XSLT rule has to be able to cope with an NA value to create testing code, I think it would do the same as for a null value. That's why I think NA and null are very similar in SystemTestDefs. |
Hi, in 2.0.0 the new class VarNaDef has no type.
However, when writing tests, a given variable being not applicable might be an error case, a valid case, it might even have the ONCE hint. Meaning as a tester, I might want to generate e.g. pairwise combinations with a given variable being assigned NA, or maybe just a single one where it is a failure.
So I don't understand the restriction.
And because it has a private Constructor, I have a hard time patching this.
I use NA for null values e.g. when passing Strings to a function. Else I would have to encode "null" as a different String value than NA, but to me it seems that java null is pretty much the same as TCases NA.
The text was updated successfully, but these errors were encountered: