Module 4 Software testing
Module 4 Software testing
Ans:
(Functional Testing Concepts of Howden)
The four key concepts in functional testing are:
● Precisely identify the domain of each input and output variable
● Select values from the data domain of each variable having important properties.
● Consider combinations of special values from different input domains to design test
cases.
● Consider input values such that the program under test produces special values
from the domains of the output variables.
Ans:
IDM
Ans:
BVA 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 in design technique as it is
1
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)
It is also termed Equivalence Class Partitioning (ECP). It is a Black Box Testing technique,
where a range of input values are divided into equivalence data classes. In this, the tester
tests a random input value from the defined interval of equivalence data classes and if the
output for that input value is valid, then the whole class interval is considered valid and
vice-versa.
Example: An application allows the user to enter the password of length 8-12 numbers
(minimum 8 and maximum 12 numbers).
ADVANTAGES
● A small number of test cases are required
to adequately cover a large input domain.
● Gives better idea about the input domain
being covered with the selected test cases.
● Higher probability of uncovering defects.
● The equivalence class partitioning technique
is not restricted to input conditions alone, it
can be applied to output conditions as well.
2
4. What is functional testing and highlight the important steps.
Ans:
Functional testing is a type of software testing that validates the software system against the
functional requirements/ specifications.
Its purpose is to test each function of the software application by providing appropriate input,
verifying the output against the functional requirements.
Functional testing mainly involves black box testing and is not concerned regarding the source
code of the application.
This testing checks user interface, APIs, data base , security etc..
Objectives
❖ Mainline functions
❖ Basic usability
❖ Accessibility
❖ Error conditions
3
Steps in functional testing
Performed using the functional specifications Checks the performance, reliability, scalability and
provided by the clients. other non- functional aspects of the software
system.
Business requirements are the inputs Performance parameters like speed, scalability are
the inputs
Describes what the product does Describes how good the product works
● Unit Testing: Testing individual components or pieces of code (units) to ensure they work
as expected. Tools : JUnit, NUnit, TestNG, etc.
● Integration Testing: Testing the integration or interaction between multiple
units/modules to ensure they work together correctly. Include Top- Down integration testing,
Bottom- Up Integration testing. Tools : JUnit, NUnit, TestNG, etc.
● System Testing: Testing the complete and fully integrated software product. Includes
functional and non- functional testing.
● Regression Testing: Testing to ensure that new changes have not adversely affected the
existing functionality. Types: Corrective Regression Testing, Progressive Regression Testing
● Smoke Testing: A type of testing to check whether the most crucial functions of a
software application are working. Tools: Automated scripts using tools like Selenium, QTP,
etc.
● Ad-hoc Testing: Informal testing without any formal test cases or plan. Tools: Often
manual and based on tester’s intuition and experience.
● Retesting : is a type of functional testing aimed at verifying that specific defects identified
in previous testing cycles have been successfully fixed.
● Database Testing: is a type of functional testing that validates the integrity, accuracy,
and reliability of data in a database. It involves testing the backend databases.
4
● Component testing : Component Testing (also known as module testing or unit testing)
is a type of functional testing focused on individual components or modules of a software
application.
● Acceptance Testing: is the process of verifying that a software system meets the
specified requirements and is ready for delivery to the end-users.
● White Box Testing :(also known as Clear Box, Glass Box, or Structural Testing)
involves testing the internal structures or workings of an application.
● Black Box Testing: involves testing the functionality of an application without knowing
its internal structures or workings
● Grey Box Testing
● Static Testing : is a form of software testing where the code is not executed. Instead, the
code, documentation, and design documents are examined manually or with automated tools
to find errors, omissions, and inconsistencies. Static testing helps in identifying issues early in
the software development lifecycle, which can reduce the cost and time required for defect
resolution.
Ans:
Preconditions in software testing are specific conditions or states that must be met before the
execution of a particular function or test case. They define the environment, setup, and necessary
inputs required for a system to operate correctly. Preconditions are excellent sources for identifying
functionality-based characteristics because they establish the baseline for expected behavior and
system readiness. Here's why:
● Ensuring System Readiness
o Validation of Initial States:
o Consistency and Reliability:
● Test Coverage
o Comprehensive Test Scenarios:
o Boundary and Edge Case Testing:
● Facilitating Regression Testing
o Baseline for Comparisons:
● Improving Defect Detection
o Early Detection of Issues:
o Isolating Defects:
By defining these preconditions, testers can ensure that the functionality being tested (e.g., successful login,
handling of incorrect credentials) is evaluated under the appropriate conditions.
5
Ans:
⮚ Orthogonal Array Testing (OAT) is software testing technique that uses orthogonal arrays
to create test cases.
⮚ It is statistical testing approach especially useful when system to be tested has huge data
inputs.
⮚ Orthogonal array testing helps to maximize test coverage by pairing and combining the
inputs and testing the system with comparatively less number of test cases for time saving.
⮚ For example, when a train ticket has to be verified, factors such as – the number of
passengers, ticket number, seat numbers, and train numbers have to be tested. One by one
testing of each factor/input is cumbersome. It is more efficient when the QA engineer
combines more inputs together and does testing. In such cases, we can use the Orthogonal
Array testing method.
⮚ This type of pairing or combining of inputs and testing the system to save time is called
Pairwise testing. OATS technique is used for pairwise testing.
⮚ Orthogonal arrays are highly useful for reducing the number of test cases required in a
testing process.
o Identify Variables and Levels: Begin by identifying the variables in your testing
scenario. Variables represent the different factors or attributes you want to test. For each
variable, determine its levels, which are the specific values or states that it can take. For
example, in testing a login form, variables might include username, password, and
authentication method, each with multiple levels.
o Create an Orthogonal Array: Select an appropriate orthogonal array that matches
the number of variables and their levels. The specific orthogonal array you choose depends
on the project’s requirements.
o Generate Test Cases: Utilize the selected orthogonal array to generate a set of test
cases. Each row in the orthogonal array represents a unique combination of variable levels,
forming a test case. For instance, if your orthogonal array has three rows, you’ll have three
test cases, each covering a different combination of variables and levels.
Advantages
Disadvantages
o Applicability Challenges: OAT may not be suitable for all types of software
o Limited to Quantifiable Variables: OAT is most effective when dealing with
quantifiable variables. It may not be suitable for testing qualitative or non-numeric
aspects of a system
o Creating an appropriate orthogonal array can be complex and requires a good
understanding of combinatorial mathematics
6
Ans:
● The central idea in boundary value analysis is to select the test data near the boundary of a
data domain so that the data both within and outside the equivalence class are selected.
● The BVA technique is an extension and refinement of the equivalence class partitioning
technique.
● In the BVA technique, the boundary conditions for the equivalence class are analyzed
in-order to generate test cases.
Guidelines
❖ The equivalence class specifies a range: If an equivalence class specifies a range of
values, then construct test cases by considering the boundary points of the range and
points just beyond the boundaries of the range.
❖ The equivalence class specifies a number of values: , then construct test cases for
the minimum and the maximum value of the number. In addition, select a value smaller
than the minimum and a value larger than the maximum value.
❖ The equivalence class specifies an ordered list: , then focus attention on the first
and last elements of the set.
o The decision table is a software testing technique which is used for testing the system
behavior for different input combinations.
o This is a systematic approach where the different input combinations and their corresponding
system behavior are captured in a tabular form.
o This table helps you deal with different combination of inputs with their associated outputs.
o Also, it is known as the cause-effect table because of an associated logical diagramming
technique called cause-effect graphing that is basically used to derive the decision table.
o It comprises of a set of conditions (or, causes) and a set of effects (or, results) arranged in
the form of a column on the left of the table.
o In the second column, next to each condition, we have its possible values: Yes(Y), No(N) and
don’t care (“-“)
o To the right of the values column, we have a set of rules. For each combination of the three
conditions { C1, C2, C3 }, there exists a rule from the set {R1, R2, R3…R8}.
o Each rule comprises a Y, N or – response, and contains an associated list of effects {E1, E2,
E3}
o For each relevant effect, an effect sequence number specifies the order in which the effect
should be carried out, if the associated set of conditions are satisfied.
o The “Checksum” is used for the verification of the combinations.
o Each rule of a decision table represents a test case.
7
C1 Y, N, - Y Y Y Y Y Y Y Y
C2 Y, N, - Y N Y N Y Y N Y
C3 Y, N, - N N Y Y N N N Y
Effects
E1 1 1 1 1
E2 2 1 1 1 2
E3
Checksum 8 1 1 2 3 1
Ans:
o In the random testing approach, test inputs are selected randomly from the input domain of
the system.
o It gives us an advantage of easily estimating software reliability from test outcomes.
o Computing expected outcomes becomes difficult, if the inputs are randomly chosen.
o Therefore, the technique requires good test oracles to ensure the adequate evaluation of test
results.
o A test oracle mechanism is that verifies the correctness of program outputs.
Steps:
Step 1: The input domain is identified.
Step 2: Test inputs are selected independently from the domain.
Step 3: The system under test is executed on these inputs. The inputs constitute a random test set.
8
Step 4: The results are compared to the system specifications. The test is a failure if any input leads
to incorrect results. Otherwise it is a success.