Professional Documents
Culture Documents
Now, everyone would be confused that only the software tester and
developer may perform the test. But that’s not the case. The following
are some who performs testing at various instances
Software Tester
Software Developer (Perform Unit testing at the time of
developing the software)
1
Project Lead/Manager (Performs an overall check when the
product is ready to ship. They would check if everything is working
fine and upto the standards)
End User (Involved in Beta testing, that is pre-release testing. To
check for any bugs available and explore new features)
Testing Principles
A number of testing principles have been suggested over the past 40
years and offer general guidelines common f or all testing.
3
Principle 2 – Exhaustive testing is impossible
Testing everything (all combinations of inputs and preconditions) is not
feasible except for trivial cases. Instead of exhaustive testing, risk
analysis and priorities should be used to focus testing efforts.
4
During software testing, as defects are found, analysis of defects
can give surprising results!
Defect Clustering in Software Testing means that the majority of
the defects are caused by a small number of modules, i.e. the
distribution of defects are not across the application but rather
centralized in limited sections of the application.
Defect Clustering in Software Testing is based on the Pareto
principle, also known as the 80-20 rule, where it is stated that
approximately 80% of the problems are caused by 20% of the
modules.
This can give a good indication that when a defect is found in one
area of the application, chances are there are more defects in that
particular area, so it is worth investing more time to test that
particular area of the application to find as many defects as
possible.
However, testers should not ignore to test the rest of application as
well as there may be other defects scattered around.
Defect aggregation or defect clustering in software testing can also
indicate which area of the application needs more regression
testing to ensure related features are not broken.
Let’s say you are testing a application. You have written a set of
test cases.
5
Now you run one cycle of testing. You find few bugs and report
them to the development team. Development team fixes the bugs
and reverts to you with the updated code. You again execute the
same set of test cases. This time you find that few of the bug were
still not fixed and you report that back to the development team.
They work of it and send an update to you. Once again, you
execute the same set of test cases and don't find any bugs.
Now in a new release some changes were made in the application.
You run the same set of test cases and they all pass. But, what you
miss here is the new bugs that may have introduced when the fix
and new changes were applied. The old sets of test cases are
incapable of identifying these new bugs.
This is called Pesticide Paradox. To avoid this you need to update
your test cases with each cycle and add new cases to the old set.
Verification VS Validation
Verification Validation
1. Verification is a static 1. Validation is a dynamic
Activity of verifying activity of validating and
6
documents, design, code and testing the actual product.
program.
2. Done by developers. 2. Done by Testers.
3. Ensures that the software 3. Ensures that the
system functionalities
meets all the functionality. meet the intended behavior.
4. Verification addresses the 4. Validation addresses the
concern: "Are you building it concern:
right?" "Are you building the right
thing?"
5. It is human based checking 5. It is computer based
of documents and files. execution of program.
6. For Example: Building a 6. Once this weight machine is
weight machine which weighs built it’s the Tester who needs
object and displays the weight to validate if the weight
only upon inserting one rupee machine displays the weight
coin. Now this is the only for 1Rs coin or it displays
requirement of the Customer. the weight for "2" and "5"
Rupee coin. If machine
displays the weight for "2" and
"5" rupee coin then it’s a bug
and it need to be reported.
7
3. It's a Preventive technique 3. It's a Corrective technique
4. It is the procedure to create the 4. It is the procedure to verify that
deliverables deliverables
5. In order to meet the customer 5. QC confirms that the standards
requirements QA defines are followed while working on the
standards and methodologies product
6. It requires involvement of the 6. It requires involvement of
whole team Testing team
7. QA comes under the 7. QC comes under the
category of Verification. category of Validation.
8. It is done before Quality 8. It is done only after
Control. Quality Assurance activity is
completed.
8
Testing and Debugging
A common perception of testing is that it only consists of running test s,
i.e., executing the software. This is part of testing, but not all of the
testing activities. Test activities exist before and after test execution.
These activities include planning and control, choosing test conditions,
designing and executing test cases, checking results, evaluating exit
criteria, reporting on the testing process and system under test, and
finalizing or completing closure activities after a test phase has been
completed.
Debugging is the development activity that finds, analyzes and removes
the cause of the failure. Subsequent re-testing by a tester ensures that
the fix doe s indeed re solve the failure. The responsibility for these
activities is usually testers test and developers debug.
Types of Testing:
Types of testing can be basically divided into Manual and Automation.
Manual testing is the process of manually testing software for defects.
i.e., without using any automated tool or any script. It requires a tester
to play the role of an end user and use most of all features of the
application to ensure correct behavior.
Testers use test plans, test cases, or test scenarios to test a software to
ensure the completeness of testing. Manual testing also includes
exploratory testing, as testers explore the software to identify errors in
it.
Automation testing, which is also known as Test Automation, is when
the tester writes scripts and uses another software to test the
product. Automation Testing saves time, cost and manpower. Once
9
recorded, it's easier to run an automated test suite when compared to
manual testing which will require skilled labor.
Any type of application can be tested manually but automated testing is
recommended only for stable systems and is mostly used for regression
testing. Also, certain testing types like ad-hoc and monkey testing are
more suited for manual execution.
What to Automate?
It is not possible to automate everything in software. The following are
some cases that one can perform the automation
1. Tests that carried out in various builds.
2. Tests that has complexity in executing a functionality
3. Testing a scenario with numerous amounts of test data.
The following are some cases that one cannot perform the automation
1. Test that requires manual intervention again and again.
2. Test cases that tests the UI. (Look and feel cases)
3. Tests that are carried out one or two times
How to Automate?
There are many tools available that can be used to write automation
scripts. Before mentioning the tools, let us identify the process that can
be used to automate the testing process:
1. Identifying areas within a software for automation
2. Selection of appropriate tool for test automation
3. Writing test scripts
4. Reviewing test scripts
5. Rework of scripts
6. Integration of scripts
7. Execution of scripts
8. Enhancement of scripts
10
Automation Software Testing Tools
The following tools can be used for automation testing:
HP Quick Test Professional - Now UFT (Unified Functional
testing)
Selenium
IBM Rational Functional Tester
SilkTest
TestComplete
Testing Anywhere
WinRunner
LoadRunner
Visual Studio Test Professional
Virtual Users
Appium (Selenium Mobile testing tool)
JMeter
Testing Methods
There are different methods that can be used for software testing.
Black-Box Testing
White-Box Testing
Grey-Box Testing
Black-Box Testing:
The technique of testing without having any knowledge of the interior
workings of the application is called black-box testing. The tester is
obvious to the system architecture and does not have access to the
source code. Typically, while performing a black-box test, a tester will
interact with the system’s user interface by providing inputs and
11
examining outputs without knowing how and where the inputs are
worked upon.
The following table lists the advantages and disadvantages of black-box
testing.
Advantages Disadvantages
Well suited and efficient for large Limited coverage, since only a
code segments. selected number of test scenarios
is actually performed.
Large numbers of moderately Inefficient testing, due to the fact
skilled testers can test the that the tester only has limited
application with no knowledge of knowledge about an application.
implementation, programming
language, or operating systems.
Clearly separates user's Blind coverage, since the tester
perspective from the developer's cannot target specific code
perspective through visibly defined segments or error-prone areas.
roles.
Code access is not required. The test cases are difficult to
design.
White-Box Testing:
White-box testing is the detailed investigation of internal logic and
structure of the code. White-box testing is also called glass testing or
open-box testing. In order to perform white-box testing on an
application, a tester needs to know the internal workings of the code.
The tester needs to have a look inside the source code and find
out which unit/chunk of the code is behaving inappropriately.
12
The following table lists the advantages and disadvantages of white-box
testing.
Advantages Disadvantages
As the tester has knowledge of the Due to the fact that a skilled tester
source code, it becomes very easy is needed to perform white-box
to find out which type of data can testing, the costs are increased.
help in testing the application
effectively.
It helps in optimizing the code. Sometimes it is impossible to look
into every nook and corner to find
out hidden errors that may create
problems, as many paths will go
untested.
Extra lines of code can be removed It is difficult to maintain white-box
which can bring in hidden defects. testing, as it requires specialized
tools like code analyzers and
debugging tools.
Due to the tester's knowledge
about the code, maximum
coverage is attained during test
scenario writing.
Grey-Box Testing:
Grey-box testing is a technique to test the application with having
a limited knowledge of the internal workings of an application.
Mastering the domain of a system always gives the tester an edge over
someone with limited domain knowledge. Unlike black-box testing,
where the tester only tests the application's user interface; in grey-box
13
testing, the tester has access to design documents and the database.
Having this knowledge, a tester can prepare better test data and test
scenarios while making a test plan.
Advantages Disadvantages
Offers combined benefits of black- Testing every possible input
box and white-box testing stream is unrealistic because it
wherever possible. would take an unreasonable
amount of time; therefore, many
program paths will go untested.
Based on the limited information Since the access to source code is
available, a grey-box tester can not available, the ability to go over
design excellent test scenarios. the code and test coverage is
limited.
The test is done from the point of
view of the user and not the
designer.
Test Levels
There are four levels of software testing:
14
Test cases are derived from work products such as a
specification of the component, the software design or the data
model.
Integration Testing:
Integration testing tests interfaces between components,
interactions with different parts of a system, such as the
operating system, file system and hardware.
15
System integration testing tests the inter actions between
different systems or between hard ware and software and
may be done after system testing.
System Testing
16
System testing is concerned with the behavior of a whole
system/product.
Acceptance Testing
Acceptance testing is often the responsibility of the customers
or users of a system; other stakeholders may be involved as
well.
17
Finding defects is not the main focus in acceptance testing.
Acceptance testing may assess the system’s readiness for
deployment and use
18
Alpha and beta (or field) testing
Developers of market, or COTS, software often want to get
feedback from potential or existing customers in their market
before the software product is put up for sale commercially.
Test Types
Levels of testing include different methodologies that can be
used while conducting software testing. The main levels of
software testing are:
Functional Testing
Non-functional Testing
Structural Testing
Re-testing and Regression.
Functional Testing
The functions that a system, subsystem or component are to
perform may be described in work products such as a
requirements specification, use cases , or a functional
19
specification, or they may be undocumented.
T he functions are “what” the system does. Function al tests are
based on functions and features (described in documents or
understood by the testers) and their interoperability with
specific systems. Functional testing considers the external
behavior of the software (black-box testing).
A type of functional testing, security testing, investigates the
functions (e.g., a fire wall) relating to detection of threats, such as
viruses, from malicious outsiders. Another type of functional
testing, interoperability testing, evaluates the capability of the
software product to interact with one or more specified
component s or systems.
Non-functional Testing
Non-functional testing includes, but is not limited to, performance
testing, load testing, stress testing, usability testing, maintain
ability testing, reliability testing and portability testing.
It is the testing of “how” the system works. Non-functional testing
may be performed at all test levels.
The term non-functional testing describes the tests required to
measure characteristics of systems and software that can be
quantified on a varying scale, such as response times for
performance testing.
Non-function al testing considers the external behavior of the
software and in most cases uses black-box test design techniques
to accomplish that.
Structural Testing
Structural (white-box) testing may be performed at all test levels.
Structural techniques are best used after specification-based
techniques, in order to help measure the thoroughness of testing
20
through assessment of coverage of a type of structure.
21
to a developer and he fixes it. Post fixing the bug is
assigned to the tester for its verification. This testing is also
known as retesting.
23
Smoke Tests enables uncovering obvious errors which saves time
and effort of test team.
Smoke Tests can be manual or automated.
24
Following are the characteristics of the Monkey testing:
This testing is so random that the tester may not be able to
reproduce the error/defect.
The scenario may NOT be definable and may NOT be the correct
business case.
Monkey Testing needs testers with very good domain and
technical expertise.
Advantages of Monkey Testing:
As the scenarios that are tested are adhoc, system might be under
stress so that we can also check for the server responses.
This testing is adopted to complete the testing, in particular if
there is a resource/time crunch.
Testing is carried out with the knowledge of the tester about the
application and the tester tests randomly without following the
specifications/requirements.
Hence the success of Adhoc testing depends upon the capability of the
tester, who carries out the test. The tester has to find defects without
any proper planning and documentation, solely based on tester's
intuition.
25
When to Execute Adhoc Testing?
Adhoc testing can be performed when there is limited time to do
exhaustive testing and usually performed after the formal test
execution. Adhoc testing will be effective only if the tester has in-
depth understanding about the System under Test.
Pair Testing: Two testers are assigned the same modules and they
share ideas and work on the same systems to find defects. One
tester executes the tests while another tester records the notes on
their findings.
26
Any system where you get a different output for the same input,
depending on what has happened before, is a finite state system.
The state diagram shows seven states but only four possible events
(Card inserted, Enter PIN, PIN OK and PIN not OK). We have not
specified all of the possible transitions here – there would also be a
time-out from ‘wait for PIN’ and from the three tries which would go
back to the start state after the time had elapsed and would probably
eject the card. There would also be a transition from the ‘eat card’ state
back to the start state. We have not specified all the possible events
either – there would be a ‘cancel’ option from ‘wait for PIN’ and from
the three tries, which would also go back to the start state and eject
the card.
27
software can work successfully installed over previous version of the
software and newer version of the software works as fine with table
structure, data structures, files that were created by previous version of
the software.
For example, if a program accepts integer values only from 1 to 10. The
possible test cases for such a program would be the range of all
integers. In such a program, all integers up to 0 and above 10 will cause
an error. So, it is reasonable to assume that if 11 will fail, all values
above it will fail and vice versa.
If an input condition is a range of values, let one valid equivalence class
be the range (0 or 10 in this example). Let the values below and above
the range be two respective invalid equivalence values (i.e. -1 and 11).
Therefore, the above three partition values can be used as test cases
for the above example.
28
What is Localization Testing?
29
testing identifies the maximum capacity of software and its behavior at
peak time.
Most of the time, load testing is performed with the help of automated
tools such as Load Runner, AppLoader, IBM Rational Performance
Tester, Apache JMeter, Silk Performer, Visual Studio Load Test, etc.
Virtual users (VUsers) are defined in the automated testing tool and the
script is executed to verify the load testing for the software. The
number of users can be increased or decreased concurrently or
incrementally based upon the requirements..
What is UI Testing?
30
UI testing involves testing the Graphical User Interface of the Software.
UI testing ensures that the GUI functions according to the requirements
and tested in terms of color, alignment, size, and other properties.
Confidentiality
Integrity
Authentication
Availability
Authorization
Non-repudiation
Software is secure against known and unknown vulnerabilities
Software data is secure
Software is according to all security regulations
Input checking and validation
SQL insertion attack
Injection flaws
Session management issues
Cross-site scripting attacks
Buffer overflows vulnerabilities
Directory traversal attacks
31
What is Portability Testing?
32
It is a type of security testing. Penetration testing is done to tests how
secure software and its environments (Hardware, Operating system,
and network) are when subject to attack by an external or internal
intruder.
An intruder can be a human/hacker or malicious programs. Pentest
uses methods to forcibly intrude (by brute force attack) or by using a
weakness (vulnerability) to gain access to a software or data or
hardware with an intent to expose ways to steal, manipulate or corrupt
data, software files or configuration.
Penetration Testing is a way of ethical hacking, an experienced
Penetration tester will use the same methods and tools that a hacker
would use but the intention of Penetration tester is to identify
vulnerability and get them fixed before a real hacker or malicious
program exploits it.
Type of testing which checks for memory leaks or other problems that
may occur with prolonged execution. It is usually performed by
performance engineers.
33
What is Exploratory Testing?
Testing type that verifies the program under test stores data files in the
correct directories and that it reserves sufficient space to prevent
unexpected termination resulting from lack of space. It is usually
performed by the testing team.
34
• Bug: A software bug may be defined as a coding error that causes an
unexpected defect, fault or flaw. In other words, if a program does not
perform as intended, it is most likely a bug.
• Defect: Defect is the variance from a desired product attribute (it can
be a wrong, missing or extra data). It can be of two types – Defect from
the product or a variance from customer/user expectations. It is a flaw
in the software system and has no impact until it affects the
user/customer and operational system. 90% of all the defects can be
caused by process problems.
35
1. New: When a defect is logged and posted for the first time. It’s
state is given as new.
2. Assigned: After the tester has posted the bug, the lead of the
tester approves that the bug is genuine and he assigns the bug to
corresponding developer and the developer team. It’s state given
as assigned.
3. Open: At this state the developer has started analyzing and
working on the defect fix.
4. Fixed: When developer makes necessary code changes and
verifies the changes then he/she can make bug status as ‘Fixed’
and the bug is passed to testing team.
5. Pending retest: After fixing the defect the developer has given
that particular code for retesting to the tester. Here the testing is
pending on the testers end. Hence its status is pending retest.
6. Retest: At this stage the tester do the retesting of the changed
code which developer has given to him to check whether the
defect got fixed or not.
7. Verified: The tester tests the bug again after it got fixed by the
developer. If the bug is not present in the software, he approves
that the bug is fixed and changes the status to “verified”.
8. Reopen: If the bug still exists even after the bug is fixed by the
developer, the tester changes the status to “reopened”. The bug
goes through the life cycle once again.
9. Closed: Once the bug is fixed, it is tested by the tester. If the
tester feels that the bug no longer exists in the software, he
changes the status of the bug to “closed”. This state means that
the bug is fixed, tested and approved.
10. Duplicate: If the bug is repeated twice or the two bugs
mention the same concept of the bug , then one bug status is
changed to “duplicate“.
36
11. Rejected: If the developer feels that the bug is not genuine,
he rejects the bug. Then the state of the bug is changed to
“rejected”.
12. Deferred: The bug, changed to deferred state means the
bug is expected to be fixed in next releases. The reasons for
changing the bug to this state have many factors. Some of them
are priority of the bug may be low, lack of time for the release or
the bug may not have major effect on the software.
13. Not a bug: The state given as “Not a bug” if there is no
change in the functionality of the application. For an example: If
customer asks for some change in the look and field of the
application like change of color of some text then it is not a bug
but just some change in the looks of the application.
Requirement Analysis
37
During this phase, test team studies the requirements from a testing
point of view to identify the testable requirements. The QA team may
interact with various stakeholders (Client, Business Analyst, Technical
Leads, System Architects etc) to understand the requirements in detail.
Requirements could be either Functional (defining what the software
must do) or Non Functional (defining system performance
/securityavailability ) .Automation feasibility for the given testing
project is also done in this stage.
Activities
Test Planning
This phase is also called Test Strategy phase. Typically , in this stage, a
Senior QA manager will determine effort and cost estimates for the
project and would prepare and finalize the Test Plan.
Activities
38
Deliverables
This phase involves creation, verification and rework of test cases &
test scripts. Test data , is identified/created and is reviewed and then
reworked as well.
Activities
Deliverables
Test cases/scripts
Test data
39
Activities
Deliverables
Test Execution:
During this phase test team will carry out the testing based on the test
plans and the test cases prepared. Bugs will be reported back to the
development team for correction and retesting will be performed.
Activities
Deliverables
40
Testing team will meet, discuss and analyze testing artifacts to identify
strategies that have to be implemented in future, taking lessons from the
current test cycle. The idea is to remove the process bottlenecks for
future test cycles and share best practices for any similar projects in
future.
Activities
41
Diagram of Waterfall-model:
42
Once an application is in the testing stage, it is very difficult to go
back and change something that was not well-thought out in the
concept stage.
No working software is produced until late during the life cycle.
High amounts of risk and uncertainty.
Not a good model for complex and object-oriented projects.
Poor model for long and ongoing projects.
Not suitable for the projects where requirements are at a
moderate to high risk of changing.
This model is used only when the requirements are very well
known, clear and fixed.
Product definition is stable.
Technology is understood.
There are no ambiguous requirements
Ample resources with required expertise are available freely
The project is short.
43
Diagram of V-model:
Requirements like BRS and SRS begin the life cycle model just like the
waterfall model. But, in this model before development is started, a
system test plan is created. The test plan focuses on meeting the
functionality specified in the requirements gathering.
Advantages of V-model:
Disadvantages of V-model:
45
High confidence of customer is required for choosing the V-Shaped
model approach. Since, no prototypes are produced, there is a very high
risk involved in meeting customer expectations.
For example:
46
Advantages of Incremental model:
47
This model can be used when the requirements of the complete
system are clearly defined and understood.
Major requirements must be defined; however, some details can
evolve with time.
There is a need to get a product to the market early.
A new technology is being used
Resources with needed skill set are not available
There are some high risk features and goals.
48
Customer satisfaction by rapid, continuous delivery of useful
software.
People and interactions are emphasized rather than process and
tools. Customers, developers and testers constantly interact with
each other.
Working software is delivered frequently (weeks rather than
months).
Face-to-face conversation is the best form of communication.
Close, daily cooperation between business people and
developers.
Continuous attention to technical excellence and good design.
Regular adaptation to changing circumstances.
Even late changes in requirements are welcomed
49
To implement a new feature the developers need to lose only the
work of a few days, or even only hours, to roll back and
implement it.
Unlike the waterfall model in agile model very limited planning is
required to get started with the project. Agile assumes that the
end users’ needs are ever changing in a dynamic business and IT
world. Changes can be discussed and features can be newly
effected or removed based on feedback. This effectively gives the
customer the finished system they want or need.
Both system developers and stakeholders alike, find they also get
more freedom of time and options than if the software was
developed in a more rigid sequential way. Having options gives
them the ability to leave important decisions until more or better
data or even entire hosting programs are available; meaning the
project can continue to move forward without fear of reaching a
sudden standstill.
50
Planning Phase: Requirements are gathered during the planning phase.
Requirements like ‘BRS’ that is ‘Bussiness Requirement Specifications’
and ‘SRS’ that is ‘System Requirement specifications’.
51
Good for large and mission-critical projects.
Strong approval and documentation control.
Additional Functionality can be added at a later date.
Software is produced early in the software life cycle.
The basic idea here is that instead of freezing the requirements before a
design or coding can proceed, a throwaway prototype is built to
understand the requirements. This prototype is developed based on the
currently known requirements. By using this prototype, the client can get
an “actual feel” of the system, since the interactions with prototype can
52
enable the client to better understand the requirements of the desired
system. Prototyping is an attractive idea for complicated and large
systems for which there is no manual process or existing system to help
determining the requirements.
The prototype are usually not complete systems and many of the details
are not built in the prototype. The goal is to provide a system with
overall functionality.
53
• Leads to implementing and then repairing way of building systems.
54
Diagram of RAD-Model:
55
Application generation: Automated tools are used to convert process
models into code and the actual system.
Testing and turnover: Test new components and all the interfaces.
56
What is the difference between Severity and Priority?
There are two key things in defects of the software testing. They are:
1) Severity
2) Priority
1) Severity:
It is the extent to which the defect can affect the software. In other words
it defines the impact that a given defect has on the system. For
example: If an application or web page crashes when a remote link is
clicked, in this case clicking the remote link by an user is rare but the
impact of application crashing is severe. So the severity is high but
priority is low.
57
Moderate: The defect that does not result in the termination, but
causes the system to produce incorrect, incomplete or
inconsistent results then the severity will be stated as moderate.
Minor: The defect that does not result in the termination and
does not damage the usability of the system and the desired
results can be easily obtained by working around the defects then
the severity is stated as minor.
Cosmetic: The defect that is related to the enhancement of the
system where the changes are related to the look and field of the
application then the severity is stated as cosmetic.
2) Priority:
58
High Priority & High Severity: An error which occurs on the basic
functionality of the application and will not allow the user to use the
system. (Eg. A site maintaining the student details, on saving record if it,
doesn’t allow to save the record then this is high priority and high
severity bug.)
High Priority & Low Severity: The spelling mistakes that happens on
the cover page or heading or title of an application.
Low Priority and Low Severity: Any cosmetic or spelling issues which
is within a paragraph or in the report (Not on cover page, heading, title).
1. Static Techniques
2. Dynamic Techniques
3. Below is the tree structure of the testing techniques:
59
What is Walkthrough in software testing?
Walkthrough:
60
i. To present the documents both within and outside the software
discipline in order to gather the information regarding the topic
under documentation.
ii. To explain or do the knowledge transfer and evaluate the
contents of the document
iii. To achieve a common understanding and to gather feedback.
iv. To examine and discuss the validity of the proposed solutions
The various features of static analysis tools are discussed below with a
special focus on static code analysis tools because they are the most
common in day to day practice.
Static code analysis tools are as follows:
61
with capital C) and layout specifications (e.g. Indent 4 spaces
towards right). The main advantage of this is that it saves lots of
effort. The added advantage of adapting this approach is that if
we take a well-known coding standard there will probably be
checking tools available that support that standard. Without such
tools the enforcement of coding standard in an organization is
likely to fail because the number of rules in the coding standard is
so large that nobody can remember them all. Another reason is
that if people spend time checking coding standards in reviews
that will distract them from other defects that might otherwise
find and makesing the review process less effective.
62
In the program mentioned above has 2 IF conditions. Thus just add 1 to
it and the cyclomatic complexity is 2+1=3.
We can also calculate the cyclomatic complexity using the control flow.
In the control flow shown below there are 7 nodes (shapes) and 8 edges
(lines). Thus by formula ((no. of edges-no. of nodes)+2) that is (8-7)+2
= 1+2 = 3.
63
What is traceability in Software testing?
Now, the question may arise is that Why is traceability important? So,
let’s have a look on the following examples:
A set of tests that has run OK in the past has now started creating
serious problems. What functionality do these tests actually
exercise? Traceability between the tests and the requirement
being tested enables the functions or features affected to be
identified more easily.
64