[go: up one dir, main page]

0% found this document useful (0 votes)
24 views39 pages

Raisoni Group of Institutions: Presentation On by

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 39

RAISONI GROUP OF INSTITUTIONS

Presentation
On
“Software Testing”
By
Mrs. S.A.Wanjari
Assistant Professor
Department of Computer Engineering
G. H. Raisoni Institute of Engineering &
Technology , Nagpur.

RAISONI GROUP OF INSTITUTIONS 1


Department of Computer Engineering

Unit 1
(14 Marks)

Basics of Software Testing & Testing


Methods

RAISONI GROUP OF INSTITUTIONS 2


What is Software Testing ?

Software Testing:
• Software testing is a process or a series of steps, designed to evaluate the functionality of

a software application with an intent to find error and to check whether the developed

software met the specified requirements.

• Testing is the process of executing a program with the intent of finding errors.

•  It can be either done manually or using automated tools. 

RAISONI GROUP OF INSTITUTIONS 3


Objectives of Software Testing

1. To find the defects or issues occurring in the application.

2. To evaluate the overall performance.

3. To gain confidence & to provide quality software product to user.

4. To prevent defects.

5. To ensure that it fulfills all the requirements of the customer.

6. To ensure that the end result meets the business & user requirements.

RAISONI GROUP OF INSTITUTIONS 4


Principles of Software Testing
• Testing shows presence of defects-
Testing can shows the defects are present, but cannot prove that there are no defects.
• Exhaustive testing is impossible-
Testing everything including all combinations of inputs & preconditions is not possible.
• Early Testing-
Testing activities should start as early as possible & should focused on defined objective
• Defect Clustering-
A small number of modules contains most of the defects discovered during pre-release
testing shows the most operational failures.
• Pesticide Paradox-
The same kinds of tests are repeated again & again eventually the same set of test cases
will no longer be able to find any new bugs.to overcome this pesticide paradox is important to
review the test cases regularly & new tests need to be written.
• Testing is Context dependent-
Different kinds of software products are tested differently.
• Absence of errors-Fallacy-
If software is not fulfil the requirement then finding & fixing defects of such system
does not help.
Software Testing Terminology

• Defect: Commonly refers to several troubles with the software products, with its

external behavior or with its internal failure.

• Failure: The incapacity of a system to conduct its required functions within clarified

performance requirements.

• Fault: A wrong or a false step, process, or data definition in a software product.

• Bug: A bug can be defined as the initiation of error or a problem due to which fault,

failure, incident or an anomaly occurs.

• Error: A human action that produces an incorrect result.

RAISONI GROUP OF INSTITUTIONS 6


What is Test Case?

A test case is a documentation which specifies input values, expected output & the
preconditions for executing the test.
Typical Test Case Parameters:
Test Case ID
Test Scenario
Test Case Description
Test Steps
Preconditions
Test Data
Expected Result
Test Parameters
Actual Result
Status RAISONI GROUP OF INSTITUTIONS 7
ENTRY Criteria(when to START testing) : 

• Entry criteria are the minimum set of condition to start testing work.

• All test hardware platforms must have been successfully installed,configured &

functioning properly.

• All the necessary documentation, design & requirements information should be

available that will allow to testers to operate the system.

• All the standard software tools must have been successfully installed.

• The testing environment such as lab, hardware, software & system administration

support should be ready.

RAISONI GROUP OF INSTITUTIONS 8


EXIT Criteria(when to STOP testing) :

• Exit Criteria defines the items that must be completed before testing can
be concluded.
•  All test plans have been run.

• All requirements coverage has been achieved.


• All severe bugs are resolved.

• All high risk areas have been fully tested.

• The schedule has been achieved.


Skills for Software Tester

1. Communication Skills
2. Domain Knowledge
3. Desire to learn
4. Technical Skills
5. Analytical skills
6. Planning
7. Integrity
8. Curiosity
9. Think from user perspective
10. Be a good judge of your product.
One line explanation required for each.
Verification & Validation
Verification Validation

•It is a static mechanism of verifying documents, •It is a dynamic mechanism of testing and validating
design code,& program. the actual product

•It does not involve executing the code •It always involves executing the code
•Verification uses methods like reviews, •It uses methods like Black Box Testing, White Box
walkthroughs, inspections, and desk- checking etc. Testing, and non-functional testing

• Whether the software confirms to specification is •It checks whether the software meets the
checked requirements and expectations of a customer

•It finds bugs early in the development cycle •It can find bugs that the verification process can
not catch

•QA team does verification •With the involvement of testing team validation is
executed on software code.

•It comes before validation •It comes after verification


•It is human based checking •It is computer based checking
RAISONI GROUP OF INSTITUTIONS 11
V-Model

1. In V-Model the development & testing activity works parallel to each


other. The entire figure looks like a V, hence the name V – model.
2. V-model is also called as Verification & Validation Model. Because first
hal does validation activity & next half does Verification activity.
3. The left side of the model is Software Development Life Cycle – SDLC.
4. Left side process is “Do-Procedure” which is done by developer team.
5. The right side of the model is Software Test Life Cycle – STLC.
6. Right side process is “Check-Procedure” which is done by Testing team.
7. V-model consists of Unit Testing,Integration Testing,System Testing,
Acceptance testing phases.
V-Model

n
atio
ver

valid
ific
ati
on

V MODEL
Advantages of V Model

• It is very easy to understand and apply

• Testing activities like planning, test designing happens well before coding.
Hence saves lot of time.

• It is time saving & quick

• It works well for smaller projects where requirement are very well
understood.
Disdvantages of V Model

• Very rigid & least flexible.

• Guessing the errors in the beginning of the project could take more time.
• Not applicable for larger projects.
Quality Assurance & Quality Control

Quality Assurance Quality Control


QA is the process of managing QC is used to verify the quality
for quality of the output
Activities of QA are process Activities of QC are reviews and
definition and implementation, testing
audits & training

It is preventive process It is corrective process


Verification is an example of QA Validation & software testing is
an example of QC
It is proactive Process It is corrective process
Methods of Testing

Static testing:
• Static testing is Verification activity
• In static testing code is not executed. Rather it manually checks
the code, requirement documents, and design documents to
find errors.
• Main objective of this testing is to improve the quality of
software products by finding errors in early stages of the
development cycle.

Dynamic testing:
• Dynamic testing is Validation activity.
• The dynamic testing is done by executing program.
• Main objective of this testing is to confirm that the software
product works in conformance with the business requirements.
Methods of testing

Sr. White Box Testing Black Box Testing


No
01 This needs the knowledge of software in This does not need the knowledge of
detail. software in detail

02 It is also called as transparent box or glass It is also called as opaque box, dark box
box testing. testing.

03 This can be performed by only developers This can be performed by end users or
and professional testers. anyone

04 It is suited for algorithm testing. It is not suited for algorithm testing


05 It is exhaustive and time consuming. It is least exhaustive and least time
consuming.
06 It is a structural testing of a system. It is a behavioral testing of a system.
Classification of White Box Testing

1)Static Testing:-
A)Inspection
B)Walkthrough
C)Technical Review
2)Structural Testing:-
A)Code Functional Testing
B)Code Coverage Testing
i)Program Statement & line coverage
ii) Branch Coverage
iii) Condition Coverage
C) Code Complexity Testing
Classification of White Box Testing

1. Static Testing
A) Inspection:
• During inspection the documents are prepared and checked thoroughly by the
reviewers before the meeting.
• It involves peers to examine the product.
• A separate preparation is carried out during which the product is examined and the
defects are found.
• The defects found are documented in a logging list or issue log.
B) Walkthrough:
• Walkthrough  is used to review documents with peers, managers, and fellow team
members who are guided by the author of the document to gather feedback and
reach a consensus.
• A walkthrough can be pre-planned or organized based on the needs.
The white Box Approach(cont…)
The White Box Approach(cont…)

C) Technical Review:
A Technical review is a static white-box testing technique which is conducted
to spot the defects early in the life cycle that cannot be detected by black box testing
techniques.
Goals:-
• To ensure that in the technical concepts are used correctly.
• To access the value of technical concepts & alternatives in the product.
• To have consistency in the use & representation of technical conecepts.
• To inform participants about the technical content of the document.
The White Box Approach(cont…)

2. Structural Testing:-
A) Code Functional Testing(Data Flow):
i. Code functional testing involves debugging sort of activities.
ii. During data flow, the check is made for the proper declaration of variables
declared and the loops used are declared and working properly.
For example
1.#include
2.void main()
3. {
4. int i , fact= 1, n;
5. printf(―enter the number ―);
6. scanf(―%d‖,&n);
7. for(i =1 ;i <=n;i++)
8. fact = fact * i;
10. }
The White Box Approach(cont…)

B) Data Coverage (Code Coverage Testing) :


• In this inspects the cod directly & is therefore a form of white box testing.
• As tests are developed, code coverage highlights aspects of the code which may
not be adequately tested & which require additional testing.
• Creating additional test cases to increase coverage.
i) Program Statement & line coverage:-
• Check whether flow of control reached every executable statement of source code
at least once.
• Main Disadvantage is that it is completely insensitive to the logical operators &
switch labels.And does not report wjhether loops reach their termination
condition.
The White Box Approach(cont…)

ii) Branch Coverage:-


• It measures which decision outcomes have been tested.
• It takes more in depth view of source code than statement coverage.
• It measures whether Boolean expression tested in control structures
evaluated to both true & false.
iii) Condition Coverage:-
• It has better sensitivity to the control flow.
• It reports true & false outcomes of each Boolean sub-expression,
separated by logical & Logical or operator.
The White Box Approach(cont…)

C) Code Complexity Testing:


• It performs the verification through reviews, walkthroughs or inspection
as per planned arrangements.
• Cyclomatic complexity measures the amount of decision logic in a single
software unit.
• Cyclomatic Complexity gives the minimum no. of paths that can generate
all possible paths through the module.
• Cyclomatic Complexity defined as
CC = E – N + P
Where,
E =No. of Edges of graph
N =No. of Nodes of graph
P = No. of Connected components.
Black Box Testing Techniques

In black box testing, tester checks the external functionality of


software by setting number of tests. Following are the techniques to generate
test cases for this:-
1. Requirement Based Testing
2. Positive & Negative Testing
3. Boundary value analysis
4. Decision Tables
5. Equivalence Partitioning
6. User Documentation Testing
7. Graph Based Testing
Black Box Testing Techniques

1. Requirement Based Testing:


Requirements-based testing is a testing approach in which test cases, conditions and
data are derived from requirements. It includes functional tests and also non-
functional attributes such as performance, reliability or usability.
Stages in Requirements based Testing:
• Defining Test Completion Criteria - Testing is completed only when all the
functional and non-functional testing is complete.
• Design Test Cases - A Test case has five parameters namely the initial state or
precondition, data setup, the inputs, expected outcomes and actual outcomes.
• Execute Tests – Execute the test cases against the system under test & document
the results.
• Verify Test Results - Verify if the expected and actual results match each other.
• Verify Test Coverage - Verify if the tests cover both functional and non-functional
aspects of the requirement.
• Track and Manage Defects - Any defects detected during the testing process goes
Black Box Testing Techniques conti…

2) Positive & Negative Testing:-


• Positive testing is testing process where the system validated against the
valid input data. Tester always checks only for valid set of values & checks
if a application behaves as expected with its expected inputs.
• example- To test a simple text box to enter age & it should take integer
value. So here provide only positive integer values to check whether it is
working as expected or not.
• Negative Testing is a testing process where the system validated against
the invalid input data. Tester always checks only for invalid set of values &
checks if a application behaves as expected with its negative inputs.
• example- To test a simple text box to enter age & it should take integer
value. So here provide alphabets or any symbols to check whether it is
showing error as expected or not for negative result.
Black Box Testing Techniques conti…

2. Boundary Value Analysis:


• Boundary value analysis is another black box test design technique and it is
based on testing at the boundaries between partitions. It have both valid &
invalid boundaries.(RANGE-CHECKING)
• There are three guidelines for boundary value analysis :
1) One test case for exact boundary values of input domains.
2) One test case for just below boundary value of input domains .
3) One test case for just above boundary values of input domains .
Example :
The exam has a pass boundary at 40 percent, merit at 75 percent and Distinction at 85 percent.
The Valid Boundary values for this scenario will be as follows:
i. 49, 50 - for pass
ii. 74, 75 - for merit
iii. 84, 85 - for distinction
Black Box Testing Techniques conti…

3. Equivalence partitioning:

• Equivalence Partitioning also called as equivalence class partitioning. It is


abbreviated as ECP. It is a software testing technique that divides the input test
data of the application under test into each partition at least once of equivalent
data from which test cases can be derived.
• This reduces the number of permutation & combination of input, output values
used for testing, thereby increasing the coverage and reducing the effort involved
in testing.
• An advantage of this approach is it reduces the time required for performing
testing of a software due to less number of test cases.
• Example- Diploma result analysis-
Invalid Partition- Marks 0-39
Valid Partition- Marks 40-59
Valid Partition- Marks 60-74
Valid Partition- Marks 75-100
Black Box Testing Techniques conti…

Example:
An insurance company that has the following premium rates based on the age
group. A life insurance company has base premium of Rs. 500 for all ages. Based
on the age group, an additional monthly premium has to pay that is as listed in
the table below.
For example, a person aged 34 has to pay a premium=Rs. 500 + Rs. 1000=Rs.
1500.
Below 35 years of age (valid input)
Between 35 and 59 years of age (valid input)
Above 6 years of age (valid input)
Negative age (invalid input)
Age as 0 (invalid input)
Age as any three-digit number (valid input)
Black Box Testing Techniques conti…

4. Decision table :
• Decision table testing is a software testing technique used to test system
behavior for different input combinations. That is why it is also called as a
Cause-Effect table where Cause and effects are captured for
better test coverage.
• Decision table testing is black box test design technique to determine the test
scenarios for complex business logic.
• It provide a systematic way of stating complex business rules, which is useful for
developers as well as for testers.
• Testing combinations can be a challenge, as the number of combinations can
often be huge.
• Decision tables are used to model complicated logic.
Decision Table example

Example:
User Documentation Testing

• It covers all the manuals, user guides, installation guids, setup guides,
software notes that are provided along with the software to help the user
to understand the software system.
• Objective of User Documentation:-

1. To check if what is started in the document is available in the software.


2. To check if what is there in the product is explained correctly in the
document.
3. Careful Documentation Testing can save an organizations time, efforts &
money.
Graph based Testing
• Also known as State based testing
• Used to represent a transaction or work flow.
• This model is represented by state transition diagram & test cases are
designed to exercise the valid & invalid transition between states.

fig. Graph testing for employee application system


MSBTE asked Question

1. Define Software testing.


2. State the principles of Software Testing.
3. State purpose of software testing.
4. List all objectives of testing.
5. What are bugs? List software failure term.
6. What is test case? Which parameters are to be considered while documenting test
cases?
7. What is Entry & Exit criteria of software testing?
8. List all skills of software tester.
9. Compare Quality control & Quality assurance.
10. Difference between verification & validation.
11. Explain V-model with labelled diagram. And State its advantages.
12. Explain Static Testing & Dynamic Testing.
13. Explain White Box Testing with example.
14. Draw classification of white box testing. Explain any one type.
15. Difference between Walkthrough & inspection.
MSBTE asked Question

• Describe Inspection under static testing.


• Explain any one type of structural white box testing.
• Explain the purpose of code coverage testing.
• Explain program statement & line coverage.
• Explain Branch coverage with example.
• Describe condition coverage.
• What is the use of code complexity testing?
• What is Black Box Testing? List any 4 Techniques of black box testing.
• Describe positive & negative testing. Also write test cases for them.
• Explain Boundary condition data testing with example.
• Explain Decision table with example.
• Explain the term Equivalence partitioning.
• What is user documentation testing? State any three objectives of user
documentation testing.
• Describe Graph Based testing with diagram
• Difference between White & Black Box Testing.
Thank you !

RAISONI GROUP OF INSTITUTIONS 39

You might also like