SlideShare a Scribd company logo
1 of 23
Dr. Satya Bhushan Verma
Assistant Professor
 Coding Standard and Guidelines
 Code Review
 Code walk-through
 Code inspection
 Testing
 Design of Test Cases
 Black-box testing
 White Box testing
 Good software development organization usually develop there own coding
standard and guidelines depending on what beat suit their needs and the types of
products they develop.
 Do not use coding style that is too clever or too difficult to understand.
 Avoid obscure side effect.
 Do not use an identifier for multiple purpose
 The code should be well documented.
 Do not used GOTO statement.
 Code review for a module is carried out after the module is successfully compiled
and all the syntax errors eliminated. Code reviews are extremely cost-effective
strategies for reduction in coding errors in order to produce high quality code.
1. Code walk-through
2. Code inspection
 Code walk-through is an informal code analysis technique. In this technique, after
a module has been coded, it is successfully compiled and all syntax errors are
eliminated.
 The main objectives of the walk-through are to discover the algorithmic and
logical errors in the code.
 the aim of code inspection is to discover some common types of errors caused due
to oversight and improper programming.
 The following is a list of some programming errors which can be checked
during code inspection:
 Use of uninitialized variables
 Jumps into loops
 Nonterminating loops
 Incompatible assignments
 Array indices out of bounds
 Improper storage allocation and deallocation
 Mismatches between actual and formal parameters in procedure calls
 Use of incorrect logical operators or incorrect precedence among operators
 Testing a program consists of subjecting the program to a set of test inputs (or test
cases) and observing if the program behaves as expected.
 The following are some commonly used terms associated with testing.
1. A failure is a manifestation of an error (or defect or bug). But the mere presence
of an error may not necessarily lead to a failure.
2. A test case is the triplet [I, S, O], where I is the data input to the system, S is
the state of the system at which the data is input, and O is the expected output
of the system.
3. A test suite is the set of all test cases with which a given software product is to
be tested.
 Following is simple programming error.
If (x>y) max = x;
else max = x;
 The test suite ((x = 3. y = 2); (x = 2, y = 3)) can detect the error
 whereas a larger test suite ( (x = 3, y = 2); (x = 4, y = 3); (x = 5, y = 1)] does not
detect the error.
 Two main approaches to systematically designing test cases
1. Black-box approach
2. White-box (or glass-box) approach
 In black-box testing test cases are designed from an examination of the
input/output values only and no knowledge of design or code is required.
 The following are the two main approaches to designing black-box test cases.
1. Equivalence class partitioning
2. Boundary value analysis
 The following are some general guidelines for designing the equivalence classes
1. If the input data values to a system can be specified by a range of values, then
one valid and two invalid equivalence classes should be defined.
2. If the input data assumes values from a set of discrete members of some
domain, then one equivalence class for valid input values and another for
invalid input values should be defined.
 For a software that computes the square root of an input integer which can
assume values between 0 and 5000, there are three equivalence classes: The set of
negative integers, the set of integers in the range between 0 and 5000, and the
integers larger than 5000. Therefore the test cases must include representative
values from each of the three equivalence classes and a possible test set can
therefore be: [-5, 500, 6000)
 Boundary testing is the process of testing between extreme ends or boundaries
between partitions of the input values.
 Extreme ends like Start- End, Lower- Upper, Maximum-Minimum, Just Inside-
Just Outside values are called boundary values and the testing is called
"boundary testing".
1. Minimum
2. Just near the minimum
3. Just near the maximum
4. Maximum
 For a function that computes the square root of integer values in the range
between 0 and 5000.
 The test ceases are ( 0, -1, 1, 5000, 4999, 5001 ).
 There are several white box testing strategies. Each testing strategy is based on
some heuristic.
 The statement coverage strategy aims to design test cases so that every statement
in a program is executed at least once.
 The principal idea governing the statement coverage strategy is that unless we
execute a statement, we have no way of determining if an error exists in that
statement. Unless a statement is executed, we cannot observe whether it causes
failure due to some illegal memory access, wrong result computation, etc.
int compute_gcd (x, y)
int x, y;
{
while (x != y){
if (xx>y) then
x=x-y
else y=y-x;
}
return x;
}
By choosing the test set ( (x=3, y=3).(x=4. y=3), (x=3, y=4) ). we can exercise the program
such that all statements are executed at least once.
 In the branch coverage-based testing strategy, test cases are designed to make
each branch condition assume true and false values in turn.
 Branch testing is also known as edge testing as in this testing scheme, each edge
of a program's control flow graph is traversed at least once.
 Testcases for branch Coverage [(x=3, y=3).(x=3. y=2), (x=4, y=3). (x=3, y=4))
 The path coverage-based testing strategy requires us to design test cases such
that a linearly independent paths in the program are executed at least once. A
linearly independent path can be defined in terms of the control flow graph (CFG)
of a program.
Coding and testing In Software Engineering
Coding and testing In Software Engineering
Coding and testing In Software Engineering

More Related Content

What's hot

Software Verification, Validation and Testing
Software Verification, Validation and TestingSoftware Verification, Validation and Testing
Software Verification, Validation and TestingDr Sukhpal Singh Gill
 
Equivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysisEquivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysisniharika5412
 
Design Test Case Technique (Equivalence partitioning And Boundary value analy...
Design Test Case Technique (Equivalence partitioning And Boundary value analy...Design Test Case Technique (Equivalence partitioning And Boundary value analy...
Design Test Case Technique (Equivalence partitioning And Boundary value analy...Ryan Tran
 
Test design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesTest design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesKhuong Nguyen
 
Black box testing or behavioral testing
Black box testing or behavioral testingBlack box testing or behavioral testing
Black box testing or behavioral testingSlideshare
 
Fundamental Test Design Techniques
Fundamental Test Design TechniquesFundamental Test Design Techniques
Fundamental Test Design TechniquesTechWell
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing FundamentalsKiran Kumar
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality TestingKiran Kumar
 
Test design techniques
Test design techniquesTest design techniques
Test design techniquesBipul Roy Bpl
 
Boundary and equivalnce systematic test design
Boundary and equivalnce   systematic test designBoundary and equivalnce   systematic test design
Boundary and equivalnce systematic test designIan McDonald
 
White Box Testing
White Box TestingWhite Box Testing
White Box TestingAlisha Roy
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing TechniquesKiran Kumar
 
Input Space Partitioning
Input Space PartitioningInput Space Partitioning
Input Space PartitioningRiyad Parvez
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box TestingTestbytes
 
Black box testing
Black box testingBlack box testing
Black box testingAbdul Basit
 

What's hot (20)

Software Verification, Validation and Testing
Software Verification, Validation and TestingSoftware Verification, Validation and Testing
Software Verification, Validation and Testing
 
Equivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysisEquivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysis
 
Design Test Case Technique (Equivalence partitioning And Boundary value analy...
Design Test Case Technique (Equivalence partitioning And Boundary value analy...Design Test Case Technique (Equivalence partitioning And Boundary value analy...
Design Test Case Technique (Equivalence partitioning And Boundary value analy...
 
Test design techniques
Test design techniquesTest design techniques
Test design techniques
 
Test design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesTest design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniques
 
Black box testing or behavioral testing
Black box testing or behavioral testingBlack box testing or behavioral testing
Black box testing or behavioral testing
 
Fundamental Test Design Techniques
Fundamental Test Design TechniquesFundamental Test Design Techniques
Fundamental Test Design Techniques
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
 
White Box Testing V0.2
White Box Testing V0.2White Box Testing V0.2
White Box Testing V0.2
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality Testing
 
Test design techniques
Test design techniquesTest design techniques
Test design techniques
 
Black box testing
Black box testingBlack box testing
Black box testing
 
Boundary and equivalnce systematic test design
Boundary and equivalnce   systematic test designBoundary and equivalnce   systematic test design
Boundary and equivalnce systematic test design
 
White Box Testing
White Box TestingWhite Box Testing
White Box Testing
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
 
Input Space Partitioning
Input Space PartitioningInput Space Partitioning
Input Space Partitioning
 
Whitebox
WhiteboxWhitebox
Whitebox
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Black box testing
Black box testingBlack box testing
Black box testing
 
Blackbox
BlackboxBlackbox
Blackbox
 

Similar to Coding and testing In Software Engineering

5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.pptSyedAhmad732853
 
Software testing
Software testingSoftware testing
Software testingBala Ganesh
 
Unit testing
Unit testingUnit testing
Unit testingmedsherb
 
White-box testing.pptx
White-box testing.pptxWhite-box testing.pptx
White-box testing.pptxhalaalz3by
 
ISTQB Advanced Study Guide - 4
ISTQB Advanced Study Guide - 4ISTQB Advanced Study Guide - 4
ISTQB Advanced Study Guide - 4Yogindernath Gupta
 
Software testing strategy
Software testing strategySoftware testing strategy
Software testing strategyijseajournal
 
lec-11 Testing.ppt
lec-11 Testing.pptlec-11 Testing.ppt
lec-11 Testing.pptdebjani12
 
A PRACTITIONER'S GUIDE TO SOFTWARE TEST DESIGN [Summary]
A PRACTITIONER'S GUIDE TO SOFTWARE TEST DESIGN [Summary]A PRACTITIONER'S GUIDE TO SOFTWARE TEST DESIGN [Summary]
A PRACTITIONER'S GUIDE TO SOFTWARE TEST DESIGN [Summary]Khizra Sammad
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbjeyasrig
 
Software testing definition
Software testing definitionSoftware testing definition
Software testing definitionHiro Mia
 
Chapter 10 Testing and Quality Assurance1Unders.docx
Chapter 10 Testing and Quality Assurance1Unders.docxChapter 10 Testing and Quality Assurance1Unders.docx
Chapter 10 Testing and Quality Assurance1Unders.docxketurahhazelhurst
 

Similar to Coding and testing In Software Engineering (20)

5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt
 
SWE-6 TESTING.pptx
SWE-6 TESTING.pptxSWE-6 TESTING.pptx
SWE-6 TESTING.pptx
 
Software testing
Software testingSoftware testing
Software testing
 
Testing
TestingTesting
Testing
 
Lesson 2....PPT 1
Lesson 2....PPT 1Lesson 2....PPT 1
Lesson 2....PPT 1
 
Unit testing
Unit testingUnit testing
Unit testing
 
Paper 06
Paper 06Paper 06
Paper 06
 
Black box software testing
Black box software testingBlack box software testing
Black box software testing
 
White-box testing.pptx
White-box testing.pptxWhite-box testing.pptx
White-box testing.pptx
 
ISTQB Advanced Study Guide - 4
ISTQB Advanced Study Guide - 4ISTQB Advanced Study Guide - 4
ISTQB Advanced Study Guide - 4
 
Testing
TestingTesting
Testing
 
Software testing strategy
Software testing strategySoftware testing strategy
Software testing strategy
 
lec-11 Testing.ppt
lec-11 Testing.pptlec-11 Testing.ppt
lec-11 Testing.ppt
 
Unit2 for st
Unit2 for stUnit2 for st
Unit2 for st
 
A PRACTITIONER'S GUIDE TO SOFTWARE TEST DESIGN [Summary]
A PRACTITIONER'S GUIDE TO SOFTWARE TEST DESIGN [Summary]A PRACTITIONER'S GUIDE TO SOFTWARE TEST DESIGN [Summary]
A PRACTITIONER'S GUIDE TO SOFTWARE TEST DESIGN [Summary]
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
 
Block 1 ms-034 unit-1
Block 1 ms-034 unit-1Block 1 ms-034 unit-1
Block 1 ms-034 unit-1
 
Software testing definition
Software testing definitionSoftware testing definition
Software testing definition
 
Chapter 10 Testing and Quality Assurance1Unders.docx
Chapter 10 Testing and Quality Assurance1Unders.docxChapter 10 Testing and Quality Assurance1Unders.docx
Chapter 10 Testing and Quality Assurance1Unders.docx
 
Testing
TestingTesting
Testing
 

Recently uploaded

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 

Recently uploaded (20)

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 

Coding and testing In Software Engineering

  • 1. Dr. Satya Bhushan Verma Assistant Professor
  • 2.  Coding Standard and Guidelines  Code Review  Code walk-through  Code inspection  Testing  Design of Test Cases  Black-box testing  White Box testing
  • 3.  Good software development organization usually develop there own coding standard and guidelines depending on what beat suit their needs and the types of products they develop.
  • 4.  Do not use coding style that is too clever or too difficult to understand.  Avoid obscure side effect.  Do not use an identifier for multiple purpose  The code should be well documented.  Do not used GOTO statement.
  • 5.  Code review for a module is carried out after the module is successfully compiled and all the syntax errors eliminated. Code reviews are extremely cost-effective strategies for reduction in coding errors in order to produce high quality code. 1. Code walk-through 2. Code inspection
  • 6.  Code walk-through is an informal code analysis technique. In this technique, after a module has been coded, it is successfully compiled and all syntax errors are eliminated.  The main objectives of the walk-through are to discover the algorithmic and logical errors in the code.
  • 7.  the aim of code inspection is to discover some common types of errors caused due to oversight and improper programming.  The following is a list of some programming errors which can be checked during code inspection:  Use of uninitialized variables  Jumps into loops  Nonterminating loops  Incompatible assignments  Array indices out of bounds  Improper storage allocation and deallocation  Mismatches between actual and formal parameters in procedure calls  Use of incorrect logical operators or incorrect precedence among operators
  • 8.  Testing a program consists of subjecting the program to a set of test inputs (or test cases) and observing if the program behaves as expected.  The following are some commonly used terms associated with testing. 1. A failure is a manifestation of an error (or defect or bug). But the mere presence of an error may not necessarily lead to a failure. 2. A test case is the triplet [I, S, O], where I is the data input to the system, S is the state of the system at which the data is input, and O is the expected output of the system. 3. A test suite is the set of all test cases with which a given software product is to be tested.
  • 9.  Following is simple programming error. If (x>y) max = x; else max = x;  The test suite ((x = 3. y = 2); (x = 2, y = 3)) can detect the error  whereas a larger test suite ( (x = 3, y = 2); (x = 4, y = 3); (x = 5, y = 1)] does not detect the error.
  • 10.  Two main approaches to systematically designing test cases 1. Black-box approach 2. White-box (or glass-box) approach
  • 11.  In black-box testing test cases are designed from an examination of the input/output values only and no knowledge of design or code is required.  The following are the two main approaches to designing black-box test cases. 1. Equivalence class partitioning 2. Boundary value analysis
  • 12.  The following are some general guidelines for designing the equivalence classes 1. If the input data values to a system can be specified by a range of values, then one valid and two invalid equivalence classes should be defined. 2. If the input data assumes values from a set of discrete members of some domain, then one equivalence class for valid input values and another for invalid input values should be defined.
  • 13.  For a software that computes the square root of an input integer which can assume values between 0 and 5000, there are three equivalence classes: The set of negative integers, the set of integers in the range between 0 and 5000, and the integers larger than 5000. Therefore the test cases must include representative values from each of the three equivalence classes and a possible test set can therefore be: [-5, 500, 6000)
  • 14.  Boundary testing is the process of testing between extreme ends or boundaries between partitions of the input values.  Extreme ends like Start- End, Lower- Upper, Maximum-Minimum, Just Inside- Just Outside values are called boundary values and the testing is called "boundary testing". 1. Minimum 2. Just near the minimum 3. Just near the maximum 4. Maximum
  • 15.  For a function that computes the square root of integer values in the range between 0 and 5000.  The test ceases are ( 0, -1, 1, 5000, 4999, 5001 ).
  • 16.  There are several white box testing strategies. Each testing strategy is based on some heuristic.
  • 17.  The statement coverage strategy aims to design test cases so that every statement in a program is executed at least once.  The principal idea governing the statement coverage strategy is that unless we execute a statement, we have no way of determining if an error exists in that statement. Unless a statement is executed, we cannot observe whether it causes failure due to some illegal memory access, wrong result computation, etc.
  • 18. int compute_gcd (x, y) int x, y; { while (x != y){ if (xx>y) then x=x-y else y=y-x; } return x; } By choosing the test set ( (x=3, y=3).(x=4. y=3), (x=3, y=4) ). we can exercise the program such that all statements are executed at least once.
  • 19.  In the branch coverage-based testing strategy, test cases are designed to make each branch condition assume true and false values in turn.  Branch testing is also known as edge testing as in this testing scheme, each edge of a program's control flow graph is traversed at least once.  Testcases for branch Coverage [(x=3, y=3).(x=3. y=2), (x=4, y=3). (x=3, y=4))
  • 20.  The path coverage-based testing strategy requires us to design test cases such that a linearly independent paths in the program are executed at least once. A linearly independent path can be defined in terms of the control flow graph (CFG) of a program.