Manual Testing Material - Prefinal
Manual Testing Material - Prefinal
Topics:
1. SDLC(Software Development Life Cycle)
2. STLC(Software Testing Life Cycle)
3. Software Testing-Definition
4. Importance of Testing in Software industry
5. Principles of testing
6. Good attributes of a Good test
7. Root causes of a defect
8. Main objectives of a Good tester
9. Methods of Testing
10.Black box Testing techniques
11.Levels of testing
12.Types of Testing
13.Test Case,Test Scenarios & Test Prioritization
14.Verification and Validation
15.Estimation
16.Defect
17.Defect Life Cycle
18.Defect- Severity and priority
19.How to Raise/Log a Defect
20.SDLC models
21.RTM
SDLC-Software Development Life Cycle:
SDLC is a systematic approach to develop the software. SDLC has the following
phases/Stages:
Design
Coding
Testing
Deployment
Maintenance
6) Maintenance: Once when the customers starts using the developed system
then the actual problems comes up and needs to be solved from time to time.
This process where the care is taken for the developed product is known as
maintenance.
Activities
Log the clarifications (if any) in the clarification tracker during this
requirement analysis phase.
Identify types of tests to be performed.
Gather details about testing priorities and focus.
Identify test environment details where testing is supposed to be carried
out.
Automation feasibility analysis (if required).
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
Preparation of test plan/strategy document for various types of testing
Test tool selection
Test effort estimation
Resource planning and determining roles and responsibilities.
Training requirement
Deliverables
Test plan /strategy document.
Effort estimation document.
Activities
Create test cases, automation scripts (if applicable)
Review and baseline test cases and scripts
Create test data (If Test Environment is available)
Deliverables
Test cases/scripts
Test data
Test Environment Setup
Test environment decides the software and hardware conditions under which
a work product is tested. Test environment set-up is one of the critical aspects
of testing process and can be done in parallel with Test Case Development
Stage. Test team may not be involved in this activity if the
customer/development team provides the test environment in which case
the test team is required to do a readiness check (smoke testing) of the given
environment.
Activities
Understand the required architecture, environment set-up and prepare
hardware and software requirement list for the Test Environment.
Setup test Environment and test data
Perform smoke test on the build
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
Execute tests as per plan
Document test results, and log defects for failed cases
Map defects to test cases in RTM
Retest the defect fixes
Track the defects to closure
Deliverables
Completed RTM with execution status
Test cases updated with results
Defect reports
Activities
Evaluate cycle completion criteria based on Time, Test
coverage,Cost,Software,Critical Business Objectives , Quality
Prepare test metrics based on the above parameters.
Document the learning out of the project
Prepare Test closure report
Deliverables
Test Closure report
Test metrics
Software Testing:
1. In 1994, China airlines airbus a300 crashed and 264 people died.
This is due to software bug.
2. In 1999, failed satellite launch lost around $1.2 billion due to
software bug.
3. 1996, An US bank’s 823 customers are credited with $920 million
due to software bug.
4. In 1985, Canada's Therac-25 radiation therapy machine
malfunctioned due to software bug and delivered lethal radiation
doses to patients, leaving 3 people dead and critically injuring 3
others.
Wrong test data, Wrong testing, Wrong test environment will also be the
causes for defects.
Methods of Testing:
Black box and White box are the two methods of Testing
White box testing:
Testing done with internal knowledge of code.usually done by the developers.
Eg: If the textbox “Username” accepts values from 25-45, then we can’t test
the values from 25 to 45 i.e. from 25, 26, 27...upto 45. It’s time
consuming.Hence opting BVA as below:
Equivalence partioning:
In this technique, you divide set of test condition into partition that can be
considered the same. To get a better idea let see an example.
Suppose if we have larger value like address field should accept values from
100-200, if we go with BVA, then we will miss many values in-between them.
So we have to divide the values as classes below:
100-125
126-150
151-175
176-200
Error guessing:
Experience based technique where the test analyst uses his / her experience to
guess the problematic areas of the application. If the analyst guesses that the
login page is error prone, then the testers write more detailed test cases
concentrating on the login page. Testers can think of variety of combinations of
data to test the login page.
Decision Table Testing is a good way to deal with a combination of inputs, which
produce different results. It helps reduce test effort in verifying each and every
combinations of test data, at the same time ensuring complete coverage
Example: To understand the importance of Decision Table Making we will see an
example, let's consider the behavior of Search Flights Button for different
combinations of Fly From & Fly To.
Rule 1:When destination for both Fly From & Fly To are not set the Flight Icon is
disabled. In the decision table, we register values False for Fly From & Fly To and the
outcome would be False, which is Flights Button will be disabled. Likewise, you can
decide different outcome for different situation.
Rule 2: When Fly From destination is set but Fly to is not set, Flight button is
disabled. Correspondingly, you register True for Fly from destination in the decision
table, and the rest of the entries are false.
Rule 3: When Fly from destination is not set but Fly to destination is set, Flight button
is disabled and you make entries in the decision table.
Rule 4: only when Fly to and Fly from destinations are set, Flights button is enabled
and you make the corresponding entry in the decision table.
If you observe the outcomes for Rule 1, 2 & 3 it remains the same. So you can select
any one of them and rule 4 for your testing.
Levels of testing:
Unit Testing
Integration Testing
System Testing
Unit testing: This is the first level in Testing. Unit testing is testing the
individual components/units of software. Usually done by the developer. It is a
white box testing method. Also called as component testing. Javascript
assertion unit is one of the tool used for unit testing.
Integration testing:
Advantages:
Convenient for small systems.
Disadvantages:
Given the sheer number of interfaces that need to be tested in this
approach, some interfaces links to be tested could be missed easily.
Since the integration testing can commence only after "all" the modules
are designed, testing team will have less time for execution in the testing
phase.
Incremental Approach:
In this approach, testing is done by joining two or more modules that
are logically related. Then the other related modules are added and tested for
the proper functioning. Process continues until all of the modules are joined
and tested successfully.
This process is carried out by using dummy programs called Stubs and Drivers.
Stubs and Drivers do not implement the entire programming logic of the
software module but just simulate data communication with the calling
module.
Bottom Up
Top Down
Bottom up Integration
In the bottom up strategy, each module at lower levels is tested with higher
modules until all modules are tested. It takes help of Drivers for testing
Diagrammatic Representation:
Advantages:
Fault localization is easier.
No time is wasted waiting for all modules to be developed unlike Big-
bang approach
Disadvantages:
Critical modules (at the top level of software architecture) which control
the flow of application are tested last and may be prone to defects.
Early prototype is not possible
Top down Integration:
In Top to down approach, testing takes place from top to down following the
control flow of the software system.
Diagrammatic Representation:
Advantages:
Fault Localization is easier.
Possibility to obtain an early prototype.
Critical Modules are tested on priority; major design flaws could be
found and fixed first.
Disadvantages:
Needs many Stubs.
Modules at lower level are tested inadequately.
Hybrid/sandwitch: Combination of both top down and bottomup approach
System testing
The process of testing an integrated system to verify that it meets specified
requirements. Testing the overall system requirements is system testing.
This testing is done by the end users of the software. Usually clients will
perform UAT to decide whether to accept the software or not.
Types of Testing:
1. Unit testing
2. Integration testing
3. System testing
4. User acceptance testing
5. Smoke testing
6. Sanity testing
7. Regression testing
Smoke testing:
Sanity testing:
This is a subset of regression testing. This is done when minor bug fixes/minor
changes in the application had happened. This is done before releasing the
product to the customer (before UAT).
Regression testing:
This is done to verify because of new changes in the application whether the
existing functionalities are not getting affected. During Change
Request/Enhancement request/Bug fixes, testers will run the regression test
cases to ensure the existing functionalities are not getting affected/impacted.
Types:
Load testing:
Load testing is meant to test the system by constantly and steadily increasing
the load on the system till the time it reaches the threshold limit. It is the
simplest form of testing which employs the use of automation tools such as
LoadRunner or any other good tools, which are available. Load testing is also
famous by the names like volume testing and endurance testing.
Stress testing: Verify how the system behaves during the stressed conditions.
Like in open office, enter beyond 65,000 characters and system should
smoothly handle the stressed condition and it should not accept more than
65000 characters.
Security testing:
Compatibility testing:
Verification:
Validation:
For small projects, these questions are relatively easy to answer. But for the
big project you must think hard to answer those questions.
What to Estimate?
Resources: Resources are required to carry out any project tasks. They
can be people, equipment, facilities, funding, or anything else capable of
definition required for the completion of a project activity.
Times : Time is the most valuable resource in a project. Every project has
a deadline to delivery.
Human Skills : Human skills mean the knowledge and the experience of
the Team members. They affect to your estimation. For example, a team,
whose members have low testing skills, will take more time to finish the
project than the one which has high testing skills.
Cost: Cost is the project budget. Generally speaking, it means how
much money it takes to finish the project.
How to estimate ?
You will learn how to combine these techniques to find the estimate for
Bankcase study.
Step1) Divide the whole project task into subtasks
Task is a piece of work that has been given to someone. To do this, you can use
the Work Breakdown Structure technique.
In this technique, a complex project is divided into modules. The modules are
divided into sub-modules. Each sub-module is further divided into
functionality. It means divide the whole project task into the smallest tasks.
Use the Work Break Down structure to break out the Bank project into 5
smaller tasks-
After that, you can break out each task to the sub-task. The purpose of this
activity is create task as detailedas possible.
Task Members
The management board will review and discuss your estimation plan with you.
You may explain them your estimation logically and reasonably so that they
can approve your estimation plan.
Step2: Now the development Manager will analyse the defect, he will perform
the following actions:
1. If the defect is not a valid defect, then Dev Manager will reject the
defect. Now the status of the defect will be REJECTED. E.g.: Invalid
test data. In the flight reservation application, if the tester enters
the wrong password as selenium (the expected password is
mercury).
2. If the defect is not in scope, then he can defer the defect. Now the
status of the defect will be DEFFERED. E.g.: In banking project, if
the “View mini statement” is not scoped for that release, if the
tester finds defect in that module, then dev team can defer the
defect for the future releases. I.e. defect can be resolved in the
future builds.
3. If the defect is already raised, then he can make the status of the
defect to “DUPLICATE” which indicates the defect has been
already raised by the testers.
Step3: If the Defects are Valid, in scope, not duplicate, then the development
team will start fixing the defect. At this point of time, they will change the
status as “IN PROGRESS” which indicates that they have started working on
the defect.
Step4: If the developer fixes the defect, then he will change the status as
“FIXED”.
Step5: If the tester retest the defect, if the defect has been fixed then he will
change the status as “Closed”. If the defect has NOT been fixed, then he will
change the status as “Reopen”.
Also if the tester closes the defect in Release1, then in Release2 if the same
defect appears, then he can reopen the closed defect. E.g.: In Release1, if
tester raises defect in Delete customer functionality (i.e. if he is unable to
delete the customer and logs this defect [defect id –D1001), after developer
fixes this defect, if the defect works fine, he will close the defect. In Release2, if
the same defect arises, i.e. if the tester is unable to delete the customer, then
he can reopen the closed defect (D1001) in Release1.
Severity:
Severity is the attribute that describes the Degree of impact (DOI) on the
system.
1. Critical
2. High
3. Medium
4. Low
Critical: This is the show stopper. This severity will be provided to defect when
the Major functionality is broken , System crashes or hangs, if there is no
workaround for the issue.
Eg: If user tries to login into the banking site, he is unable to login and system
crashes immediately.
High: This severity type will be provided to the defect when the
feature/function is significantly affected or it does not work. There might be
workaround but it is difficult to user or impractical.
Eg: In the registration form, upon entering all the values, if the user tries to
click on save button, system hangs or does not save the file. Workaround might
be user has to enter all the values in the registration form, and shall save the
file in the File >Save menu.
Medium: This severity type will be provided to the defect when a medium
functionality is affected. There might be workaround for this issue.
Eg: If the Delete customer functionality is not working and this is medium
severity issue.
Low: This severity type will be provided to the defect which does not
affect/impact the system functionality much.
While raising the defect, the tester has to provide the following details:
Defect ID:
If the tester raises the defect in excel sheet, then he has to provide the unique
defect ID. If the tester raises the defect in Defect tracking tool, the defect ID
will be auto generated. Eg: AM_DEF_01, AM_DEF_02, AM_DEF_03....
Defect Summary:
This is the short description about the defect. Mostly it should be one liner as
well as it should describe what the defect is all about.
Status:
If the defect is newly raised by the tester, then its status will be New.
Raised by:
Tester name (who found the defect) must be provided under this section.
Assigned to:
Developer name (who has to fix the defect) should be provided under this
section.
Tested on Version:
Eg: V1
Steps to reproduce:
This is the important section and it should contain the detailed steps required
to replicate the issue.
Eg:
Expected Result:
Actual result:
Severity: Based on the impact, the tester has to provide the severity for the
defect.
Eg: Medium
Attachments: Tester has to attach the screenshots of the issue with clear steps
under this section.
SDLC Models:
1. Waterfall model
2. V Model
3. Incremental model
4. Agile model
5. Iterative model
6. Spiral model
Waterfall model:
Diagram of Waterfall-model:
Advantages of waterfall model:
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.
Very less customer enter action is involved during the development of the
product. Once the product is ready then only it can be demoed to the end
users. Once the product is developed and if any failure occurs then the cost of
fixing such issues are very high, because we need to update everywhere from
document till the logic.
V-Model:
Diagram of V-model:
The high-level design (HLD) phase focuses on system architecture and design.
It provide overview of solution, platform, system, product and service/process.
An integration test plan is created in this phase as well in order to test the
pieces of the software systems ability to work together.
The low-level design (LLD) phase is where the actual software components are
designed. It defines the actual logic for each and every component of the
system. Class diagram with all the methods and relation between classes
comes under LLD. Component tests are created in this phase as well.
The Coding phase is, again, where all coding takes place. Once coding is
complete, the path of execution continues up the right side of the V where the
test plans developed earlier are now put to use.
Advantages of V-model:
Incremental model:
For example:
Generates working software quickly and early during the software life
cycle.
This model is more flexible – less costly to change scope and
requirements.
It is easier to test and debug during a smaller iteration.
In this model customer can respond to each build.
Lowers initial delivery cost.
Easier to manage risk because risky pieces are identified and handled
during it’s iteration.
Disadvantages of Incremental model:
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.
Agile Model:
Iterative model:
An iterative life cycle model does not attempt to start with a full specification
of requirements. Instead, development begins by specifying and implementing
just part of the software, which can then be reviewed in order to identify
further requirements. This process is then repeated, producing a new version
of the software for each cycle of the model.
For example:
In the diagram above when we work iteratively we create rough product or
product piece in one iteration, then review it and improve it in next iteration
and so on until it’s finished. As shown in the image above, in the first iteration
the whole painting is sketched roughly, then in the second iteration colors are
filled and in the third iteration finishing is done. Hence, in iterative model the
whole product is developed step by step.
Spiral model:
The spiral model is similar to the incremental model, with more emphasis
placed on risk analysis. The spiral model has four phases: Planning, Risk
Analysis, Engineering and Evaluation. A software project repeatedly passes
through these phases in iterations (called Spirals in this model). The baseline
spiral, starting in the planning phase, requirements are gathered and risk is
assessed. Each subsequent spirals builds on the baseline spiral.
Risk Analysis: In the risk analysis phase, a process is undertaken to identify risk
and alternate solutions. A prototype is produced at the end of the risk analysis
phase. If any risk is found during the risk analysis then alternate solutions are
suggested and implemented.
Evaluation phase: This phase allows the customer to evaluate the output of
the project to date before the project continues to the next spiral.
Likewise ‘Incremental model’, ‘Iterative model’ and ‘Spiral model’ are also used
based on the requirement of the customer and need of the product.