Two basic methods of test case design

640?wx_fmt=gif

Background reply " MTSC " receive the General Assembly PPT

Read this article takes about 5 minutes.

See the title, I think you must have guessed what I want to say is, yes, that equivalence partitioning and boundary value analysis of these two methods.

If the test case design compared to martial arts masterpiece, then, these two methods is equivalent to the basic skills of martial arts Zama step and pulled ligaments, appears to be simple and easy to understand, it takes sophisticated people are constantly repeated deliberate practice every day.

Now I through a simple example to illustrate the use of these two methods in the actual scene, I hope for your help.

Here we still see many times that demand:

There is a PC client command-line tool, which can receive three command line parameters, where the first two numbers, the last one is the operator, the operator only supports the function subtraction, multiplication and division, the tool is the first two using digital arithmetic operators do next, and then outputs the operation result.

First, the equivalence partitioning method

We all know that the equivalence classes to distinguish between valid and invalid equivalence class equivalence class, so the theory can only say, can not see the extent of his master, to whom will Zama step, but how long tie, tie was not steady stable, still need to know a walk.

We can think above this requirement if the use of equivalence partitioning method, it should be how to design, my design is the result of the following:

640?wx_fmt=png

From my experience of watching the interview, very few people can put all the points mentioned above have to answer it.

The main problems are the following two categories:

1, there is no sense of class division, so will miss the big point of classification, such as where on implicit demand separator, is most likely to be missing the point, in fact, according to invalid equivalence partitioning, it is quite easy can think of of;

2, did not play out the essence of equivalence classes, a lot of people know to use ineffective and effective methods to be divided, but once let down to the extent that can be performed, it is easy to miss test points, such as someone leak divisor can not be out this implicit demand 0;

The example given is relatively simple, but even so, the question of the time if not suggest using the design method of equivalence classes, use cases there will not be a positive parameter type would use cases, for a number of parameters to a negative use cases, is simply not in accordance with certain ideas to design, just think of what that happened, this happened even if the test point lists together, we are unable to guarantee the experience of reusability.

I have to understand that equivalence partitioning should be a thorough test for each of the most basic human bone marrow patients with design methods, whenever after a positive write use cases, corresponding with a bunch of negative cases should immediately appear.

Second, boundary value analysis

With respect to freedom of equivalence class division, if it was intended to use boundary value analysis, you can easily upgrade coverage, this is definitely a sub-weapon, but that is because of the simple, but so many people tend to forget.

Take a look at the use cases above calculator this example, I added with a boundary value analysis:

640?wx_fmt=png

With respect to the equivalence class, this article simply use the number of cases much less, mainly equivalence class can be everywhere, you certainly have a positive negative, but the number of use cases are negative than positive to.

Range boundary value is indeed very fixed, as long as the place to apply the border was thinking like, and for the border, one of the most obvious feature is digital, so place involving numbers, consider using boundary value analysis law, to be sure.

For example, the current demand in the local numbers involved are so few:

1, three parameters: I have a number of parameters corresponding to the use case boundary value analysis;

2, four operands: This is a kind of digital, no boundary values, this is divided into equivalence classes range inside;

3, operand: This is rather special, with no reference to the figures, but it itself is a digital type, it also requires the use of boundary value analysis method covered by this hidden demand is easy to miss the place a lot of people .

About operands, say a few more.

Some students in the design of use cases, confuse the concept of equivalence classes and boundary values, such as design operands associated with said regular, normal and large number of digital I understand this argument by boundary values ​​will be better, rather than as a negative large number of use cases.

In addition, when I pressed ten thousand count the large number, in fact, a lot of people do not know in the end how much for a major, so this is obviously not designed along the lines of boundary value, because even the border do not know, of course, that did not other methods to test point boundary value needs to cover the whole of the consideration.

In short, equivalence classes and boundary value test case design is the most basic two ways, as a professional testers, we must master the extent to come in handy, like a conditioned reflex to generally rooted in our brain.

More than I do right equivalence class and boundary value method of case design brief summary, do not know whether you're working through the process of deliberate attention both methods, whether to roll melon mess cooked they use, talk about the welcome message Your opinion.

Of course, if you agree with my point of view, please share articles to the point of a circle of friends + "look" to allow more people to see, thank you.

Thank you for sharing, and looking forward, I prepared a raffle, August 15 8:15 automatic lottery.

Thank you for reading, and looking forward, the point I draw, I wish you good luck!

640?wx_fmt=jpeg

Recommended reading:

How to take control of their phone time

Process re-set once the line problem

Come, and I ate it with a crab

Talk about access to information

Two problems of long-term test case design process

Published 110 original articles · won praise 53 · views 70000 +

Guess you like

Origin blog.csdn.net/sylan15/article/details/99619463