Академический Документы
Профессиональный Документы
Культура Документы
Boundary value analysis and equivalence partitioning both are test case
design strategies in black box testing.
Equivalence Partitioning:
In this method the input domain data is divided into different equivalence
data classes. This method is typically used to reduce the total number
of test cases to a finite set of testable test cases, still covering maximum
requirements.
In short it is the process of taking all possible test cases and placing them
into classes. One test value is picked from each class while testing.
E.g.: If you are testing for an input box accepting numbers from 1 to
1000 then there is no use in writing thousand test cases for all 1000 valid
input numbers plus other test cases for invalid data.
So in above example we can divide our test cases into three equivalence
classes of some valid and invalid inputs.
Test cases for input box accepting numbers between 1 and 1000
using Equivalence Partitioning:
1) One input data class with all valid inputs. Pick a single value from
range 1 to 1000 as a valid test case. If you select other values between 1
and 1000 then result is going to be same. So one test case for valid input
data should be sufficient.
2) Input data class with all values below lower limit. I.e. any value below
1, as a invalid input data test case.
3) Input data with any value greater than 1000 to represent third invalid
input class.
Its widely recognized that input values at the extreme ends of input
domain cause more errors in system. More application errors occur at
the boundaries of input domain. Boundary value analysis testing
technique is used to identify errors at boundaries rather than finding
those exist in center of input domain.
Test cases for input box accepting numbers between 1 and 1000
using Boundary value analysis:
1) Test cases with test data exactly as the input boundaries of input
domain i.e. values 1 and 1000 in our case.
2) Test data with values just below the extreme edges of input domains
i.e. values 0 and 999.
3) Test data with values just above the extreme edges of input domain
i.e. values 2 and 1001.
Note: There is no hard-and-fast rule to test only one value from each
equivalence class you created for input domains. You can select multiple
valid and invalid values from each equivalence class according to your
needs and previous judgments.
E.g. if you divided 1 to 1000 input values in valid data equivalence class,
then you can select test case values like: 1, 11, 100, 950 etc. Same case
for other test cases having invalid data classes.
Its important that all testers should be able to write test cases based on
Equivalence partitioning and Boundary value analysis. Taking this into
consideration ISTQB is having significant importance for this topic
in ISTQB Foundation level Certificate exam. Good practice and logical
thinking can make it very easy to solve these questions.
Here are few sample questions for practice from ISTQB exam
papers on Equivalence partitioning and BVA. (Ordered: Simple to
little complex)
Question 1
One of the fields on a form contains a text box which accepts numeric
values in the range of 18 to 25. Identify the invalid Equivalence class.
a) 17
b) 19
c) 24
d) 21
Solution
The text box accepts numeric values in the range 18 to 25 (18 and 25 are
also part of the class). So this class becomes our valid class. But the
question is to identify invalid equivalence class. The classes will be as
follows:
Class I: values < 18 => invalid class
Class II: 18 to 25 => valid class
Class III: values > 25 => invalid class
17 fall under invalid class. 19, 24 and 21 fall under valid class. So
answer is A
Question 2
In an Examination a candidate has to score minimum of 24 marks in
order to clear the exam. The maximum that he can score is 40 marks.
Identify the Valid Equivalence values if the student clears the exam.
a) 22,23,26
b) 21,39,40
c) 29,30,31
d) 0,15,22
Solution
The classes will be as follows:
Class I: values < 24 => invalid class
Class II: 24 to 40 => valid class
Class III: values > 40 => invalid class
Question 3
One of the fields on a form contains a text box which accepts alpha
numeric values. Identify the Valid Equivalence class
a) BOOK
b) Book
c) Boo01k
d) Book
Solution
Alpha numeric is combination of alphabets and numbers. Hence we have
to choose an option which has both of these. A valid equivalence class will
consist of both alphabets and numbers. Option c contains both alphabets
and numbers. So answer is C
Question 4
The Switch is switched off once the temperature falls below 18 and then it
is turned on when the temperature is more than 21. When the
temperature is more than 21. Identify the Equivalence values which
belong to the same class.
a) 12,16,22
b) 24,27,17
c) 22,23,24
d) 14,15,19
Solution
We have to choose values from same class (it can be valid or invalid
class). The classes will be as follows:
Only in Option c all values are from one class. Hence the answer is C.
(Please note that the question does not talk about valid or invalid classes.
It is only about values in same class)
Question 5
A program validates a numeric field as follows: values less than 10 are
rejected, values between 10 and 21 are accepted, values greater than or
equal to 22 are rejected. Which of the following input values cover all of
the equivalence partitions?
a. 10,11,21
b. 3,20,21
c. 3,10,22
d. 10,21,22
Solution
We have to select values which fall in all the equivalence class (valid and
invalid both). The classes will be as follows:
All the values from option c fall under all different equivalence class. So
answer is C.
Question 6
A program validates a numeric field as follows: values less than 10 are
rejected, values between 10 and 21 are accepted, values greater than or
equal to 22 are rejected. Which of the following covers the MOST
boundary values?
a. 9,10,11,22
b. 9,10,21,22
c. 10,11,21,22
d. 10,11,20,21
Solution
We have already come up with the classes as shown in question 5. The
boundaries can be identified as 9, 10, 21, and 22. These four values are
in option b. So answer is B
Question 7
In a system designed to work out the tax to be paid:
An employee has 4000 of salary tax free.
The next 1500 is taxed at 10%.
The next 28000 after that is taxed at 22%.
Any further amount is taxed at 40%.
To the nearest whole pound, which of these groups of numbers fall into
three DIFFERENT equivalence classes?
a) 4000; 5000; 5500
b) 32001; 34000; 36500
c) 28000; 28001; 32001
d) 4000; 4200; 5600
Solution
The classes will be as follows:
Class I : 0 to 4000 => no tax
Class II : 4001 to 5500 => 10 % tax
Class III : 5501 to 33500 => 22 % tax
Class IV : 33501 and above => 40 % tax
Select the values which fall in three different equivalence classes. Option
d has values from three different equivalence classes. So answer is D.
Question 8
In a system designed to work out the tax to be paid:
An employee has 4000 of salary tax free.
The next 1500 is taxed at 10%.
The next 28000 after that is taxed at 22%.
Any further amount is taxed at 40%.
Question 9
Given the following specification, which of the following values for age are
in the SAME equivalence partition?
If you are less than 18, you are too young to be insured.
Between 18 and 30 inclusive, you will receive a 20% discount.
Anyone over 30 is not eligible for a discount.
a) 17, 18, 19
b) 29, 30, 31
c) 18, 29, 30
d) 17, 29, 31
Solution
The classes will be as follows:
Class I: age < 18 => not insured
Class II: age 18 to 30 => 20 % discount
Class III: age > 30 => no discount
These are few sample questions for practice from ISTQB papers.
We will continue to add more ISTQB question papers with
answers in coming posts.
Now decide the minimum number of tests that are needed to ensure that
all
the questions have been asked, all combinations have occurred and all
replies given.
a) 3
b) 4
c) 5
d) 6
6 Error guessing:
a) supplements formal test design techniques.
b) can only be used in component, integration and system testing.
c) is only performed in user acceptance testing.
d) is not repeatable and should not be used.
a) v-3,w-2,x-1,y-5,z-4
b) v-2,w-5,x-1,y-4,z-3
c) v-3,w-4,x-1,y-5,z-2
d) v-2,w-1,x-4,y-3,z-5
10 Which one of the following statements about system testing
is NOT true?
a) System tests are often performed by independent teams.
b) Functional testing is used more than structural testing.
c) Faults found during system tests can be very expensive to fix.
d) End-users should be involved in system tests.
37 The most important thing about early test design is that it:
a) makes test preparation easier.
b) means inspections are not required.
c) can prevent fault multiplication.
d) will find all faults.
a) an error
b) a fault
c) a failure
d) a defect
v) every week
w) after the software has changed
x) as often as possible
y) when the environment has changed
z) when the project manager says
a) test items
b) test deliverables
c) test tasks
d) test specifications
Q12 Given the following code, which statement is true about the
minimum number of test cases required for full statement and
branch coverage?
Read p
Read q
IF p+q > 100 THEN
Print Large
ENDIF
IF p > 50 THEN
Print p Large
ENDIF
a) requirements
b) documentation
c) test cases
d) improvements suggested by users
a) operating systems
b) test documentation
c) live data
d) user requirement documents
i. static analysis
ii. performance testing
iii. test management
iv. dynamic analysis
a) developers would typically use i and iv; test team ii and iii
b) developers would typically use i and iii; test team ii and iv
c) developers would typically use ii and iv; test team i and iii
d) developers would typically use i, iii and iv; test team ii
Q28 What type of review requires formal entry and exit criteria,
including metrics:
a) walkthrough
b) inspection
c) management review
d) post project review
Q29 Which of the following uses Impact Analysis most?
a) component testing
b) non-functional system testing
c) user acceptance testing
d) maintenance testing
s) inspection
t) peer review
u) informal review
v) walkthrough
a) s = 4 and 5, t = 3, u = 2, v = 1
b) s = 4, t = 3, u = 2 and 5, v = 1
c) s = 1 and 5, t = 3, u = 2, v = 4
d) s = 4 and 5, t = 1, u= 2, v = 3
a) ISO/IEC 12207
b) BS 7925-1
c) ANSI/IEEE 829
d) ANSI/IEEE 729
a) is not important
b) increases the later a fault is found
c) decreases the later a fault is found
d) can never be determined
Question Answer
1 C 2 C 3 D 4 D 5 C 6 A
7 B 8 A 9 C 10 D 11 B 12 B
13 D 14 C 15 D 16 C 17 B 18 C
19 B 20 A 21 A 22 D 23 A 24 D
25 A 26 A 27 C 28 B 29 D 30 C
31 B 32 A 33 D 34 A 35 B 36 B
37 C 38 C 39 B 40 A
3.What is the main reason for testing software before releasing it?
------------
a. Component testing should be black box, system testing should be white
box.
b. if u find a lot of bugs in testing, you should not be very confident about
the quality of software
c. the fewer bugs you find,the better your testing was
d. the more tests you run, the more bugs you will find.
a. 1
b. 2
c. 3
d. 4
18. Using the same code example as question 17,how many tests
are required to achieve 100% branch/decision coverage?
a. 1
b. 2
c. 3
d. 4
a. State-Transition
b. Usability
c. Performance
d. Security
a. State analysis
b. Coverage analysis
c. Dynamic analysis
d. Memory analysis
a. IEEE829
b. IEEE610
c. BS7925-1
d. BS7925-2
a. IEEE 829
b. IEEE 610
c. BS7925-1
d. BS7925-2
a. Design based
b. Big-bang
c. Bottom-up
d. Top-down
a. statement testing
b. equivalence partitioning
c. error- guessing
d. usability testing
26. A program with high cyclometic complexity is almost likely to
be:
a. Large
b. Small
c. Difficult to write
d. Difficult to test
a. code inspection
b. coverage analysis
c. usability assessment
d. installation test
a. white box
b. glass box
c. structural
d. functional
values less than 10 are rejected, values between 10 and 21 are accepted,
values greater than or equal to 22 are rejected
which of the following input values cover all of the equivalence partitions?
a. 10,11,21
b. 3,20,21
c. 3,10,22
d. 10,21,22
a. 9,10,11,22
b. 9,10,21,22
c. 10,11,21,22
d. 10,11,20,21
Question Answer
1. D 2. B 3. D 4. C 5. D 6. A
7. C 8. B 9. A 10. A 11. C 12. a
13. B 14. C 15. B 16. B 17. C 18. c
19. A 20. C 21. B 22. D 23. C 24. a
25. B 26. D 27. A 28. D 29. C 30. b
ISTQB software testing certification sample question paper with answers Part II
The answer is B
3. The Phases of formal review process is mentioned below
arrange them in the correct order.
i. Planning
ii. Review Meeting
iii. Rework
iv. Individual Preparations
v. Kick Off
vi. Follow Up
a) i,ii,iii,iv,v,vi
b) vi,i,ii,iii,iv,v
c) i,v,iv,ii,iii,vi
d) i,ii,iii,v,iv,vi
The answer is C
An alternate way of solving this is check for the options where it starts
with OFF state. So we have options a and c to select from. As per the
state diagram from OFF state the dryer goes to Speed 1 and then to
Speed 2. So our answer should start with A and end with C.
The answer is C
The answer is A
The answer is A
8. Exhaustive Testing is
a) Is impractical but possible
b) Is practically possible
c) Is impractical and impossible
d) Is always possible
The answer is A
The answer is D
The answer is D
The answer is A
The answer is B
The answer is B
The answer is B
15. A Person who documents all the issues, problems and open
points that were identified during a formal review.
a) Moderator.
b) Scribe
c) Author
d) Manager
The answer is B
The answer is B
The answer is A
The answer is C
The answer is D
The answer is A
The answer is B
The answer is A
The answer is B
The answer is C
25. One of the fields on a form contains a text box which accepts
alpha numeric values. Identify the Valid Equivalence class
a) BOOK
b) Book
c) Boo01k
d) book
The answer is A
The answer is B
The answer is C
The answer is C
30. The Switch is switched off once the temperature falls below 18
and then it is turned on when the temperature is more than 21.
Identify the Equivalence values which belong to the same class.
a) 12,16,22
b) 24,27,17
c) 22,23,24
d) 14,15,19
From the given options select the option which has values from only one
particular class. Option a values are not in one class, so eliminate.
Option b values are not in one class, so eliminate. Option c values are in
one class. Option d values are not in one class, so eliminate. (please
note that the question does not talk about valid or invalid classes. It is
only about values in same class)
The answer is C
.bdb is the local OR. .mtr is a binary file that contains other information
about checkpoints and all. To re-verify the .bdb is the OR, try to rename
the file with the extension as .tsr and open it from ORM. The same
objects in the OR will be displayed here. The same will not work if you try
it on .mtr file.
Tool Tip capture method varies depending on the type of object this tool
tip appears for. It could be for links, images or any other web elements.
You can know which browser instance was opened after another can be
known by using the creation time property. In simple terms, this is
nothing but a counter for each browser instance that gets launched. For
the first one, it is 0 and gets incremented from then on. To close the
second opened browser, you can use the following code:
Browser(creationtime:=1).Close
To do this you will have to check how many child objects of the type
browser are present on the desktop. The following is the code that
explains it:
It is a feature that QTP provides to make your test wait until a certain
property on a certain object becomes an expected value before
proceeding with the next steps. More information in tutorial #24.
This is to stop the execution of your test at a certain point while its
running. Typically it is used to observe the state of your application or to
understand how a certain feature works at a certain phase at runtime.
(The checking is of course a manual step.)
VB Script does not have any specific throw object. (At least to the best of
my knowledge) This question will not come up unless a specific add-in
that supports this feature is explored.
13) How do you know the location Id of an object if you know its
index id?
Location is the position of the object from left to right and top to bottom
within the parent window, frame, or dialog box relative to other similar
objects.
Index Id: is the order in which the object appears in your AUT relative to
other similar objects. E.g if you have 2 links, then index id=0 will be first
link and index id=1 will be the second link.
Calling one action from the other can be done by Inserting a call to an
existing action or by creating a new action. Please refer tutorial #21 for
detailed explanation.
18) How you can identify browser and its information using QTP
script?
You can identify and act on any browser that you opened again by
referring to its creationtime property and use it like you would with a
browser object in your OR.
Keyword view: This is a tabular representation of your test that has the
information like the Item, Operation,Data and Comments.
Expert view: This displays your test in terms of the actual lines of code. It
is more like a VB Script editor and is used by advanced users.
What is the expected result for each of the following test cases?
A.TC1: Anand is a 32 year old married, residing in Kolkatta.
B.TC3: Attapattu is a 65 year old married person, residing in Colombo.
a) A Issue membership, 10% discount, BIssue membership, offer no
discount. B
b) A Dont Issue membership, B Dont offer discount. C
c) A Issue membership, no discount, B Dont Issue membership.
d) A Issue membership, no discount, B- Issue membership with 10%
discount.
Evaluating the options:
Explanation:
For TC1: follow the path in green color
(The person is Indian resident, so select only True options.
The person is aged between 18-55, so select only True
The person is a married, so again select only True
For this person, the actions under Rule 4 will be applied. That is, issue
membership and no discount)
For TC3: follow the path in blue color
(The person is not Indian resident, so select only False (under Rule 1)
The person is not aged between 18-55. No need to select any path, as it
is written Dont care.
The person is married. No need to select any path, as it is written Dont
care.
For this person, the actions under Rule1 will be applied, That is, Dont
issue membership and no discount.)
So, the answer is C