SlideShare a Scribd company logo

Software Verification, Validation and Testing

The Implementation of Control Flow Graph and Test Cases

1 of 33
Download to read offline
The Implementation of 
Control Flow Graph 
and Test Cases 
submitted in partial fulfillment of the requirements 
for software verification, validation and testing of 
Master of Engineering 
In 
Software Engineering 
Submitted to: Submitted by: 
Mr. Ajay Kumar Sukhpal Singh 
AP (CSED) 801131024 
Computer Science & Engineering Department 
THAPAR UNIVERSITY, PATIALA 
(Formerly known as Thapar Institute of Engg. & Tech.) 
(Established under section 3 of UGC Act, 1956 vide notification # F-12/84-U.3 of Government of India)
TO WHOM IT MAY CONCERN 
7th May, 2012 
I hereby declare that, Sukhpal Singh, Roll No. 801131024 of Thapar University Patiala, have 
undergone a project from 2nd January to 7th May, 2012. I worked on ‘Implementation of 
Control Flow Graph’ project during the software verification, validation and testing lab under 
the supervision of project guide Mr. Ajay Kumar. It is my heartfelt pleasure and deepest sense 
of gratitude to offer my humble and sincere thanks towards Mr. Ajay Kumar, my project guide, 
for his valuable and constant assistance, cooperation, and incisive criticism in my work towards 
my goal. 
Student’s Signatures Signature of Project Guide
TABLE OF CONTENTS 
1. Control Flow…………………………………………………………….1 
2. Control Flow Graph…………………………………………………….1 
3. Control Flow Diagram…………………………………………………..1 
4. Browsing…………………………………………………………………2 
5. Test Cases………………………………………………………………..5 
5.1 For Loop……………………………………………………………..5 
5.2 If………………………………………………………………………7 
5.3 If-else-for……………………………………………………………..9 
5.4 Nested if……………………………………………………………..11 
5.5 If-for…………………………………………………………………13 
5.6 If with two conditions……………………………………………….15 
5.7 Switch case…………………………………………………………...17 
6. Test Cases………………………………………………………………..19
1 
1. Control Flow: 
In computer science, control flow (or alternatively, flow of control) refers to the order in 
which the individual statements, instructions or function calls of an imperative or a 
declarative program are executed or evaluated. Within an imperative programming language, 
a control flow statement is a statement whose execution results in a choice being made as to 
which of two or more paths should be followed. For non-strict functional languages, 
functions and language constructs exist to achieve the same result, but they are not 
necessarily called control flow statements. 
The kinds of control flow statements supported by different languages vary, but can be 
categorized by their effect: 
 continuation at a different statement (unconditional branch or jump), 
 executing a set of statements only if some condition is met (choice - i.e., conditional 
branch), 
 executing a set of statements zero or more times, until some condition is met (i.e., 
loop - the same as conditional branch), 
 executing a set of distant statements, after which the flow of control usually returns 
(subroutines, coroutines, and continuations), 
 Stopping the program, preventing any further execution (unconditional halt). 
Interrupts and signals are low-level mechanisms that can alter the flow of control in a way 
similar to a subroutine, but usually occur as a response to some external stimulus or event 
(that can occur asynchronously), rather than execution of an 'in-line' control flow statement. 
Self-modifying code can also be used to affect control flow through its side effects, but does 
not usually involve an explicit control flow statement. 
At the level of machine or assembly language, control flow instructions usually work by 
altering the program counter. For some CPUs the only control flow instructions available are 
conditional or unconditional branch instructions (also called jumps). 
2. Control flow Graph: 
In a control flow graph each node in the graph represents a basic block, i.e. a straight-line 
piece of code without any jumps or jump targets; jump targets start a block, and jumps end a 
block. Directed edges are used to represent jumps in the control flow. There are, in most 
presentations, two specially designated blocks: the entry block, through which control enters 
into the flow graph, and the exit block, through which all control flow leaves. 
3. Control Flow Diagram: 
A control flow diagram (CFD) is a diagram to describe the control flow of a business process, 
process or program. A control flow diagram can consist of a subdivision to show sequential 
steps, with if-then-else conditions, repetition, and/or case conditions. Suitably annotated 
geometrical figures are used to represent operations, data, or equipment, and arrows are used 
to indicate the sequential flow from one to another.
2 
4. Browsing: 
First of all we have to browse a file from the system by click on the browse that is displaying 
on a main page. The main page has three sections 
 Program: Which the user has to be browsed. 
 Control flow graph: This is diagrammatic representation of the program with the 
help of nodes and edges to calculate the cyclomatic complexity of program. 
 Linear Independent Paths: These are different possible paths from starting of 
control to the end of the program. 
 Nodes: Displaying the total nodes of a browsed program. 
There are two buttons are available on main page. 
 Browse file: It is used to browse the file from system. 
 Show Graph: It is used to display the control flow graph of browsed program. 
Figure 1: Screenshot of main page 
Step 1: Click on “browse file” then it displays a new window for browsing.
3 
Figure 2: Screenshot of browsing a file 
Step 2: Select an appropriate file. 
Step 3: Click on “open” then program will be browsed and displayed on main page. 
Figure 3: Screenshot of browsed program

Recommended

Coding and testing In Software Engineering
Coding and testing In Software EngineeringCoding and testing In Software Engineering
Coding and testing In Software EngineeringSatya Bhushan Verma
 
Fundamental Test Design Techniques
Fundamental Test Design TechniquesFundamental Test Design Techniques
Fundamental Test Design TechniquesTechWell
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box TestingTestbytes
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing TechniquesKiran Kumar
 

More Related Content

What's hot

Black box testing or behavioral testing
Black box testing or behavioral testingBlack box testing or behavioral testing
Black box testing or behavioral testingSlideshare
 
Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow TestingHirra Sultan
 
5 black box and grey box testing
5   black box and grey box testing5   black box and grey box testing
5 black box and grey box testingYisal Khan
 
Boundary value analysis and equivalence partitioning
Boundary value analysis and equivalence partitioningBoundary value analysis and equivalence partitioning
Boundary value analysis and equivalence partitioningSneha Singh
 
Unit testing
Unit testingUnit testing
Unit testingmedsherb
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing FundamentalsKiran Kumar
 
Test case techniques
Test case techniquesTest case techniques
Test case techniquesPina Parmar
 
12 functional-system-testing
12 functional-system-testing12 functional-system-testing
12 functional-system-testingnickynicks76
 
Structural and functional testing
Structural and functional testingStructural and functional testing
Structural and functional testingHimanshu
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueSachin-QA
 
Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Mani Kanth
 
Unit 3 Control Flow Testing
Unit 3   Control Flow TestingUnit 3   Control Flow Testing
Unit 3 Control Flow Testingravikhimani
 
Black box testing
Black box testingBlack box testing
Black box testingAbdul Basit
 
Equivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysisEquivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysisniharika5412
 
Whitepaper Test Case Design and Testing Techniques- Factors to Consider
Whitepaper Test Case Design and Testing Techniques- Factors to ConsiderWhitepaper Test Case Design and Testing Techniques- Factors to Consider
Whitepaper Test Case Design and Testing Techniques- Factors to ConsiderRapidValue
 
Software, Security, manual testing training in Chandigarh
Software, Security, manual testing training in Chandigarh          Software, Security, manual testing training in Chandigarh
Software, Security, manual testing training in Chandigarh tapsi sharma
 
SE2_Lec 21_ TDD and Junit
SE2_Lec 21_ TDD and JunitSE2_Lec 21_ TDD and Junit
SE2_Lec 21_ TDD and JunitAmr E. Mohamed
 

What's hot (20)

Black box testing or behavioral testing
Black box testing or behavioral testingBlack box testing or behavioral testing
Black box testing or behavioral testing
 
Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow Testing
 
5 black box and grey box testing
5   black box and grey box testing5   black box and grey box testing
5 black box and grey box testing
 
Boundary value analysis and equivalence partitioning
Boundary value analysis and equivalence partitioningBoundary value analysis and equivalence partitioning
Boundary value analysis and equivalence partitioning
 
Unit testing
Unit testingUnit testing
Unit testing
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
 
Test case techniques
Test case techniquesTest case techniques
Test case techniques
 
12 functional-system-testing
12 functional-system-testing12 functional-system-testing
12 functional-system-testing
 
Structural and functional testing
Structural and functional testingStructural and functional testing
Structural and functional testing
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)
 
Black box testing
Black box testingBlack box testing
Black box testing
 
Unit 3 Control Flow Testing
Unit 3   Control Flow TestingUnit 3   Control Flow Testing
Unit 3 Control Flow Testing
 
Black box software testing
Black box software testingBlack box software testing
Black box software testing
 
Black box testing
Black box testingBlack box testing
Black box testing
 
Equivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysisEquivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysis
 
Whitepaper Test Case Design and Testing Techniques- Factors to Consider
Whitepaper Test Case Design and Testing Techniques- Factors to ConsiderWhitepaper Test Case Design and Testing Techniques- Factors to Consider
Whitepaper Test Case Design and Testing Techniques- Factors to Consider
 
Black box and white box testing
Black box and white box testingBlack box and white box testing
Black box and white box testing
 
Software, Security, manual testing training in Chandigarh
Software, Security, manual testing training in Chandigarh          Software, Security, manual testing training in Chandigarh
Software, Security, manual testing training in Chandigarh
 
SE2_Lec 21_ TDD and Junit
SE2_Lec 21_ TDD and JunitSE2_Lec 21_ TDD and Junit
SE2_Lec 21_ TDD and Junit
 

Viewers also liked

Test Case Management with MTM 2013
Test Case Management with MTM 2013Test Case Management with MTM 2013
Test Case Management with MTM 2013Raluca Suditu
 
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
 
Data structure computer graphs
Data structure computer graphsData structure computer graphs
Data structure computer graphsKumar
 
Requirement specification
Requirement specificationRequirement specification
Requirement specificationAbdul Basit
 
Graph data structure
Graph data structureGraph data structure
Graph data structureTech_MX
 
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTING
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTINGA WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTING
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTINGJournal For Research
 
Model based software testing
Model based software testingModel based software testing
Model based software testingSachin MK
 
Requirement Analysis
Requirement AnalysisRequirement Analysis
Requirement Analysissslovepk
 
Requirement analysis and specification
Requirement analysis and specificationRequirement analysis and specification
Requirement analysis and specificationM.E. at GTU- PG School
 
Tech On Trend - Chatbots
Tech On Trend - ChatbotsTech On Trend - Chatbots
Tech On Trend - ChatbotsPioneers.io
 
Chatbot 101 - Robert McGovern
Chatbot 101 - Robert McGovernChatbot 101 - Robert McGovern
Chatbot 101 - Robert McGovernRobert McGovern
 
Artificially Intelligent chatbot Implementation
Artificially Intelligent chatbot ImplementationArtificially Intelligent chatbot Implementation
Artificially Intelligent chatbot ImplementationRakesh Chintha
 
Tracxn Research - Chatbots Startup Landscape, June 2016
Tracxn Research - Chatbots Startup Landscape, June 2016Tracxn Research - Chatbots Startup Landscape, June 2016
Tracxn Research - Chatbots Startup Landscape, June 2016Tracxn
 

Viewers also liked (18)

Graphs
GraphsGraphs
Graphs
 
Test cases
Test casesTest cases
Test cases
 
Test Case Management with MTM 2013
Test Case Management with MTM 2013Test Case Management with MTM 2013
Test Case Management with MTM 2013
 
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
 
Data structure computer graphs
Data structure computer graphsData structure computer graphs
Data structure computer graphs
 
Requirement specification
Requirement specificationRequirement specification
Requirement specification
 
Data Structures - Lecture 10 [Graphs]
Data Structures - Lecture 10 [Graphs]Data Structures - Lecture 10 [Graphs]
Data Structures - Lecture 10 [Graphs]
 
Graph data structure
Graph data structureGraph data structure
Graph data structure
 
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTING
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTINGA WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTING
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTING
 
Model based software testing
Model based software testingModel based software testing
Model based software testing
 
Lecture8 data structure(graph)
Lecture8 data structure(graph)Lecture8 data structure(graph)
Lecture8 data structure(graph)
 
Requirement Analysis
Requirement AnalysisRequirement Analysis
Requirement Analysis
 
Introduction to White box testing
Introduction to White box testingIntroduction to White box testing
Introduction to White box testing
 
Requirement analysis and specification
Requirement analysis and specificationRequirement analysis and specification
Requirement analysis and specification
 
Tech On Trend - Chatbots
Tech On Trend - ChatbotsTech On Trend - Chatbots
Tech On Trend - Chatbots
 
Chatbot 101 - Robert McGovern
Chatbot 101 - Robert McGovernChatbot 101 - Robert McGovern
Chatbot 101 - Robert McGovern
 
Artificially Intelligent chatbot Implementation
Artificially Intelligent chatbot ImplementationArtificially Intelligent chatbot Implementation
Artificially Intelligent chatbot Implementation
 
Tracxn Research - Chatbots Startup Landscape, June 2016
Tracxn Research - Chatbots Startup Landscape, June 2016Tracxn Research - Chatbots Startup Landscape, June 2016
Tracxn Research - Chatbots Startup Landscape, June 2016
 

Similar to Software Verification, Validation and Testing

White Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingWhite Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingAnkit Mulani
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhPankaj Thakur
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.pptHirenderPal
 
Software develop....
Software develop.... Software develop....
Software develop.... GCWUS
 
09 cs491 st-t1
09 cs491 st-t109 cs491 st-t1
09 cs491 st-t1NikithaNag
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorialpinck200
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorialpinck2380
 
RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG Greg.Helton
 
Ecet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comEcet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comHarrisGeorgx
 
Ecet 360 Success Begins / snaptutorial.com
Ecet 360  Success Begins / snaptutorial.comEcet 360  Success Begins / snaptutorial.com
Ecet 360 Success Begins / snaptutorial.comWilliamsTaylorzl
 
Ecet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comEcet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comStephenson34
 
Building blocks of Algblocks of Alg.pptx
Building blocks of Algblocks of Alg.pptxBuilding blocks of Algblocks of Alg.pptx
Building blocks of Algblocks of Alg.pptxNISHASOMSCS113
 
Chapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineeringChapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineeringAnasHassan52
 

Similar to Software Verification, Validation and Testing (20)

Ch4-ControlFlowTesting.ppt
Ch4-ControlFlowTesting.pptCh4-ControlFlowTesting.ppt
Ch4-ControlFlowTesting.ppt
 
White Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingWhite Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop Testing
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR Chandigarh
 
Ch05
Ch05Ch05
Ch05
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.ppt
 
Software develop....
Software develop.... Software develop....
Software develop....
 
09 cs491 st-t1
09 cs491 st-t109 cs491 st-t1
09 cs491 st-t1
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorial
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorial
 
Maestro_Abstract
Maestro_AbstractMaestro_Abstract
Maestro_Abstract
 
Testing
TestingTesting
Testing
 
RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG
 
Ecet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comEcet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.com
 
Ecet 360 Success Begins / snaptutorial.com
Ecet 360  Success Begins / snaptutorial.comEcet 360  Success Begins / snaptutorial.com
Ecet 360 Success Begins / snaptutorial.com
 
Ecet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comEcet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.com
 
Building blocks of Algblocks of Alg.pptx
Building blocks of Algblocks of Alg.pptxBuilding blocks of Algblocks of Alg.pptx
Building blocks of Algblocks of Alg.pptx
 
Chapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineeringChapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineering
 
C Programming Unit-2
C Programming Unit-2C Programming Unit-2
C Programming Unit-2
 
Testing
TestingTesting
Testing
 

More from Dr Sukhpal Singh Gill

RESEARCH METHODOLOGY: A PRACTITIONER APPROACH
RESEARCH METHODOLOGY: A PRACTITIONER APPROACHRESEARCH METHODOLOGY: A PRACTITIONER APPROACH
RESEARCH METHODOLOGY: A PRACTITIONER APPROACHDr Sukhpal Singh Gill
 
Cloud Data Centers and the Challenge of Sustainable Energy
Cloud Data Centers and the Challenge of Sustainable EnergyCloud Data Centers and the Challenge of Sustainable Energy
Cloud Data Centers and the Challenge of Sustainable EnergyDr Sukhpal Singh Gill
 
If you know nothing about HTML, this is where you can start !!
If you know nothing about HTML, this is where you can start !!If you know nothing about HTML, this is where you can start !!
If you know nothing about HTML, this is where you can start !!Dr Sukhpal Singh Gill
 
How to Write an Effective Research Paper
How to Write an Effective Research PaperHow to Write an Effective Research Paper
How to Write an Effective Research PaperDr Sukhpal Singh Gill
 
GREEN CLOUD COMPUTING-A Data Center Approach
GREEN CLOUD COMPUTING-A Data Center ApproachGREEN CLOUD COMPUTING-A Data Center Approach
GREEN CLOUD COMPUTING-A Data Center ApproachDr Sukhpal Singh Gill
 
End-to-End Security in Mobile-Cloud Computing
End-to-End Security in Mobile-Cloud ComputingEnd-to-End Security in Mobile-Cloud Computing
End-to-End Security in Mobile-Cloud ComputingDr Sukhpal Singh Gill
 
Autonomic Cloud Computing: Research Perspective
Autonomic Cloud Computing: Research PerspectiveAutonomic Cloud Computing: Research Perspective
Autonomic Cloud Computing: Research PerspectiveDr Sukhpal Singh Gill
 
Java.NET: Integration of Java and .NET
Java.NET: Integration of Java and .NETJava.NET: Integration of Java and .NET
Java.NET: Integration of Java and .NETDr Sukhpal Singh Gill
 
Software Requirements Specification (SRS) for Online Tower Plotting System (O...
Software Requirements Specification (SRS) for Online Tower Plotting System (O...Software Requirements Specification (SRS) for Online Tower Plotting System (O...
Software Requirements Specification (SRS) for Online Tower Plotting System (O...Dr Sukhpal Singh Gill
 
Reduction of Blocking Artifacts In JPEG Compressed Image
 Reduction of Blocking Artifacts In JPEG Compressed Image Reduction of Blocking Artifacts In JPEG Compressed Image
Reduction of Blocking Artifacts In JPEG Compressed ImageDr Sukhpal Singh Gill
 
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Dr Sukhpal Singh Gill
 
Case Study Based Software Engineering Project Development: State of Art
Case Study Based Software Engineering Project Development: State of ArtCase Study Based Software Engineering Project Development: State of Art
Case Study Based Software Engineering Project Development: State of ArtDr Sukhpal Singh Gill
 
Reduction of Blocking Artifacts In JPEG Compressed Image
Reduction of Blocking Artifacts In JPEG Compressed ImageReduction of Blocking Artifacts In JPEG Compressed Image
Reduction of Blocking Artifacts In JPEG Compressed ImageDr Sukhpal Singh Gill
 
Reusability Framework for Cloud Computing
Reusability Framework for Cloud ComputingReusability Framework for Cloud Computing
Reusability Framework for Cloud ComputingDr Sukhpal Singh Gill
 

More from Dr Sukhpal Singh Gill (20)

RESEARCH METHODOLOGY: A PRACTITIONER APPROACH
RESEARCH METHODOLOGY: A PRACTITIONER APPROACHRESEARCH METHODOLOGY: A PRACTITIONER APPROACH
RESEARCH METHODOLOGY: A PRACTITIONER APPROACH
 
Cloud Data Centers and the Challenge of Sustainable Energy
Cloud Data Centers and the Challenge of Sustainable EnergyCloud Data Centers and the Challenge of Sustainable Energy
Cloud Data Centers and the Challenge of Sustainable Energy
 
If you know nothing about HTML, this is where you can start !!
If you know nothing about HTML, this is where you can start !!If you know nothing about HTML, this is where you can start !!
If you know nothing about HTML, this is where you can start !!
 
Software Requirement Specification
Software Requirement SpecificationSoftware Requirement Specification
Software Requirement Specification
 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDF
 
Network Topologies
Network TopologiesNetwork Topologies
Network Topologies
 
How to Write an Effective Research Paper
How to Write an Effective Research PaperHow to Write an Effective Research Paper
How to Write an Effective Research Paper
 
GREEN CLOUD COMPUTING-A Data Center Approach
GREEN CLOUD COMPUTING-A Data Center ApproachGREEN CLOUD COMPUTING-A Data Center Approach
GREEN CLOUD COMPUTING-A Data Center Approach
 
End-to-End Security in Mobile-Cloud Computing
End-to-End Security in Mobile-Cloud ComputingEnd-to-End Security in Mobile-Cloud Computing
End-to-End Security in Mobile-Cloud Computing
 
Autonomic Cloud Computing: Research Perspective
Autonomic Cloud Computing: Research PerspectiveAutonomic Cloud Computing: Research Perspective
Autonomic Cloud Computing: Research Perspective
 
Java.NET: Integration of Java and .NET
Java.NET: Integration of Java and .NETJava.NET: Integration of Java and .NET
Java.NET: Integration of Java and .NET
 
Software Requirements Specification (SRS) for Online Tower Plotting System (O...
Software Requirements Specification (SRS) for Online Tower Plotting System (O...Software Requirements Specification (SRS) for Online Tower Plotting System (O...
Software Requirements Specification (SRS) for Online Tower Plotting System (O...
 
Reduction of Blocking Artifacts In JPEG Compressed Image
 Reduction of Blocking Artifacts In JPEG Compressed Image Reduction of Blocking Artifacts In JPEG Compressed Image
Reduction of Blocking Artifacts In JPEG Compressed Image
 
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
 
Case Study Based Software Engineering Project Development: State of Art
Case Study Based Software Engineering Project Development: State of ArtCase Study Based Software Engineering Project Development: State of Art
Case Study Based Software Engineering Project Development: State of Art
 
Reduction of Blocking Artifacts In JPEG Compressed Image
Reduction of Blocking Artifacts In JPEG Compressed ImageReduction of Blocking Artifacts In JPEG Compressed Image
Reduction of Blocking Artifacts In JPEG Compressed Image
 
Constructors and Destructors
Constructors and DestructorsConstructors and Destructors
Constructors and Destructors
 
Reusability Framework for Cloud Computing
Reusability Framework for Cloud ComputingReusability Framework for Cloud Computing
Reusability Framework for Cloud Computing
 
The reuse capability model
The reuse capability modelThe reuse capability model
The reuse capability model
 
Topological methods
Topological methods Topological methods
Topological methods
 

Recently uploaded

Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdfDr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdfDr.Florence Dayana
 
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTS
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTSA TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTS
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTSDr.M.Geethavani
 
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...EduSkills OECD
 
CATCH UP FRIDAY LESSON PLAN GRADE 6.docx
CATCH UP FRIDAY LESSON PLAN GRADE 6.docxCATCH UP FRIDAY LESSON PLAN GRADE 6.docx
CATCH UP FRIDAY LESSON PLAN GRADE 6.docxAizaPolinarCruz
 
Google Ad Grants Services at TechSoup.pdf
Google Ad Grants Services at TechSoup.pdfGoogle Ad Grants Services at TechSoup.pdf
Google Ad Grants Services at TechSoup.pdfTechSoup
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxdeputymitchell2
 
Plagiarism, Types & Consequences by Dr. Sarita Anand
Plagiarism, Types & Consequences by Dr. Sarita AnandPlagiarism, Types & Consequences by Dr. Sarita Anand
Plagiarism, Types & Consequences by Dr. Sarita AnandDr. Sarita Anand
 
Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...Association for Project Management
 
Understanding Canada's international higher education landscape (2024)
Understanding Canada's international higher education landscape (2024)Understanding Canada's international higher education landscape (2024)
Understanding Canada's international higher education landscape (2024)CaraSkikne1
 
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...i3 Health
 
2.27.24 Malcolm X and the Black Freedom Struggle.pptx
2.27.24 Malcolm X and the Black Freedom Struggle.pptx2.27.24 Malcolm X and the Black Freedom Struggle.pptx
2.27.24 Malcolm X and the Black Freedom Struggle.pptxMaryPotorti1
 
Candace-Stone project& portfolio 1 class
Candace-Stone project& portfolio 1 classCandace-Stone project& portfolio 1 class
Candace-Stone project& portfolio 1 classccstone
 
Kartik Nair In Media Res Media Component
Kartik Nair In Media Res Media ComponentKartik Nair In Media Res Media Component
Kartik Nair In Media Res Media ComponentInMediaRes1
 
Organic Synthesis and Estimation of Functional Groups
Organic Synthesis and Estimation of Functional GroupsOrganic Synthesis and Estimation of Functional Groups
Organic Synthesis and Estimation of Functional GroupsDr.M.Geethavani
 
Plant Genetic Resources, Germplasm, gene pool - Copy.pptx
Plant Genetic Resources, Germplasm, gene pool - Copy.pptxPlant Genetic Resources, Germplasm, gene pool - Copy.pptx
Plant Genetic Resources, Germplasm, gene pool - Copy.pptxAKSHAYMAGAR17
 
Healthy Habits for Happy School Staff - presentation
Healthy Habits for Happy School Staff - presentationHealthy Habits for Happy School Staff - presentation
Healthy Habits for Happy School Staff - presentationPooky Knightsmith
 
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...AKSHAYMAGAR17
 
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...liera silvan
 

Recently uploaded (20)

Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdfDr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
 
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTS
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTSA TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTS
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTS
 
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...
Managing Choice, Coherence and Specialisation in Upper Secondary Education - ...
 
CATCH UP FRIDAY LESSON PLAN GRADE 6.docx
CATCH UP FRIDAY LESSON PLAN GRADE 6.docxCATCH UP FRIDAY LESSON PLAN GRADE 6.docx
CATCH UP FRIDAY LESSON PLAN GRADE 6.docx
 
Advance Mobile Application Development class 04
Advance Mobile Application Development class 04Advance Mobile Application Development class 04
Advance Mobile Application Development class 04
 
Google Ad Grants Services at TechSoup.pdf
Google Ad Grants Services at TechSoup.pdfGoogle Ad Grants Services at TechSoup.pdf
Google Ad Grants Services at TechSoup.pdf
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
CLUBE PERLINGUAS .
CLUBE PERLINGUAS                        .CLUBE PERLINGUAS                        .
CLUBE PERLINGUAS .
 
Plagiarism, Types & Consequences by Dr. Sarita Anand
Plagiarism, Types & Consequences by Dr. Sarita AnandPlagiarism, Types & Consequences by Dr. Sarita Anand
Plagiarism, Types & Consequences by Dr. Sarita Anand
 
Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...
 
Understanding Canada's international higher education landscape (2024)
Understanding Canada's international higher education landscape (2024)Understanding Canada's international higher education landscape (2024)
Understanding Canada's international higher education landscape (2024)
 
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
 
2.27.24 Malcolm X and the Black Freedom Struggle.pptx
2.27.24 Malcolm X and the Black Freedom Struggle.pptx2.27.24 Malcolm X and the Black Freedom Struggle.pptx
2.27.24 Malcolm X and the Black Freedom Struggle.pptx
 
Candace-Stone project& portfolio 1 class
Candace-Stone project& portfolio 1 classCandace-Stone project& portfolio 1 class
Candace-Stone project& portfolio 1 class
 
Kartik Nair In Media Res Media Component
Kartik Nair In Media Res Media ComponentKartik Nair In Media Res Media Component
Kartik Nair In Media Res Media Component
 
Organic Synthesis and Estimation of Functional Groups
Organic Synthesis and Estimation of Functional GroupsOrganic Synthesis and Estimation of Functional Groups
Organic Synthesis and Estimation of Functional Groups
 
Plant Genetic Resources, Germplasm, gene pool - Copy.pptx
Plant Genetic Resources, Germplasm, gene pool - Copy.pptxPlant Genetic Resources, Germplasm, gene pool - Copy.pptx
Plant Genetic Resources, Germplasm, gene pool - Copy.pptx
 
Healthy Habits for Happy School Staff - presentation
Healthy Habits for Happy School Staff - presentationHealthy Habits for Happy School Staff - presentation
Healthy Habits for Happy School Staff - presentation
 
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
 
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...
 

Software Verification, Validation and Testing

  • 1. The Implementation of Control Flow Graph and Test Cases submitted in partial fulfillment of the requirements for software verification, validation and testing of Master of Engineering In Software Engineering Submitted to: Submitted by: Mr. Ajay Kumar Sukhpal Singh AP (CSED) 801131024 Computer Science & Engineering Department THAPAR UNIVERSITY, PATIALA (Formerly known as Thapar Institute of Engg. & Tech.) (Established under section 3 of UGC Act, 1956 vide notification # F-12/84-U.3 of Government of India)
  • 2. TO WHOM IT MAY CONCERN 7th May, 2012 I hereby declare that, Sukhpal Singh, Roll No. 801131024 of Thapar University Patiala, have undergone a project from 2nd January to 7th May, 2012. I worked on ‘Implementation of Control Flow Graph’ project during the software verification, validation and testing lab under the supervision of project guide Mr. Ajay Kumar. It is my heartfelt pleasure and deepest sense of gratitude to offer my humble and sincere thanks towards Mr. Ajay Kumar, my project guide, for his valuable and constant assistance, cooperation, and incisive criticism in my work towards my goal. Student’s Signatures Signature of Project Guide
  • 3. TABLE OF CONTENTS 1. Control Flow…………………………………………………………….1 2. Control Flow Graph…………………………………………………….1 3. Control Flow Diagram…………………………………………………..1 4. Browsing…………………………………………………………………2 5. Test Cases………………………………………………………………..5 5.1 For Loop……………………………………………………………..5 5.2 If………………………………………………………………………7 5.3 If-else-for……………………………………………………………..9 5.4 Nested if……………………………………………………………..11 5.5 If-for…………………………………………………………………13 5.6 If with two conditions……………………………………………….15 5.7 Switch case…………………………………………………………...17 6. Test Cases………………………………………………………………..19
  • 4. 1 1. Control Flow: In computer science, control flow (or alternatively, flow of control) refers to the order in which the individual statements, instructions or function calls of an imperative or a declarative program are executed or evaluated. Within an imperative programming language, a control flow statement is a statement whose execution results in a choice being made as to which of two or more paths should be followed. For non-strict functional languages, functions and language constructs exist to achieve the same result, but they are not necessarily called control flow statements. The kinds of control flow statements supported by different languages vary, but can be categorized by their effect:  continuation at a different statement (unconditional branch or jump),  executing a set of statements only if some condition is met (choice - i.e., conditional branch),  executing a set of statements zero or more times, until some condition is met (i.e., loop - the same as conditional branch),  executing a set of distant statements, after which the flow of control usually returns (subroutines, coroutines, and continuations),  Stopping the program, preventing any further execution (unconditional halt). Interrupts and signals are low-level mechanisms that can alter the flow of control in a way similar to a subroutine, but usually occur as a response to some external stimulus or event (that can occur asynchronously), rather than execution of an 'in-line' control flow statement. Self-modifying code can also be used to affect control flow through its side effects, but does not usually involve an explicit control flow statement. At the level of machine or assembly language, control flow instructions usually work by altering the program counter. For some CPUs the only control flow instructions available are conditional or unconditional branch instructions (also called jumps). 2. Control flow Graph: In a control flow graph each node in the graph represents a basic block, i.e. a straight-line piece of code without any jumps or jump targets; jump targets start a block, and jumps end a block. Directed edges are used to represent jumps in the control flow. There are, in most presentations, two specially designated blocks: the entry block, through which control enters into the flow graph, and the exit block, through which all control flow leaves. 3. Control Flow Diagram: A control flow diagram (CFD) is a diagram to describe the control flow of a business process, process or program. A control flow diagram can consist of a subdivision to show sequential steps, with if-then-else conditions, repetition, and/or case conditions. Suitably annotated geometrical figures are used to represent operations, data, or equipment, and arrows are used to indicate the sequential flow from one to another.
  • 5. 2 4. Browsing: First of all we have to browse a file from the system by click on the browse that is displaying on a main page. The main page has three sections  Program: Which the user has to be browsed.  Control flow graph: This is diagrammatic representation of the program with the help of nodes and edges to calculate the cyclomatic complexity of program.  Linear Independent Paths: These are different possible paths from starting of control to the end of the program.  Nodes: Displaying the total nodes of a browsed program. There are two buttons are available on main page.  Browse file: It is used to browse the file from system.  Show Graph: It is used to display the control flow graph of browsed program. Figure 1: Screenshot of main page Step 1: Click on “browse file” then it displays a new window for browsing.
  • 6. 3 Figure 2: Screenshot of browsing a file Step 2: Select an appropriate file. Step 3: Click on “open” then program will be browsed and displayed on main page. Figure 3: Screenshot of browsed program
  • 7. Step 4: Click on “show graph” then control flow graph, node and linearly independent paths will be displayed on main page. 4 Figure 4: Screenshot of displayed CFG This program works for:  For loop  If statement  If - else – for  For - if  Nested if  If statement (with two conditions)  Switch case
  • 8. 5 5. Test Cases: 5.1 Program: For Loop main() { int i; for(i=0;i<=3;i++) { print i; } } Control Flow Graph 1: Figure 5: CFG for For loop
  • 9. 6 Screenshot 1: Figure 6: Screenshot of CFG for For loop
  • 10. 7 5.2 Program: If (Alterations) main() { int a, b; if(a<=b) { print a; } else { print b; } } Control Flow Graph 2: Figure 7: CFG for If
  • 11. 8 Screenshot 2: Figure 8: Screenshot of CFG for If
  • 12. 9 5.3 Program: If - else - for main() { if (a<=b) Print a; else for(i=0;i<=3;i++) { print i; } } Control Flow Graph 3: Figure 9: CFG for If – else- for
  • 13. 10 Screenshot 3: Figure 10: Screenshot of CFG for If – else- for
  • 14. 11 5.4 Program: Nested if main() { int a, b; if(a<=b) { if(a<=b) { print a; } else { print b; } } else { print b; } } Control Flow Graph 4: Figure 11: CFG for Nested if
  • 15. 12 Screenshot 4: Figure 12: Screenshot of CFG for Nested if
  • 16. 13 5.5 Program: If-for main() { int a,b,i; if (a<=b) { for(i=0;i<=3;i++) { print i; } } } Control Flow Graph 5: Figure 13: CFG for if-for
  • 17. 14 Screenshot 5: Figure 14: Screenshot of CFG for if-for
  • 18. 15 5.6 Program: If with two conditions main() { int a, b; if(a<b && a==b) { print a; } else { print b; } } Control Flow Graph 6: Figure 15: CFG for If with two conditions
  • 19. 16 Screenshot 6: Figure 16: Screenshot of CFG for If with two conditions
  • 20. 17 5.7 Program: Switch Case void main() { int i=10; switch(i) { case 1: print i++; break; case 2: print i--; break; default: print i; } } Control Flow Graph 7:
  • 21. 18 Figure 17: CFG for switch Screenshot 7: Figure 18: Screenshot of CFG for switch
  • 22. 19 6. Test Cases 1. To generate the test cases by applying various testing methods to the switch case program. CASES (i): 1<= i<=5 1. View marks 2. Update marks 3. Add marks 4. Delete marks 5. Find marks Marks (m): 0<=m<=100 Roll_No. (r): 1<=r<=30 A) Equivalence Class Testing Methods: 1. Weak Normal Equivalence Class Testing: Test Case Options(i) Marks(m) Roll_No.(r) T1 3 15 60 2. Strong Normal Equivalence Class Testing: The test case of this class is same as weak normal equivalence class testing because there are no any subintervals (No equivalence class). 3. Weak Robust Equivalence Class Testing: Test Case Options(i) Roll_No.(r) Marks(m) T2 0 15 60 T3 6 15 60 T4 3 0 60 T5 3 31 60 T6 3 15 -1 T7 3 15 101 4. Strong Robust Equivalence Class Testing: Test Case Options(i) Roll_No.(r) Marks(m) T10 0 0 60 T11 6 31 60 T12 0 15 -1 T13 6 15 101 T14 3 0 -1 T15 3 31 101
  • 23. 20 T16 0 0 -1 T17 6 31 101 5. Robust Mixed Equivalence Class Testing: Combine invalid values with other valid values. Test Cases= Max (1, 1, 1) + 6 = 7 [-∞, 1) (5, ∞] =2 [-∞, 1) (30, ∞)= 2 [-∞, 0) (100, ∞]= 2 Test Case Options(i) Roll_No.(r) Marks(m) T1 3 15 60 T2 0 0 -1 T3 0 0 101 T4 0 31 -1 T5 0 31 101 T6 6 0 -1 T7 6 0 101 T8 6 31 -1 T9 6 31 101 B) Boundary Value Testing Methods: 6. Boundary Value Analysis: Test Case Options(i) Roll_No.(r) Marks(m) T1 3 15 0 T2 3 15 1 T3 3 15 60 T4 3 15 99 T5 3 15 100 T6 3 1 60 T7 3 2 60 T8 3 29 60 T9 3 30 60 T10 1 15 60 T11 2 15 60 T12 4 15 60 T13 5 15 60
  • 24. 21 7. Robustness Testing: It includes min-, min, min+, nom, max-, max, max+ for any one variable and for other variables, it takes only nominal value. It adds four more test cases in boundary value analysis. Test Case Options(i) Roll_No.(r) Marks(m) T1 3 15 -1 T2 3 15 0 T3 3 15 1 T4 3 15 60 T5 3 15 99 T6 3 15 100 T7 3 15 101 T8 3 0 60 T9 3 1 60 T10 3 2 60 T11 3 29 60 T12 3 30 60 T13 3 31 60 T14 0 15 60 T15 1 15 60 T16 2 15 60 T17 4 15 60 T18 5 15 60 T19 6 15 60 8. Worst Case Testing: In this testing the cases are generated by making the valid combinations ( min, min+, nom, max-, max,) of options, roll_no and marks, basically it is a Cartesian product of i, m and r. {imin}{rmin, rmin+, rnom, rmax-, rmax}{mmin, mmin+, mnom, mmax-, mmax}=25 {imin+}{rmin, rmin+, rnom, rmax-, rmax}{mmin, mmin+, mnom, mmax-, mmax}=25 {inom}{rmin, rmin+, rnom, rmax-, rmax}{mmin, mmin+, mnom, mmax-, mmax}=25 {imax-}{rmin, rmin+, rnom, rmax-, rmax}{mmin, mmin+, mnom, mmax-, mmax}=25 {imax}{rmin, rmin+, rnom, rmax-, rmax}{mmin, mmin+, mnom, mmax-, mmax}=25 Total Test Cases= 25+25+25+25+25= 125 9. Robust Worst Case Testing: In this testing the cases are generated by making the valid and invalid combinations (min-, min, min+, nom, max-, max,max+) of options, roll_no and marks, basically it is a Cartesian product of i, m and r.
  • 25. {imin-}{rmin-, rmin, rmin+, rnom, rmax-, rmax, rmax+}{mmin-, mmin, mmin+, mnom, mmax-, mmax, mmax+}=49 {imin}{rmin-, rmin, rmin+, rnom, rmax-, rmax, rmax+}{mmin-, mmin, mmin+, mnom, mmax-, mmax, mmax+}=49 {imin+}{rmin-, rmin, rmin+, rnom, rmax-, rmax, rmax+}{mmin-, mmin, mmin+, mnom, mmax-, mmax, mmax+}=49 {inom}{rmin-, rmin, rmin+, rnom, rmax-, rmax, rmax+}{mmin-, mmin, mmin+, mnom, mmax-, mmax, mmax+}=49 {imax-}{rmin-, rmin, rmin+, rnom, rmax-, rmax, rmax+}{mmin-, mmin, mmin+, mnom, mmax-, mmax, mmax+}=49 {imax}{rmin-, rmin, rmin+, rnom, rmax-, rmax, rmax+}{mmin-, mmin, mmin+, mnom, mmax-, mmax, mmax+}=49 {imax+}{rmin-, rmin, rmin+, rnom, rmax-, rmax, rmax+}{mmin-, mmin, mmin+, mnom, mmax-, mmax, mmax+}=49 Total Test Cases= 49*7= 343 22 10. Weak Diagonal In Boundary Value Testing: Test Case Options(i) Roll_No.(r) Marks(m) T1 1 1 0 T2 2 2 1 T3 3 15 60 T4 4 29 99 T5 5 30 100 11. Weak In Boundary Value Testing: (min, min+, nom, max-,max) Test Case Options(i) Roll_No.(r) Marks(m) T1 3 15 0 T2 3 15 1 T3 3 15 60 T4 3 15 99 T5 3 15 100 T6 3 1 60 T7 3 2 60 T8 3 29 60 T9 3 30 60 T10 1 15 60 T11 2 15 60 T12 4 15 60 T13 5 15 60 12. Weak Out Boundary Value Testing: (min-, min+, nom, max-,max+) Test Case Options(i) Roll_No.(r) Marks(m)
  • 26. 23 T1 3 15 -1 T2 3 15 1 T3 3 15 60 T4 3 15 99 T5 3 15 101 T6 3 0 60 T7 3 2 60 T8 3 29 60 T9 3 31 60 T10 0 15 60 T11 2 15 60 T12 4 15 60 T13 6 15 60 13. Weak Simple Out Boundary Value Testing: (min-, min+, max-,max+) Test Case Options(i) Roll_No.(r) Marks(m) T1 3 15 -1 T2 3 15 1 T3 3 15 99 T4 3 15 101 T5 3 0 60 T6 3 2 60 T7 3 29 60 T8 3 31 60 T9 0 15 60 T10 2 15 60 T11 4 15 60 T12 6 15 60 14. Weak Simple Out Boundary Value Testing: Test Case Options(i) Roll_No.(r) Marks(m) T1 1 1 0 T2 1 1 100 T3 1 30 0 T4 1 30 100 T5 5 1 0 T6 5 1 100 T7 5 30 0 T8 5 30 100 T9 2 2 1 T10 2 2 99 T11 2 29 10 T12 2 29 99 T13 4 2 1 T14 4 2 99 T15 4 29 1
  • 27. 24 T16 4 29 99 T17 3 15 60 2. To generate the test cases by applying various testing methods to the insertion sort program. The Maximum number (M) user can enter = 50 The Range (R) of number that is entered by user = 1 to 1000 1<=M<=50 and 1<=R<=1000 A) Equivalence Class Testing Methods: 1. Weak Normal Equivalence Class Testing: Test case Maximum number (M) Range (R) T1 30 550 2. Strong Normal Equivalence Class Testing: The test case of this class is same as weak normal equivalence class testing because there are no any subintervals (No equivalence class). 3. Weak Robust Equivalence Class Testing: Test case Maximum number (M) Range (R) T2 0 550 T3 51 550 T4 25 0 T5 25 1001 4. Strong Robust Equivalence Class Testing: Test case Maximum number (M) Range (R) T6 0 0 T7 51 1001 5. Robust Mixed Equivalence Class Testing: Max (1, 1) + 4= 5 [-∞, 1) (50, ∞] = 2 and [-∞, 1) (1000, ∞] = 2 Test case Maximum number (M) Range (R) T1 25 550 T2 0 0
  • 28. 25 T3 0 1001 T4 51 0 T5 51 1001 B) Boundary Value Testing Methods: 6. Boundary Value Analysis: Test Case Maximum number (M) Range (R) T1 1 550 T2 2 550 T3 30 550 T4 49 550 T5 50 550 T6 30 1 T7 30 2 T8 30 999 T9 30 1000 7. Robustness Testing: It includes min-, min, min+, nom, max-, max, max+ for any one variable and for other variables, it takes only nominal value. It adds four more test cases in boundary value analysis. Test Case Maximum number (M) Range (R) T1 0 550 T2 1 550 T3 2 550 T4 30 550 T5 49 550 T6 50 550 T7 51 550 T8 30 0 T9 30 1 T10 30 2 T11 30 999 T12 30 1000 T13 30 1001 8. Worst Case Testing: In this testing the cases are generated by making the valid combinations ( min, min+, nom, max-, max,) of Maximum number (M) and Range (R), basically it is a Cartesian product of M and R.
  • 29. 26 {Mmin}{Rmin, Rmin+, Rnom, Rmax-, Rmax}= 5 {Mmin+}{Rmin, Rmin+, Rnom, Rmax-, Rmax}= 5 {Mnom}{Rmin, Rmin+, Rnom, Rmax-, Rmax}= 5 {Mmax-}{Rmin, Rmin+, Rnom, Rmax-, Rmax}= 5 {Mmax}{Rmin, Rmin+, Rnom, Rmax-, Rmax}= 5 Total Test Cases= 5+5+5+5+5= 25 9. Robust Worst Case Testing: In this testing the cases are generated by making the valid and invalid combinations (min-, min, min+, nom, max-, max, max+) of Maximum number (M) and Range (R), basically it is a Cartesian product of of M and R. {Mmin-}{ Rmin-, Rmin, Rmin+, Rnom, Rmax-, Rmax, Rmax+}= 7 {Mmin}{ Rmin-, Rmin, Rmin+, Rnom, Rmax-, Rmax, Rmax+}= 7 {Mmin+}{ Rmin-, Rmin, Rmin+, Rnom, Rmax-, Rmax, Rmax+}= 7 {Mnom}{ Rmin-, Rmin, Rmin+, Rnom, Rmax-, Rmax, Rmax+}= 7 {Mmax-}{ Rmin-, Rmin, Rmin+, Rnom, Rmax-, Rmax, Rmax+}= 7 {Mmax}{ Rmin-, Rmin, Rmin+, Rnom, Rmax-, Rmax, Rmax+}= 7 {Mmax+}{ Rmin-, Rmin, Rmin+, Rnom, Rmax-, Rmax, Rmax+}= 7 Total Test Cases= 7*7= 49 10. Weak Diagonal In Boundary Value Testing: Test Case Maximum number (M) Range (R) T1 1 1 T2 2 2 T3 30 550 T4 49 999 T5 50 1000 11. Weak In Boundary Value Testing: (min, min+, nom, max-,max) Test Case Maximum number (M) Range (R) T1 30 1 T2 30 2 T3 30 550 T4 30 999 T5 30 1000 T6 1 550 T7 2 550 T8 49 550 T9 50 550
  • 30. 27 12. Weak Out Boundary Value Testing: Test Case Maximum number (M) Range (R) T1 30 0 T2 30 1 T3 30 550 T4 30 1000 T5 30 1001 T6 0 550 T7 1 550 T8 50 550 T9 51 550 13. Weak Out Boundary Value Testing: (No nominal case) Test Case Maximum number (M) Range (R) T1 30 0 T2 30 1 T3 30 1000 T4 30 1001 T5 0 550 T6 1 550 T7 50 550 T8 51 550 14. Robust Weak Boundary Value Testing: Test Case Maximum number (M) Range (R) T1 0 550 T2 1 550 T3 2 550 T4 30 550 T5 49 550 T6 50 550 T7 51 550 T8 30 0 T9 30 1 T10 30 2 T11 30 999 T12 30 1000 T13 30 1001 15. Robust Weak Simple Boundary Value Testing: Test Case Maximum number (M) Range (R)
  • 31. 28 T1 0 550 T2 1 550 T3 2 550 T4 49 550 T5 50 550 T6 51 550 T7 30 0 T8 30 1 T9 30 2 T10 30 999 T11 30 1000 T12 30 1001 16. Weak Corner In Boundary Value Testing: Test Case Maximum number (M) Range (R) T1 1 1 T2 2 2 T3 49 2 T4 50 1 T5 30 550 T6 1 1000 T7 2 999 T8 49 999 T9 50 1000 17. Robust Corner Out Boundary Value Testing: Test Case Maximum number (M) Range (R) T1 1 1 T2 50 1 T3 1 1000 T4 50 1000 T5 0 1 T6 1 0 T7 51 1 T8 50 0 T9 0 1000 T10 1 1001 T11 50 1001 T12 51 1000
  • 32. 29 3. Decision Table Based Testing: In a university, teacher assign grade on the basis of percentage and an attendance. If absents are more than five then then original grades (based on only percentage) will be shifted by one (ex: A to B). If any student have already F grade then it remains same. Grades are basis on following criteria: Percentage (P) Grade (G) P>=90 A 80<= P<90 B 70<= P<80 C 60<= P<70 D 33<= P<60 E P<33 F Conditions: C1: Absent <=5 C2: P>=90 C3: 80<= P<90 C4: 70<= P<80 C5: 60<= P<70 C6: 33<= P<60 C7: P<33 R: Rules
  • 33. Rules R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 30 Conditions: C1 Y Y Y Y Y Y N N N N N N C2 Y Y C3 Y Y C4 Y Y C5 Y Y C6 Y Y C7 Y Y Actions: A √ B √ √ C √ √ D √ √ E √ √ F √ √ √