else (such as a real number or a character). The range of integers is infinite, though the computer will limit this to some finite value in both the negative and positive directions (simply because it can only handle numbers of a certain size; it is a finite machine). Let us take an example, that the program accepts any value between −10,000 and +10,000 (computers actually represent numbers in binary form, which makes the numbers look much less like the ones we are familiar with, but we will stick to a familiar representation).
If we imagine a program that separates numbers into two groups according to whether they are positive or negative the total range of integers could be split into three ‘partitions’: the values that are less than zero; zero; and the values that are greater than zero. Each of these is known as an ‘equivalence partition’ because every value inside the partition is exactly equivalent to any other value as far as our program is concerned. So if the computer accepts −2,905 as a valid negative integer we would expect it also to accept −3. Similarly, if it accepts 100 it should also accept 2,345 as a positive integer.
Note that we are treating zero as a special case. We could, if we chose to, include zero with the positive integers, but my rudimentary specification did not specify that clearly, so it is really left as an undefined value (and it is not untypical to find such ambiguities or undefined areas in specifications). It often suits us to treat zero as a special case for testing where ranges of numbers are involved; we treat it as an equivalence partition with only one member. So we have three valid equivalence partitions in this case.
The equivalence partitioning technique takes advantage of the properties of equivalence partitions to reduce the number of test cases we need to write. Since all the values in an equivalence partition are handled in exactly the same way by a given program, we need only test one of them as a representative of the partition. In the example given, then, we need any positive integer, any negative integer and zero. We generally select values somewhere near the middle of each partition, so we might choose, say, −5,000, 0 and 5,000 as our representatives. These three test inputs would exercise all three partitions and the theory tells us that if the program treats these three values correctly it is very likely to treat all of the other values, all 19,998 of them in this case, correctly.
The partitions we have identified now are called valid equivalence partitions because they partition the collection of valid inputs, but there are other possible inputs to this program that would not be valid  real numbers, for example. We also have two input partitions of integers that are not valid: integers less than −10,000 and integers greater than 10,000. We should test that the program does not accept these, which is just as important as the program accepting valid inputs.
Nonvalid partitions are also important to test. If you think about the example we have been using you will soon recognize that there are far more possible nonvalid inputs than valid ones, since all the real numbers (e.g. numbers containing decimals) and all characters are nonvalid in this case. It is generally the case that there are far more ways to provide incorrect input than there are to provide correct input; as a result, we need to ensure that we have tested the program against the possible nonvalid inputs. Here again equivalence partitioning comes to our aid: all real numbers are equally nonvalid, as are all alphabetic characters. These represent two nonvalid partitions that we should test, using values such as 9.45 and ‘r’ respectively. There will be many other possible nonvalid input partitions, so we may have to limit the test cases to the ones that are most likely to crop up in a real situation.
<<<<<< =================== >>>>>>
Q. 42: Describe some example of Equivalence Partitions
Valid input: integers in the range 100 to 999.
# Valid partition: 100 to 999 inclusive.
# Nonvalid partitions: less than 100, more than 999, real (decimal) numbers and nonnumeric characters.
Valid input: names with up to 20 alphabetic characters.
# Valid partition: strings of up to 20 alphabetic characters.
# Nonvalid partitions: strings of more than 20 alphabetic characters, strings containing nonalphabetic characters.
<<<<<< =================== >>>>>>
Q. 43: What is the purpose of Boundary Value Analysis the specificationbased test case design technique
There is a common mistakes that programmers make is that errors tend to cluster around boundaries. For example, if a program should accept a sequence of numbers between 1 and 10, the most likely fault will be that values just outside this range are incorrectly accepted or that values just inside the range are incorrectly rejected. In the programming world these faults coincide with particular programming structures such as the number of times a program loop is executed or the exact point at which a loop should stop executing.
This works well with our equivalence partitioning idea because partitions must have boundaries. A partition of integers between 1 and 99, for instance, has a lowest value, 1, and a highest value, 99. These are called boundary values. Actually they are called valid boundary values because they are the boundaries on the inside of a valid partition. What about the values on the outside? Yes, they have boundaries too. So the boundary of the nonvalid values at the lower end will be zero because it is the first value you come to when you step outside the partition at the bottom end. (You can also think of this as the highest value inside the nonvalid partition of integers that are less than one, of course.) At the top end of the range we also have a nonvalid boundary value, 100.
This is the boundary value technique, more or less. For most practical purposes the boundary value analysis technique needs to identify just two values at each boundary. For reasons that need not detain us here there is an alternative version of the technique that uses three values at each boundary.
For this variant, which is the one documented in BS 79252, we include one more value at each boundary when we use boundary value analysis: the rule is that we use the boundary value itself and one value (as close as you can get) either side of the boundary.
So, in this case lower boundary values will be 0, 1, 2 and upper boundary values will be 98, 99, 100. What does ‘as close as we can get’ mean? It means take the next value in sequence using the precision that has been applied to the partition. If the numbers are to a precision of 0.01, for example, the lower boundary values would be 0.99, 1.00, 1.01 and the upper boundary values would be 98.99, 99.00, 99.01.
<<<<<< =================== >>>>>>
Q. 44: Describe some example of Boundary Values
1) The boiling point of water: The boundary is at 100 degrees Celsius, so for the 3 Value Boundary approach the boundary values will be 99 degrees, 100 degrees, 101 degrees—unless you have a very accurate digital thermometer, in which case they could be 99.9 degrees, 100.0 degrees, 100.1 degrees. For the 2 value approach the corresponding values would be 100 and 101.
2) Exam pass: If an exam has a pass boundary at 40 per cent, merit at 60 per cent and distinction at 80 per cent the 3 value boundaries would be 39, 40, 41 for pass, 59, 60, 61 for merit, 79, 80, 81 for distinction. It is unlikely that marks would be recorded at any greater precision than whole numbers. The 2 value equivalents would be 39 and 40, 59 and 60, and 79 and 80 respectively.
<<<<<< =================== >>>>>>
Q. 45: What is the purpose of Decision Table Testing the specificationbased test case design technique
Specifications generally contain business rules to define the functions of the system and the conditions under which each function operates. Individual decisions are usually simple, but the overall effect of these logical conditions can become quite complex.
As testers we need to be able to assure ourselves that every combination of these conditions that might occur has been tested, so we need to capture all the decisions in a way that enables us to explore their combinations. The mechanism usually used to capture the logical decisions is called a decision table.
A decision table lists all the input conditions that can occur and all the actions that can arise from them. These are structured into a table as rows, with the conditions at the top of the table and the possible actions at the bottom.
Business rules, which involve combinations of conditions to produce some combination of actions, are arranged across the top. Each column therefore represents a single business rule (or just ‘rule’) and shows how input conditions combine to produce actions. Thus each column represents a possible test case, since it identifies both inputs and expected outputs. The schematic structure of a decision table is shown in the following table.

Business rule 1 
Business rule 2 
Business rule 3 
Condition 1 
T 
F 
T 
Condition 2 
T 
T 
T 
Condition 3 
T 
"" 
F 
Action 1 
Y 
N 
Y 
Action 2 
N 
Y 
Y 
Business rule 1 requires all conditions to be true to generate action 1. Business rule 2 results in action 2 if condition 1 is false and condition 2 is true but does not depend on condition 3. Business rule 3 requires conditions 1 and 2 to be true and condition 3 to be false.
In reality the number of conditions and actions can be quite large, but usually the number of combinations producing specific actions is relatively small. For this reason we do not enter every possible combination of conditions into our decision table, but restrict it to those combinations that correspond to business rules  this is called a limited entry decision table to distinguish it from a decision table with all combinations of inputs identified.
Part  10 of the Crash Course  ISTQB Foundation Exam

Comments :
Leave Your Comments: (*) Marked Fields are Mandatory
You can apply basic formatting to the text