1

I am reading a book Testing Object oriented systems, and found the following:

If a boundary condition uses two or more variables, then on and off points can be found by solving the related equations. Generally, if there are k independent variables (on the right side), there are k on points.

So I wonder, what do they mean? What should I do when I have a-2b >5?

1 Answer 1

2

I believe the author means you have to evaluate the expression to find k coordinates of a point, not k points. Since you have k-dimensional space you need to know all k's coordinates to define any point in that space.

For your example this would look like:

enter image description here

Here is the explanation of how to come up with such graphical representation.

  1. First you need to evaluate the boundary. To do that you should prented your expression is an equation. This turns your example into a-2b = 5. This can be converted to a = 5 + 2b. Now you can draw a line.
  2. The line drawn is your boundary (any point on it is on) and the points which make your original expression be true are in points since they belong to a domain. The points which make your expression turn into true are all the points up-left of your line.

E.g. take b = -3 and a = 6. Then a - 2b = 6 - 2*(-3) = 6 + 6 = 12. 12 > 5 -> true. Point in the domain.

Now lets take b = 0 and a = 0. Then a - 2b = 0 - 2*(0) = 0. 0 > 5 -> false. The point is outside the domain.

8
  • Thank you. Could you show me the equation approach, I am not sure if I get it right. Thanks a lot
    – John V
    Commented Oct 2, 2017 at 8:46
  • @Pietross see my update. By the way there was a mistake in my graph. I fixed it too.
    – Alexey R.
    Commented Oct 2, 2017 at 9:09
  • Thanks and one more thing - how can I see the ON points from the solution? According to what the authors wrote, there should be two, as we have two variables.
    – John V
    Commented Oct 2, 2017 at 9:31
  • @Pietross as I mentioned in my answer I believe the author means two coords of one point. Hence, here the example of ON point would be a = 1, b = -2. In other words - any point that satisfies a = 5 + 2b.
    – Alexey R.
    Commented Oct 2, 2017 at 9:34
  • Ah, so basically the point satisfying the equation, while the IN and OUT points are defined by the inequality border >.
    – John V
    Commented Oct 2, 2017 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.