Professional Documents
Culture Documents
Software Testing
Software Tester
Software Developer
Project Lead/Manager
End User
Different companies have different designations for people who test the
software on the basis of their experience and knowledge such as Software
Tester, Software Quality Assurance Engineer, QA Analyst, etc.
It is not possible to test the software at any time during its cycle. The next two
sections state when testing should be started and when to end it during the
SDLC.
Software testing can be divided into two steps:
Verification Validation
Functional Testing is a testing technique that is used to test the features/functionality of the system or
Software, should cover all the scenarios including failure paths and boundary cases.
Functional Testing is a type of software testing whereby the system is tested against the functional
requirements/specifications. Functions (or features) are tested by feeding them input and examining the
output. Functional testing ensures that the requirements are properly satisfied by the application. This
type of testing is not concerned with how processing occurs, but rather, with the results of processing. It
simulates actual system usage but does not make any system structure assumptions.
During functional testing, Black Box Testing technique is used in which the internal logic of the system
being tested is not known to the tester.
Functional testing is normally performed during the levels of System Testing and Acceptance Testing.
Functional testing is more effective when the test conditions are created directly from user/business
requirements. When test conditions are created from the system documentation (system requirements/
design documents), the defects in that documentation will not be detected through testing and this may be
the cause of end-users‟ wrath when they finally use the software.
Advantages
Simulates actual system usage.
Makes no system structure assumptions.
Disadvantages
Potential of missing logical errors in software.
Possibility of redundant testing.
Unit Testing
Integration Testing
Smoke Testing
User Acceptance Testing
Localization Testing
Interface Testing
Usability Testing
System Testing
Regression Testing
Globalization Testing
In this method, tester selects a function and gives input value to examine its
functionality, and checks whether the function is giving expected output or not.
If the function produces correct output, then it is passed in testing, otherwise
failed. The test team reports the result to the development team and then tests
the next function. After completing testing of all functions if there are severe
problems, then it is given back to the development team for correction.
Test procedure
The test procedure of black box testing is a kind of process in which the tester
has specific knowledge about the software's work, and it develops test cases to
check the accuracy of the software's functionality.
It does not require programming knowledge of the software. All test cases are
designed by considering the input and output of a particular function.A tester
knows about the definite output of a particular input, but not about how the
result is arising. There are various techniques used in black box testing for
testing like decision table technique, boundary value analysis technique, state
Test cases
Test cases are created considering the specification of the requirements. These
test cases are generally created from working descriptions of the software
including requirements, design parameters, and other specifications. For the
testing, the test designer selects both positive test scenario by taking valid input
values and adverse test scenario by taking invalid input values to determine the
correct output. Test cases are mainly designed for functional testing but can
also be used for non-functional testing. Test cases are designed by the testing
team, there is not any involvement of the development team of software.
Decision table technique is one of the widely used case design techniques for black box testing. This is a
systematic approach where various input combinations and their respective system behavior are captured
in a tabular form.
That's why it is also known as a cause-effect table. This technique is used to pick the test cases in a
systematic manner; it saves the testing time and gives good coverage to the testing area of the software
application.
Decision table technique is appropriate for the functions that have a logical relationship between two and
more than two inputs.
This technique is related to the correct combination of inputs and determines the result of various
combinations of input. To design the test cases by decision table technique, we need to consider
conditions as input and actions as output.
Most of us use an email account, and when you want to use an email account, for this you need to enter
the email and its associated password.
If both email and password are correctly matched, the user will be directed to the email account's
homepage; otherwise, it will come back to the login page with an error message specified with "Incorrect
Email" or "Incorrect Password."
Now, let's see how a decision table is created for the login function in which we can log in by using email
and password. Both the email and the password are the conditions, and the expected result is action.
In the table, there are four conditions or test cases to test the login function. In the first condition if both
email and password are correct, then the user should be directed to account's Homepage.
Now, in fourth and last condition both email and password are incorrect then the function should display
Incorrect Email.
In this example, all possible conditions or test cases have been included, and in the same way, the testing
team also includes all possible test cases so that upcoming bugs can be cured at testing level.
In order to find the number of all possible conditions, tester uses 2n formula where n denotes the number
of inputs; in the example there is the number of inputs is 2 (one is true and second is false).
While using the decision table technique, a tester determines the expected output, if the function produces
expected output, then it is passed in testing, and if not then it is failed. Failed software is sent back to the
development team to fix the defect.
Decision table testing is a testing technique used to test system behavior for different input
combinations. This is a systematic approach where the different input combinations and their
corresponding system behavior (Output) are captured in a tabular form. That is why it is also called
as a Cause-Effect table where Cause and effects are captured for better test coverage.
A Decision Table is a tabular representation of inputs versus rules/cases/test conditions. Let's learn
with an example.
Username (T/F) F T F T
Password (T/F) F F T T
Output (E/H) E E E H
1. Any complex business flow can be easily converted into the test scenarios & test cases using this
technique.
2. Such type of table are work iteratively, means the table created at the first iteration is used as
input table for next tables. Such iteration can be carried out only if the initial table is
unsatisfactory.
3. Simple to understand and everyone can use this method design the test scenarios & test cases.
4. It provide complete coverage of test cases which help to reduce the rework on writing test
scenarios & test cases.
5. These tables guarantee that we consider every possible combination of condition values. This is
known as its “completeness property”.
Boundary value analysis is one of the widely used case design technique for black box testing. It is used
to test boundary values because the input values near the boundary have higher chances of error.
Whenever we do the testing by boundary value analysis, the tester focuses on, while entering boundary
value whether the software is producing correct output or not.
Boundary values are those that contain the upper and lower limit of a variable. Assume that, age is a
variable of any function, and its minimum value is 18 and the maximum value is 30, both 18 and 30 will
be considered as boundary values.
There is 18 and 30 are the boundary values that's why tester pays more attention to these values, but this
doesn't mean that the middle values like 19, 20, 21, 27, 29 are ignored. Test cases are developed for each
and every value of the range.
Testing of boundary values is done by making valid and invalid partitions. Invalid partitions are tested
because testing of output in adverse condition is also essential.
Imagine, there is a function that accepts a number between 18 to 30, where 18 is the minimum and 30 is
the maximum value of valid partition, the other values of this partition are 19, 20, 21, 22, 23, 24, 25, 26,
27, 28 and 29. The invalid partition consists of the numbers which are less than 18 such as 12, 14, 15, 16
and 17, and more than 30 such as 31, 32, 34, 36 and 40. Tester develops test cases for both valid and
invalid partitions to capture the behavior of the system on different input conditions.
If the software which is under test, follows all the testing guidelines and specifications then it is sent to
the releasing team otherwise to the development team to fix the defects.
Example: For a function that computes the square root of integer values in the range of 0 and 5000, the
test cases must include the following values: {0, -1,5000,5001}.
Cause-effect graph comes under the black box testing technique which underlines the relationship
between a given result and all the factors affecting the result. It is used to write dynamic test cases.
The dynamic test cases are used when code works dynamically based on user input. For example, while
using email account, on entering valid email, the system accepts it but, when you enter invalid email, it
throws an error message. In this technique, the input conditions are assigned with causes and the result of
these input conditions with effects.
Cause-Effect graph technique is based on a collection of requirements and used to determine minimum
possible test cases which can cover a maximum test area of the software.
The main advantage of cause-effect graph testing is, it reduces the time of test execution and cost.
This technique aims to reduce the number of test cases but still covers all necessary test cases with
maximum coverage to achieve the desired application quality.
Cause-Effect graph technique converts the requirements specification into a logical relationship between
the input and output conditions by using logical operators like AND, OR and NOT.
The character in column 1 should be either A or B and in the column 2 should be a digit. If both columns
contain appropriate values then update is made. If the input of column 1 is incorrect, i.e. neither A nor B,
then message X will be displayed. If the input in column 2 is incorrect, i.e. input is not a digit, then
message Y will be displayed.
A file must be updated, if the character in the first column is either "A" or "B" and in the second column it
should be a digit.
If the value in the first column is incorrect (the character is neither A nor B) then massage X will be
displayed.
If the value in the second column is incorrect (the character is not a digit) then massage Y will be
displayed.
Now, we are going to make a Cause-Effect graph for the above situation:
Causes are:
C1 - Character in column 1 is A
C2 - Character in column 1 is B
C3 - Character in column 2 is digit!
Effects:
Effect E2 - Displays Massage X - The logic for the existence of effect E2 is "NOT C1 AND NOT C2"
that means both C1 (Character in column 1 should be A) and C2 (Character in column 1 should be B)
should be false. In other words, for the existence of effect E2 the character in column 1 should not be
either A or B. We can see in the graph, C1 OR C2 is connected through NOT logic with effect E2.
Effect E3 - Displays Massage Y- The logic for the existence of effect E3 is "NOT C3" that means cause
C3 (Character in column 2 is a digit) should be false. In other words, for the existence of effect E3, the
character in column 2 should not be a digit. We can see in the graph, C3 is connected through NOT logic
with effect E3.
So, it is the cause-effect graph for the given situation. A tester needs to convert causes and effects into
logical statements and then design cause-effect graph. If function gives output (effect) according to the
input (cause) so, it is considered as defect free, and if not doing so, then it is sent to the development team
for the correction.
Conclusion
Fourth: Convert decision table rules to test cases. Each column of the decision table represents a test
case
The “Print message” is software that read two characters and, depending on their values, messages must
be printed.
LET’S START!!
Key – Always go from effect to cause (left to right). That means, to get effect “E”, what causes should be
true.
The circle in the middle is just an interpretation of the middle point to make the graph less messy.
There is a third condition where C1 and C2 are mutually exclusive. So the final graph for effect E1 to be
true is shown below:
This completes the Cause and Effect graph for the above situation.
Now let‟s move to draw the Decision table based on the above graph.
First, write down the Causes and Effects in a single column shown below
Key is the same. Go from bottom to top which means traverse from effect to cause.
Start with Effect E1. For E1 to be true, the condition is (C1 C2) C3.
Here we are representing True as 1 and False as 0
So it‟s done. Let‟s complete the graph by adding 0 in the blank column and including the test case
identifier.
Conclusion
Summarizing the steps once again:
The equivalence partitions are derived from requirements and specifications of the software. The
advantage of this approach is, it helps to reduce the time of testing due to a smaller number of test cases
from infinite to finite. It is applicable at all levels of the testing process.
For example, assume that there is a function of a software application that accepts a particular number of
digits, not greater and less than that particular number. For example, an OTP number which contains only
six digits, less or more than six digits will not be accepted, and the application will redirect the user to the
error page.
In both examples, we can see that there is a partition of two equally valid and invalid partitions, on
applying valid value such as OTP of six digits in the first example and mobile number of 10 digits in the
second example, both valid partitions behave same, i.e. redirected to the next page.
Another two partitions contain invalid values such as 5 or less than 5 and 7 or more than 7 digits in the
first example and 9 or less than 9 and 11 or more than 11 digits in the second example, and on applying
these invalid values, both invalid partitions behave same, i.e. redirected to the error page.
Example 1: For a software that computes the square root of an input integer which can assume values in
the range of 0 to 5000, there are three equivalence classes: The set of negative integers, the set of integers
in the range of 0 and 5000, and the integers larger than 5000. Therefore, the test cases must include
representatives for each of the three equivalence classes and a possible test set can be: {-5,500,6000}.
Example 2: Design the black-box test suite for the following program. The program computes the
intersection point of two straight lines and displays the result. It reads two integer pairs (m1, c1) and (m2,
c2) defining the two straight lines of the form y=mx + c.
• Intersecting lines(m1≠m2)
• Coincident lines (m1=m2,c1=c2)
Now, selecting one representative value from each equivalence class, the test suit (2, 2) (2, 5), (5,
5) (7, 7), (10, 10) (10, 10) are obtained.
they do not detect any additional defects not already being detected by other test cases in the suite. Thus,
the number of random test cases in a test suite is, in general, not an indication of the effectiveness of the
testing. In other words, testing a system using a large collection of test cases that are selected at random
does not guarantee that all (or even most) of the errors in the system will be uncovered. Consider the
following example code segment which finds the greater of two integer values x and y. This code
segment has a simple programming error.
if (x>y)
max = x;
else
max = x;
In the black-box testing approach, test cases are designed using only the functional specification of the
software, i.e. without any knowledge of the internal structure of the software. For this reason, black-box
testing is known as functional testing. On the other hand, in the white-box testing approach, designing
test cases requires thorough knowledge about the internal structure of software, and therefore the white-
box testing is called structural testing.
One white-box testing strategy is said to be stronger than another strategy, if all types of errors
detected by the first testing strategy is also detected by the second testing strategy, and the
second testing strategy additionally detects some more types of errors. When two testing
strategies detect errors that are different at least with respect to some types of errors, then they
are called complementary. The concepts of stronger and complementary testing are schematically
illustrated in figure.
Also known as closed box/data driven testing. Also knwon as clear box/structural testing.
End users, testers and developers. Normally done by testers and developers.
Structural Testing
Structural testing, also known as glass box testing or white box testing is an approach where the tests are
derived from the knowledge of the software's structure or internal implementation.
The other names of structural testing includes clear box testing, open box testing, logic driven testing or
path driven testing.
Statement Coverage - This technique is aimed at exercising all programming statements with
minimal tests.
Branch Coverage - This technique is running a series of tests to ensure that all branches are
tested at least once.
Path Coverage - This technique corresponds to testing all possible paths which means that each
statement and branch are covered.
Data Flow
Mutation Testing
There are no defects that exist in the system other than those that affect control flow
Decision to Decision path (D-D) - The CFG can be broken into various Decision to Decision paths and then
collapsed into individual nodes.
Independent (basis) paths - Independent path is a path through a DD-path graph which cannot be reproduced
from other paths by other methods.
These ambiguities might cause failures in the software if not fixed and can easily pass through testing
phase undetected.
It is the most powerful method to detect hidden defects, which might be impossible to identify using the
conventional testing techniques.
Tools such as Insure++ help us to find defects in the code using the state-of-the-art.
Debugging and Maintaining the product would be more easier than ever.
Definition: Debugging is the process of detecting and removing of existing and potential errors (also
called as „bugs‟) in a software code that can cause it to behave unexpectedly or crash. Debugging tools
are use for this purpose.
To prevent incorrect operation of a software or system, debugging is used to find and resolve bugs or
defects. When various subsystems or modules are tightly coupled, debugging becomes harder as any
change in one module may cause more bugs to appear in another. Sometimes it takes more time to debug
a program than to code it.
Debugging checks, detects and corrects errors or bugs to allow proper program operation according to set
specifications.
Debugging Approaches:
The following are a number of approaches popularly adopted by programmers for debugging.
Testing Debugging
It is the process to identify the failure of implemented It is the process to give the absolution to
code. code failure.
There is no need of design knowledge in the testing Debugging can‟t be done without proper
process. design knowledge.
It is based on different testing levels i.e. unit testing, Debugging is based on different types of
integration testing, system testing etc. bugs.
Selenium
Selenium is one of the oldest and most popular tools in test automation.
UFT/QTP
Unified Functional Test (UFT), formerly known as Quick Test Professional (QTP), is a leading cross-
platform test automation tool.
Katalon Studio
Katalon Studio is another popular open-source test automation tool for the web and mobile environment.
Silk Test
Silk Test is a test automation tool from Microfocus used for automated functional and regression testing.
It is known for its speedy, efficient and high-quality test automation
Squish
Squish has become the latest sensation in test automation. It is the number one choice for organizations
when it comes to GUI test automation worldwide.
TestComplete
Ranorex
Ranorex is an all-in-one GUI test automation tool from Ranorex Studio. Ranorex is used for end-to-end
testing on mobile, desktop and web application
Appium
SoapUI
As the name indicates, SoapUI is a widely used open-source test automation tool for SOAP and REST
APIs. SoapUI is a functional testing tool explicitly designed for API testing by SmartBear.
EggPlant
EggPlant is a black-box GUI test automation tool. For software testers, Eggplant offers an assortment of
test automation tools utilizing which you can perform various types of testing.
Alpha testing is conducted in the organization and tested by a representative group of end-users at the
developer's side and sometimes by an independent team of testers.
Alpha testing is simulated or real operational testing at an in-house site. It comes after the unit testing,
integration testing, etc. Alpha testing used after all the testing are executed.
It can be a white box, or Black-box testing depends on the requirements - particular lab environment and
simulation of the actual environment required for this testing.
Beta Testing is a part of acceptance testing which is intended to validate the product for usability,
functionality, reliability, and compatibility by the end-user. It adds value to the software as user validates
it by providing real input values.
It helps in enhancement of the quality of software and leads it towards success. Also, helpful in deciding
whether the software is worthy to invest more in future versions or not.
It is not controlled activity since it happens at the user's side. It is considered as final testing before
delivering the software to the customers. Software released for beta testing is known as beta software.
Definition: Software maintenance is a part of Software Development Life Cycle. Its main purpose is to
modify and update software application after delivery to correct faults and to improve performance.
Software is a model of the real world. When the real world changes, the software requires alteration
wherever possible.
Description: Software maintenance is a vast activity which includes optimization, error correction,
deletion of discarded features and enhancement of existing features. Since these changes are necessary, a
mechanism must be created for estimation, controlling and making modifications. The essential part of
software maintenance requires preparation of an accurate plan during the development cycle. Typically,
maintenance takes up about 40-80% of the project cost, usually closer to the higher pole. Hence, a focus
on maintenance definitely helps keep costs down.
Corrective Maintenance - This includes modifications and updations done in order to correct or
fix problems, which are either discovered by user or concluded by user error reports.
Adaptive Maintenance - This includes modifications and updations applied to keep the software
product up-to date and tuned to the ever changing world of technology and business environment.
Perfective Maintenance - This includes modifications and updates done in order to keep the
software usable over long period of time. It includes new features, new user requirements for
refining the software and improve its reliability and performance.
Preventive Maintenance - This includes modifications and updations to prevent future problems
of the software. It aims to attend problems, which are not significant at this moment but may
cause serious issues in future.
On an average, the cost of software maintenance is more than 50% of all SDLC phases. There are various
factors, which trigger maintenance cost go high, such as:
1. Identification Phase:
In this phase, the requests for modifications in the software are identified and analysed. Each of
the requested modification is then assessed to determine and classify the type of maintenance
activity it requires. This is either generated by the system itself, via logs or error messages, or by
the user.
2. Analysis Phase:
3. Design Phase:
The new modules that need to be replaced or modified are designed as per the requirements
specified in the earlier stages. Test cases are developed for the new design including the safety
and security issues. These test cases are created for the validation and verification of the system.
4. Implementation Phase:
In the implementation phase, the actual modification in the software code are made, new features
that support the specifications of the present software are added, and the modified software is
installed. The new modules are coded with the assistance of structured design created in the
design phase.
Regression testing is performed on the modified system to ensure that no defect, error or bug is
left undetected. Furthermore, it validates that no new faults are introduced in the software as a
result of maintenance activity. Integration testing is also carried out between new modules and
the system.
Acceptance testing is performed on the fully integrated system by the user or by the third party
specified by the end user. The main objective of this testing is to verify that all the features of the
software are according to the requirements stated in the modification request.
7. Delivery Phase:
Once the acceptance testing is successfully accomplished, the modified system is delivered to the
users. In addition to this, the user is provided proper consisting of manuals and help files that
describe the operation of the software along with its hardware specifications. The final testing of
the system is done by the client after the system is delivered.
Quick-Fix Model:
This is an ad hoc approach used for maintaining the software system. The objective of this model is to
identify the problem and then fix it as quickly as possible. The advantage is that it performs its work
quickly and at a low cost. This model is an approach to modify the software code with little consideration
for its impact on the overall structure of the software system.
Reverse Engineering is processes of extracting knowledge or design information from anything man-
made and reproducing it based on extracted information. It is also called back Engineering.
Software Reverse Engineering is the process of recovering the design and the requirements specification
of a product from an analysis of it‟s code. Reverse Engineering is becoming important, since several
existing software products, lack proper documentation, are highly unstructured, or their structure has
degraded through a series of maintenance efforts.
Software Reverse Engineering is used in software design, reverse engineering enables the
developer or programmer to add new features to the existing software with or without knowing
the source code.
Reverse engineering is also useful in software testing, it helps the testers to study the virus and
other malware code .
When we need to update the software to keep it to the current market, without impacting its functionality,
it is called software re-engineering. It is a thorough process where the design of software is changed and
programs are re-written.
Legacy software cannot keep tuning with the latest technology available in the market. As the hardware
become obsolete, updating of software becomes a headache. Even if software grows old with time, its
functionality does not.
For example, initially Unix was developed in assembly language. When language C came into existence,
Unix was re-engineered in C, because working in assembly language was difficult.
Other than this, sometimes programmers notice that few parts of software need more maintenance than
others and they also need re-engineering.
Re-Engineering Process
A software is a collection of items like programs, data, documents etc. that can be changed easily.
Throughout the software development cycle the software design documents, software code or software
requirements document etc. are changed often and it is very important that the changes done in software
are done in a controlled manner.
Software Configuration Management is defined as a process to systematically manage, organize, and control
the changes in the documents, codes, and other entities during the Software Development Life Cycle. It is
abbreviated as the SCM process in software engineering. The primary goal is to increase productivity with
minimal mistakes.
“SCM is the process of identifying and defining the items in the system, controlling the changes of
these items throughout their life cycle, recording and reporting the status of items and change
requests, and verifying the completeness and correctness of items.
During SCM the changes can be made in software and documents like Test Cases, Test Plan, Design Documents,
SRS etc. during the software development life cycle.