3.lecture Notes
3.lecture Notes
3 13
No No
Test Objective Identification, Test Design Factors, Requirement identification, Testable
Topic
Requirements
Bloom’sKnowledge
Learning Outcome (LO) At the end of this lecture, students will be able to
Level
LO1 Identify Test Objective K2
LO2 Analyse the factors of test design. K2
LO3 Find out the requirement of testing K3
1. Positive
2. Negative
3. User Interface
4. Usability
5. Performance
6. Security
7. Reliability
8. Compatibility
Positive: Testing the software in the positive way, that is to check whether the system is functioning
properly with correct inputs. For example, testing an number field with integers.
Negative: Testing the software in a negative way, that is to check whether the system fails on
giving wrong inputs. For example, testing a number field with alphabets, special characters etc.
User Interface: Testing the user interaction with the system. For example testing the links, images,
alignment, padding, font, colour, labels, navigation, button etc
Usability : Testing the efficiency and accuracy of the software, that is to determine whether the user
is able to perform the specified task. Successful login/registration to a site by a user is a perfect
example.
Performance: Testing the performance of the system under a particular workload. Load and stress
testing is an example for performance testing ie, testing a system by running multiple applications,
testing with maximum number of users etc
Security: Testing the security of the system ie, to determine whether the data is protected or not.
For example logged out users, by copy pasting the URL or by any other method, should not be able
to access the pages which are accessible only for logged in users.
Security testing includes Authentication, Authorization, Confidentiality, Integrity, Non-repudiation
Reliability: Testing the consistency of the system, that is to determine whether the system is
functioning properly in all conditions repeatedly. For example, the system will produce the same
result on doing the repeated action.
Compatibility: Testing the compatibility of the system on different environments that is to ensure
the functioning of the system on different browsers, hardware and operating system platforms. For
example testing the product in different platforms like Windows, Linux, Mac etc and on different
browsers like Mozilla Firefox, Chrome, Safari, IE etc.
Testable requirements
Testable requirements are essential to ensure that the software meets the needs of the business.
Testing involves verifying that each requirement has been met by the software. It's important to
develop tests based on the intended behavior described and not on the behavior delivered.
Assessment questions to the lecture
Bloom’s
Qn. No. Question Answer Knowledge
Level
1 _____________serves as a blue print. Testcase K1
Checking of data protection is done through
1. Availability
2. Security
2 2 K2
3. Reliability
4. Compatability
Students have to prepare answers for the following questions at the end of the lecture
Bloom’s
Qn. No Question Marks CO Knowledge
Level
1 List out the design factors of test case design. 2 3 K1
2 What are the objectives of Test design? 5 3 K1
Reference Book
Draft State The test group, also known as the system test squad, is the entity in charge of
maintaining this condition. During this phase of the process, the designated test engineer is
responsible for entering the following data: tc_author, objective, setup, test_steps, cleaning,
pf_criteria, candidate_for_automation, and automation_priority. After the creator of the test case
has finished filling out all of the required sections, the test engineer may transfer the test case to the
creator so that the creator can run through the test case. The test case will remain in this condition
until the developer examines it and moves through each step. After that, the creator has the ability
to change the status of the document from the draft state to the review state by entering all of the
names of the approvers into the section labeled "approver_names."
States That Were Reviewed and Eliminated The person who initially developed the test scenario is
also the proprietor of the evaluation state. The proprietor extends an invitation to the test engineers
and developers to look over the test case and validate it. They check to see that the test case can be
run, and that the conditions for passing or failing are articulated in detail. In the event that any of
the fields require an update, action items pertaining to the test scenario are formulated. Action items
resulting from a review conference are entered into the review_actions section, and the owner of the
test case is responsible for carrying out the action items in order to implement modifications. After
receiving positive feedback from all of the evaluators, the test case is moved into the released stage.
In the event that the evaluators come to the conclusion that this is not a legitimate test case or that it
cannot be executed, the test case will be shifted to the deleted state. In order to remove a test case,
there must first be a review action item that states "delete this test case." States That Are Both
Released and Up to Date When a test case is in the published state, it is in a state where it is ready
to be run, and it is added to a test suite. On the other hand, a test case that is in the update state
indicates that it is currently undergoing one or more of the following processes: having its
reusability improved; having its pass–fail parameters fine-tuned; and/or having the specific test
procedure fixed. For instance, rather than hard coding the data values, a repeatable test case ought
to make use of parameters instead. In addition, a test case needs to be changed so that it can be
adapted to changes in the surroundings or the functionality of the system. By taking a test case
through the released–update cycle a limited number of times, one can improve the reproducibility of
the test case, thereby making it easier for other people to rapidly comprehend, borrow, and reuse it.
In addition to this, this lays the groundwork and justifies the need for the test case to be
mechanized. It is important for a test scenario to be platform agnostic. After implementing a remedy
for a bug, a test engineer might return a test case to its previously released state if an upgrade only
introduces a minor
Bloom’s
Qn. No. Question Answer Knowledge
Level
Which is not test case variable?
a. requirement_ids,
1 b. tc_id, tc_title, d K2
c. originator_group
d. customer_id
After a test case has been designed or selected, its
2 True K2
execution status is reset to its original state. (Truse /False)
Students have to prepare answers for the following questions at the end of the lecture
Bloom’s
Qn. No Question Marks CO Knowledge
Level
1 Elaborate the test modeling of test design process. 13 3 K1
2 Describe the model of test results. 13 3 K1
Reference Book
Boundary Value Analysis and Equivalence Class Partitioning are the most common technique in
Black-box Testing Techniques for test case design. Both are used to design test cases for validating
a range of values for any given input domain. Both these techniques are used together at all levels
of testing.
It is used to check the behavior of application using test data that exist at boundary values or in
more easy words, for a range of input data values, boundary values (extreme end values) are used
as input for testing. It is mostly used design technique as it is believed that software is most likely
to fail at upper and lower limits of input data values.
Example: A software allows people of age 20 to 50 years (both 20 and 50 are inclusive) to fill a
form, for which the user has to enter his age in the age field option of the software.
The boundary values are 20 (min value) and 50 (max value).
In the above table, one can clearly identify all valid and invalid test values (values consider
during testing the system).
1. Valid value: Test values at which the system does not fail and function properly as per user
requirement.
2. Invalid Values: test values that do not meet the system requirement.
Boundary Value Analysis Sample
Consider an example where a developer writes code for an amount text field which will accept and
transfer values only from 100 to 5000. The test engineer checks it by entering 99 into the amount
text field and then clicks on the transfer button. It will show an error message as 99 is an invalid test
case, because the boundary values are already set as 100 and 5000. Since 99 is less than 100, the
text field will not transfer the amount.
Equivalence Partitioning
This black-box testing technique is also referred to as Equivalence Class Partitioning (ECP). This
test case design technique is typically used to reduce the total number of test cases to a finite set
of testable test cases, still covering maximum requirements.
In this method, the input domain data containing a range of input values is divided into different
equivalence data classes (at times also referred to as split sets). Test cases should be written in such
a way that they cover each equivalence partition (also called equivalence data class) at least once.
During test case execution, each value of every equivalence partition must display the same output
behavior as the other one. This method is established on the assumption that if one condition/value
in an equivalence partition passes, then all others will as well. Similarly, if one of the partition’s
conditions fails, the partition’s other condition/value will likewise fail.
In short, it is the process of picking all possible test cases and carefully placing them into
equivalence classes. One test value is picked from each class while testing.
This means a QA person tests a random value from each defined equivalence data class and if the
verification of the output value is successful for that input value, then the entire equivalence
class/partition is considered valid and vice versa.
Example #1: If you are testing for an input box accepting numbers from 1 to 1000, then there is no
use in writing thousands of test cases for all 1000 valid input numbers plus other test cases for
invalid data.
Using the Equivalence Partitioning method discussed above, test cases can be divided into three sets
of input data, called equivalence data classes. Each test case is representative of the respective
equivalence class.
So in the above example, we can divide our test cases into three equivalence classes of some valid
and invalid input values.
Test cases for input box accepting numbers between 1 and 1000 using Equivalence
Partitioning:
#1) Valid data test case (value between 1 and 1000): This includes one input data class with all
valid inputs. Pick a single value from the range of 1 to 1000 (say 99) as a valid test case. If you
select other values between 1 and 1000, then the result is going to be the same. So one test case for
valid input data should be sufficient.
#2) Invalid data test case (value less than 1): Here, input data class with all values below the
lower limit. i.e., any value below 1 (say zero), as an invalid input data test case.
#3) Invalid data test case (value greater than 1000): Input data with any value greater than 1000
(say 1001) to represent the invalid input class and the third equivalence class.
Bloom’s
Qn. No. Question Answer Knowledge
Level
What is an equivalence partition (also known as an
equivalence class)?
a) A set of test cases for testing classes of objects.
b) An input or output range of values such that only one
1 value in the range becomes a test case. b K2
c) An input or output range of values such that each value
in the range becomes a test case.
d) An input or output range of values such that every tenth
value in the range becomes a test case.
2. One of the fields on a form contains a text box which
accepts numeric values in the range of 18 to 25.
Indentify the invalid Equivalence class
a) 17 a K2
b) 19
c) 24
d) 21
3. In a Examination a candidate has to score minimum
of 24 marks inorder to clear the exam. The maximum
c K2
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
Equivalence partitioning is:
a. A black box testing technique used only by developers
b. A black box testing technique than can only be used
during system testing
2 c K2
c. A black box testing technique appropriate to all levels
of testing
d. A white box testing technique appropriate for
component testing
Which of the following is a valid collection of
equivalence classes for the following problem: An
integer field shall contain values from and
including 1 to and including 15
a K2
a. Less than 1, 1 through 15, more than 15
b. Negative numbers, 1 through 15, above 15
c. Less than 1, 1 through 14, more than 15
d. Less than 0, 1 through 14, 15 and more
Students have to prepare answers for the following questions at the end of the lecture
Bloom’s
Qn. No Question Marks CO Knowledge
Level
1 Consider an example where a developer writes code for an 7 3 K3
amount text field which will accept and transfer values
only from 100 to 5000.
Write the BVA test cases for the above.
2 What is BVA? 2 3 K1
3 Define Equivalence class partitioning. 2 3 K1
4 Compare BVA & Equivalence partitioning test. 5 3 K2
Reference Book
If a statement is a loop or if condition then its DEF set is empty and USE set is based on the
condition of statement s. Data Flow Testing uses the control flow graph to find the situations that
can interrupt the flow of the program. Reference or define anomalies in the flow of the data are
detected at the time of associations between values and variables. These anomalies are:
A variable is defined but not used or referenced,
A variable is used but never defined,
A variable is defined twice before it is used
Types of Data Flow Testing:
1. Testing for All-Du-Paths: It Focuses on ―All Definition-Use Paths. All-Du-Paths is an
acronym for ―All Definition-Use Paths.‖ Using this technique, every possible path from a
variable’s definition to every usage point is tested.
2. All-Du-Path Predicate Node Testing: This technique focuses on predicate nodes, or decision
points, in the control flow graph.
3. All-Uses Testing: This type of testing checks every place a variable is used in the application.
4. All-Defs Testing: This type of testing examines every place a variable is specified within the
application’s code.
5. Testing for All-P-Uses: All-P-Uses stands for ―All Possible Uses.‖ Using this method, every
potential use of a variable is tested.
6. All-C-Uses Test: It stands for ―All Computation Uses.‖ Testing every possible path where a
variable is used in calculations or computations is the main goal of this technique.
7. Testing for All-I-Uses: All-I-Uses stands for ―All Input Uses.‖ With this method, every path
that uses a variable obtained from outside inputs is tested.
8. Testing for All-O-Uses: It stands for ―All Output Uses.‖ Using this method, every path where
a variable has been used to produce output must be tested.
9. Testing of Definition-Use Pairs: It concentrates on particular pairs of definitions and uses for
variables.
10. Testing of Use-Definition Paths: This type of testing examines the routes that lead from a
variable’s point of use to its definition.
Advantages of Data Flow Testing:
Data Flow Testing is used to find the following issues-
To find a variable that is used but never defined,
To find a variable that is defined but never used,
To find a variable that is defined multiple times before it is use,
Deallocating a variable before it is used.
Disadvantages of Data Flow Testing
Time consuming and costly process
Requires knowledge of programming languages
Example:
1. read x, y;
2. if(x>y)
3. a = x+1
else
4. a = y-1
5. print a;
Control flow graph of above example:
x 1 2, 3
y 1 2, 4
a 3, 4 5
Bloom’s
Qn. No. Question Answer Knowledge
Level
Analyzing data flow in a program is done using ____
A. White box testing
B. Gray box testing
1 C. Black box testing b K2
D. Data flow testing
Answer: D) Data flow testing
Students have to prepare answers for the following questions at the end of the lecture
Bloom’s
Qn. No Question Marks CO Knowledge
Level
1 What are the Test Design Preparedness Metrics? 7 3 K3
2 def factorial(n): 5 3 K3
if n == 0:
return 1
else:
return n * factorial(n - 1)
print(factorial(5))
Draw data flow testing for the above problem
3 Explain the concept of Data flow testing with example. 13 3 K1
Reference Book
Bloom’s
Qn. No. Question Answer Knowledge
Level
Test automation process, make it hard to do regression
1 testing in less time compared to manual testing . (True / False K2
False)
2 Which of the following phase is not under MDTD? b K2
a) Test design
b) Test correction
c) Test Execution
d) Test Verification
Students have to prepare answers for the following questions at the end of the lecture
Bloom’s
Qn. No Question Marks CO Knowledge
Level
1 What are the Phased of Modern test design? Explain 7 3 K2
in detail.
2 Elaborate in detail the testing procedures of software. 5 3 K2
3 Which phase of MDTD is harder? Why? 13 3 K2
Reference Book
Bloom’s
Qn. No. Question Answer Knowledge
Level
Test automation process, make it hard to do regression
1 testing in less time compared to manual testing . (True / False K2
False)
Which of the following phase is not under MDTD?
e) Test design
2 f) Test correction b K2
g) Test Execution
h) Test Verification
Students have to prepare answers for the following questions at the end of the lecture
Bloom’s
Qn. No Question Marks CO Knowledge
Level
1 Define zero assumption. 2 3 K1
2 Explain about Test Case Organization and Tracking 13 3 K2
Reference Book