Unit 4 - Testing Operating System SEM-5
Unit 4 - Testing Operating System SEM-5
“Testing is the process of executing a program with the intent of finding errors.”
Although software testing is itself an expensive activity, yet launching of software without testing
may lead to cost potentially much higher than that of testing, specially in systems where human
safety is involved. In the software life cycle the earlier the errors are discovered and removed, the
lower is the cost of their removal.
A fault is the representation of an error, where representation is the mode of expression, such as
narrative text, data flow diagrams, ER diagrams, source code etc. Defect is a good synonym for
fault.
A failure occurs when a fault executes. A particular fault may cause different failures, depending on
how it has been exercised.
The set of test cases is called a test suite. Hence any combination of test cases may generate a test
suite.
Verification is the process of evaluating a system or component to determine whether the products
of a given development phase satisfy the conditions imposed at the start of that phase.
Validation is the process of evaluating a system or component during or at the end of development
process to determine whether it satisfies the specified requirements .
Testing= Verification+Validation
Q8. What is Acceptance Testing?
The term Acceptance Testing is used when the software is developed for a specific customer. A
series of tests are conducted to enable the customer to validate all requirements. These tests are
conducted by the end user / customer and may range from adhoc tests to well planned systematic
series of tests.
Functional testing is defined as a type of testing that verifies that each function of the software
application works in conformance with the requirement and specification. This testing is not
concerned with the source code of the application. Each functionality of the software application is
tested by providing appropriate test input, expecting the output, and comparing the actual output
with the expected output.
Boundary Value Analysis is based on testing the boundary values of valid and invalid partitions.
The behavior at the edge of the equivalence partition is more likely to be incorrect than the behavior
within the partition, so boundaries are an area where testing is likely to yield defects.
It checks for the input values near the boundary that have a higher chance of error. Every partition
has its maximum and minimum values and these maximum and minimum values are the boundary
values of a partition.
Q11. What is Robustness Testing?
It is nothing but the extension of boundary value analysis. Here, we would like to see, what happens
when the extreme values are exceeded with a value slightly greater than the maximum, and a value
slightly less than minimum. It means, we want to go outside the legitimate boundary of input
domain. This extended form of boundary value analysis is called robustness testing.
Boundary Value analysis uses the critical fault assumption and therefore only tests for a
single variable at a time assuming its extreme values. By disregarding this assumption we
are able to test the outcome if more than one variable were to assume its extreme value.
In an electronic circuit this is called Worst Case Analysis. In Worst-Case testing we use
this idea to create test cases.
Equivalence Class Testing, which is also known as Equivalence Class Partitioning (ECP) and
Equivalence Partitioning, is an important software testing technique used by the team of testers
for grouping and partitioning of the test input data, which is then used for the purpose of testing the
software product into a number of different classes.
These different classes resemble the specified requirements and common behaviour or attribute(s)
of the aggregated inputs. Thereafter, the test cases are designed and created based on each class
attribute(s) and one element or input is used from each class for the test execution to validate the
software functioning, and simultaneously validates the similar working of the software product for
all the other inputs present in their respective classes.
Most of the time, equivalence class testing defines classes of the input domain. However,
equivalence classes should also be defined for output domain. Hence, we should design equivalence
classes based on input and output domain.
Decision tables are used in various engineering fields to represent complex logical relationships.
This testing is a very effective tool in testing the software and its requirements management. The
output may be dependent on many input conditions and decision tables give a tabular view of
various combinations of input conditions and these conditions are in the form of True(T) and
False(F). Also, it provides a set of conditions and its corresponding actions required in the testing.
In software testing, the decision table has 4 parts which are divided into portions and are
given below :
1. Condition Stubs : The conditions are listed in this first upper left part of the decision table
that is used to determine a particular action or set of actions.
2. Action Stubs : All the possible actions are given in the first lower left portion (i.e, below
condition stub) of the decision table.
3. Condition Entries : In the condition entry, the values are inputted in the upper right portion
of the decision table. In the condition entries part of the table, there are multiple rows and
columns which are known as Rule.
4. Action Entries : In the action entry, every entry has some associated action or set of actions
in the lower right portion of the decision table and these values are called outputs.
Cause Effect Graphing based technique is a technique in which a graph is used to represent the
situations of combinations of input conditions. The graph is then converted to a decision table to
obtain the test cases. Cause-effect graphing technique is used because boundary value analysis and
equivalence class partitioning methods do not consider the combinations of input conditions. But
since there may be some critical behaviour to be tested when some combinations of input conditions
are considered, that is why cause-effect graphing technique is used.
Structural testing is a type of software testing that uses the internal design of the software for
testing or in other words the software testing which is performed by the team which knows the
development phase of the software, is known as structural testing.
Structural testing is related to the internal design and implementation of the software i.e. it involves
the development team members in the testing team. It tests different aspects of the software
according to its types. Structural testing is just the opposite of behavioral testing.
Q17. What is Path Testing?
Structural testing is related to the internal design and implementation of the software i.e. it involves
the development team members in the testing team. It tests different aspects of the software
according to its types. Structural testing is just the opposite of behavioral testing.
Control flow testing is a type of structural testing that uses the programs’s control flow as a model.
The entire code, design and structure of the software have to be known for this type of testing.
Often this type of testing is used by the developers to test their own code and implementation. This
method is used to test the logic of the code so that required result can be obtained.
The control flow of a program can be analysed using a graphical representation known as flow
graph. The flow graph is a directed graph in which nodes are either entire statements or fragments
of a statement, and edges represents flow of control.
It uses the control flow graph to explore the unreasonable things that can happen to data. The
detection of data flow anomalies are based on the associations between values and variables.
Without being initialized usage of variables. Initialized variables are not used once.
As we know, variables are defined and referenced throughout the program. We may have few
define/ reference anomalies:
Mutation Testing is a type of Software Testing that is performed to design new software tests and
also evaluate the quality of already existing software tests. Mutation testing is related to
modification a program in small ways. It focuses to help the tester develop effective tests or locate
weaknesses in the test data used for the program.
Mutation testing is a fault based technique that is similar to fault seeding, except that mutations to
program statements are made in order to determine properties about test cases. it is basically a fault
simulation technique.
Multiple copies of a program are made, and each copy is altered; this altered copy is called a
mutant. Mutants are executed with test data to determine whether the test data are capable of
detecting the change between the original program and the mutated program.
Q21. Difference between is Unit Testing and Integration Testing.
S.
Unit Testing Integration Testing
No.
In unit testing, each module of the software is In integration testing, all modules of the
1.
tested separately. software are tested combined.
In unit testing tester knows the internal design Integration testing doesn’t know the internal
2.
of the software. design of the software.
Unit testing is performed first of all testing Integration testing is performed after unit
3.
processes. testing and before system testing.
4. Unit testing is white box testing. Integration testing is black box testing.
5. Unit testing is performed by the developer. Integration testing is performed by the tester.
Detection of defects in integration testing is
6. Detection of defects in unit testing is easy.
difficult.
It tests parts of the project without waiting for
7. It tests only after the completion of all parts.
others to be completed.
8. Unit testing is less costly. Integration testing is more costly.
Unit testing is responsible to observe only the Error detection takes place when modules are
9.
functionality of the individual units. integrated to create an overall system.
10. Module specification is done initially. Interface specification is done initially.
The proper working of your code with the The proper working of your code with the
11. external dependencies is not ensured by unit external dependencies is ensured by
testing. integration testing.
12. Maintenance is cost effective. Maintenance is expensive.
Fast execution as compared to integration Its speed is slow because of the integration of
13.
testing. modules.
Unit testing results in in-depth exposure to the Integration testing results in the integration
14.
code. structure’s detailed visibility.
System Testing
Aspects Unit Testing
Tests the complete system or software
Scope of Tests individual units or components of the
application
testing software application in isolation
Typically manual and performed by
Timing
Typically automated and performed by independent testers after the completion of
of
developers during the coding phase integration testing
testing
Focuses on verifying the functionality of Focuses on verifying the functionality of
Focus of
each unit or component of the software the system as a whole
testing
application
Testing Tests are executed in a controlled Tests are executed in a production-like
environm environment, typically using mock objects or environment to simulate real-world usage
ent test doubles to isolate the unit being tested scenarios
System Testing
Aspects Unit Testing
The goal of testing is to identify errors (bugs) in the program. The process of testing generates
symptoms, and a program’s failure is a clear symptom of the presence of an error. After getting a
symptom, we begin to investigate the cause and place of that error. After identification of place, we
examine that portion to identify the cause of the problem. This process is called debugging.
One way to improve the quality & quantity of testing is to make the process as pleasant as possible
for the tester. This means that tools should be as concise, powerful & natural as possible.
The two broad categories of software testing tools are :
• Static
• Dynamic
Q28. What are the types of testing tools?
Static Test Tools: Static test tools are used to work on the static testing processes. In the testing
through these tools, the typical approach is taken. These tools do not test the real execution of the
software. Certain input and output are not required in these tools. Static test tools consist of the
following:
• Flow analyzers: Flow analyzers provides flexibility in the data flow from input to output.
• Path Tests: It finds the not used code and code with inconsistency in the software.
• Coverage Analyzers: All rationale paths in the software are assured by the coverage
analyzers.
• Interface Analyzers: They check out the consequences of passing variables and data in the
modules.
Dynamic Test Tools: Dynamic testing process is performed by the dynamic test tools. These tools
test the software with existing or current data. Dynamic test tools comprise the following:
• Test driver: The test driver provides the input data to a module-under-test (MUT).
• Test Beds: It displays source code along with the program under execution at the same time.
• Emulators: Emulators provide the response facilities which are used to imitate parts of the
system not yet developed.
• Mutation Analyzers: They are used for testing the fault tolerance of the system by
knowingly providing the errors in the code of the software.