MSBTE STE Chapter 5
MSBTE STE Chapter 5
22518
Chapter 5
Testing tools and measurements
5.1 Manual Testing and Need for Automated Testing Tools
5.2 Advantages and Disadvantages of Using Tools
5.3 Selecting a Testing Tool
5.4 When to Use Automated Test Tools, Testing Using
Automated Tools.
5.5 Metrics and Measurement: Types of Metrics. Product
Metrics and Process Metrics, Object oriented metrics in
testing.
Manual Testing
► Manual testing is a software testing process in which test
cases are executed manually without using any automated
tool.
► All test cases executed by the tester manually according to
the end user's perspective.
► It ensures whether the application is working, as mentioned
in the requirement document or not.
► Test cases are planned and implemented to complete almost
100 percent of the software application.
► Test case reports are also generated manually.
Manual Testing
► Manual Testing is one of the most fundamental testing
processes as it can find both visible and hidden defects of the
software.
► The difference between expected output and output, given
by the software, is defined as a defect.
► The developer fixed the defects and handed it to the tester
for retesting.
Manual Testing
► Manual testing is mandatory for every newly developed
software before automated testing.
► This testing requires great efforts and time, but it gives the
surety of bug-free software.
► Manual Testing requires knowledge of manual testing
techniques but not of any automated testing tool.
Need of Manual Testing
► If the test engineer does manual testing, he/she can test the
application as an end-user perspective and get more familiar
with the product, which helps them to write the correct test
cases of the application and give the quick feedback of the
application.
Types of Manual Testing
► There are various methods used for manual testing. Each
technique is used according to its testing criteria.
► Types of manual testing are given below:
► White Box Testing
► Black Box Testing
How to perform Manual Testing
► First, tester observes all documents related to software, to
select testing areas.
► Tester analyses requirement documents to cover all
requirements stated by the customer.
► Tester develops the test cases according to the requirement
document.
► All test cases are executed manually by using Black box
testing and white box testing.
► If bugs occurred then the testing team informs the
development team.
► The Development team fixes bugs and handed software to the
testing team for a retest.
How to perform Manual Testing
Advantages of Manual Testing
► It does not require programming knowledge while using the
Black box method.
► It is used to test dynamically changing GUI designs.
► Tester interacts with software as a real user so that they are
able to discover usability and user interface issues.
► It ensures that the software is a hundred percent bug-free.
► It is cost-effective.
► Easy to learn for new testers.
Disadvantages of Manual Testing
► It requires a large number of human resources.
► It is very time-consuming.
► Tester develops test cases based on their skills and
experience. There is no evidence that they have covered all
functions or not.
► Test cases cannot be used again. Need to develop separate
test cases for each new software.
► It does not provide testing on all aspects of testing.
► Since two teams work together, sometimes it is difficult to
understand each other's motives, it can mislead the process.
Conclusion
► Manual testing is an activity where the tester needs to be
very patient, creative & open minded.
► Manual testing is a vital part of user-friendly software
development because humans are involved in testing
software applications and end-users are also humans.
► They need to think and act with an End User perspective.
► Testing can be extremely challenging. Testing an application
for possible use cases with minimum test cases requires high
analytical skills.
Automation Testing
► Automation testing is a Software testing technique to test
and compare the actual outcome with the expected outcome.
Test Cases that are newly designed and not executed manually
at least once
2. Efficiency.
While testers are busy running test cases, testers can't be doing
anything else.
If the tester have a test tool that reduces the time it takes for
him to run his tests, he has more time for test planning and
thinking up new tests.
Advantages of using testing tools :
3. Accuracy and Precision.
After trying a few hundred cases, tester’̳s attention span will
wane and he may start to make mistakes. A test tool will
perform the same test and check the results perfectly, each and
every time.
4. Resource Reduction.
Impossible to perform a certain test case. The number of
people or the amount of equipment required to create the test
condition could be prohibitive. A test tool can be used to
simulate the real world and greatly reduce the physical
resources necessary to perform the testing.
Advantages of using testing tools :
5. Simulation and Emulation.
Test tools are often used to replace hardware or software that
would normally interface to your product. This "fake" device or
application can then be used to drive or respond to your
software in ways that you choose and ways that might otherwise
be difficult to achieve.
6. Relentlessness.
Test tools and automation never tire or give up. they can keep
going and going and on and on without any problem; whereas
the tester gets tired to test again and again.
Disadvantages of using testing tools :
1. It's more expensive to automate. Initial investments are
bigger than manual testing Manual tests can be very time
consuming.
This will ensure that the best practices get institutionalized and
also motivate the team better.
Metrics and measurement :
Step 5:
The final step involved in a metrics plan is to take necessary
action and follow up on the action.
Tracking test progress and product quality can give a good idea
about the release—whether it will be met on time with known
quality.
The test cases that can be executed per person day are calculated
based on a measure called test case execution productivity.
The number of days needed for defects fixes needs to take into
account the “outstanding defects waiting to be fixed” and a
projection of “how many more defects that will be unearthed
from testing in future cycles.”
Hence, metrics helps in estimating the total days needed for fixing
defects. Once the time needed for testing and the time for
defects fixing are known, the release date can be estimated.
Testing and defect fixing are activities that can be executed
simultaneously,
WHY METRICS IN TESTING?
The defect fixes may arrive after the regular test cycles are
completed. These defect fixes will have to be verified by
regression testing before the product can be released.
Metrics are not only used for reactive activities. Metrics and their
analysis help in preventing the defects proactively, thereby saving
cost and effort.
Effort variance =
[(Actual Effort – Planned Effort)/ Planned Effort ]x 100.
Project Metrics
Schedule Variance: Any difference between the scheduled
completion of an activity and the actual completion is known as
Schedule Variance.
Schedule variance =
[((Actual calendar days – Planned calendar days) / Planned
calendar days ]x 100.
Project Metrics
Size Variance: Difference between the estimated size of the
project and the actual size of the project (normally in KLOC or
FP).
Size variance =
[(Actual size – Estimated size)/ Estimated size ]x 100.
Project Metrics
Cost Variance (CV) Difference between the estimated cost of the
project and the actual cost of the project. this metric is
represented as percentage.
Cost variance =
[(Actual cost – Estimated cost)/ Estimated cost ]x 100.
Progress Metrics
Automation progress refers to the number of tests that have been
automated as a percentage of all automatable test cases.
Any project needs to be tracked from two angles as given below:
1. How the project is doing with respect to effort and schedule.
2. To find out how well the product is meeting the quality
requirements for the released.
Progress Metrics
Productivity Metrics
Productivity metrics combine several measurements and
parameters with effort spent on the product.
They help in finding out the capability of the team as well as for
other purposes, such as
1. Estimating for the new release.
2. Finding out how well the team is progressing, understanding
the reasons for (both positive and negative) variations in
results.
3. Estimating the number of defects that can be found.
4. Estimating release date and quality.
5. Estimating the cost involved in the release.
Productivity Metrics
Defects per 100 Hours of Testing
The metric defects per 100 hours of testing covers the third
point and normalizes the number of defects found in the product
with respect to the effort spent.
In a product scenario, not all test cases are written afresh for
every release.
New test cases are added to address new functionality and for
testing features that were not tested earlier.
Productivity Metrics
Test Cases Developed per 100 Hours of Testing
Existing test cases are modified to reflect changes in the
product.
Hence the formula for test cases developed uses the count
corresponding to added/modified and deleted test cases.
The ability of a test case to uncover defects depends on how well the
test cases are designed and developed.
Defects per 100 test cases = (Total defects found for a period/Total
test cases executed for the same period) * 100
Productivity Metrics
Defects per 100 Failed Test Cases
Defects per 100 failed test cases is a good measure to find out
how granular the test cases are. It indicates :
● How many test cases need to be executed when a defect is
fixed
● What defects need to be fixed so that an acceptable number
of test cases reach the pass state; and
● How the fail rate of test cases and defects affect each other
for release readiness analysis.
Defects per 100 failed test cases = (Total defects found for a
period/Total test cases failed due to those defects) * 100
Productivity Metrics
Closed Defect Distribution
The testing team also has the objective to ensure that all defects
found through testing are fixed so that the customer gets the benefit
of testing and the product quality improves.
To ensure that most of the defects are fixed, the testing team has to
track the defects and analyze how they are closed.
The closed defect distribution helps in this analysis.
Process Metrics
Software Test metrics used in the process of test preparation
and test execution phase of STLC.
e.g
Total number of requirement=100
Total no of requirements mapped to test cases=98
e.g
no of test cases executed=180
Efforts spent for execution of test cases= 10
Test execution Productivity=180/10=18 test cases/hr
Process Metrics
4. Test Execution Coverage
It is to measure the number of test cases executed against the
number of test cases planned.
e.g.
Total no of test cases planned to execute=240
Total no of test cases executed=160
Test Execution Coverage= [180/240]*100=75%
Process Metrics
5. Test cases Passed
It is to measure the percentage number of test cases passed.
e.g
Test case Pass=[80/90]*100=88.8%
Process Metrics
6. Test cases Failed
It is to measure the percentage number of test cases failed.
e.g
e.g
Test case blocked=[5/90]*100=5.5%
Object Oriented Metrics in testing
Focus on the combination of function and data as an
integrated object.
1. Method
Cyclomatic complexity(CC) :
● CC is used to evaluate the complexity of an algorithm in a
method.
● Low CC is better.
● CC cannot be used to measure the complexity of class
because of inheritance.
● CC of individual methods can be combined with other
measures to evaluate the complexity of the class.
Object Oriented Metrics in testing
Size:
1. Method:
A method is an operation upon an object and is defined in the
class declaration.
Response for a class: The response for a class is the set of all
methods that can be invoked in response to a message to an
object of the class or by some method in the class.
Two ways:-
1. Calculate for each data field in a class what percentage of
the methods use that data field. Average the percentage
then subtract from 100%.
Lower percentages mean greater cohesion of data and methods
in the class.
(iv) Coupling:
Coupling is measure of the strength of association established by
a connection from one entity to another.
Classes (objects) are coupled three ways as explained below:
1. When a message is passed between objects, the objects are
said to be coupled.
2. Classes are coupled when methods declared in one class use
methods or attributes of the other classes.
3. Inheritance introduces significant tight coupling between
superclasses and their subclasses.
Object Oriented Metrics in testing
3. Inheritance
2. Number of Children
The number of children is the number of immediate subclasses
subordinate to a class in the hierarchy. It is an indicator of the
potential influence a class can have on the design and on the
system.