SlideShare a Scribd company logo
1 of 17
Download to read offline
INSTITUTE OF INFORMATION TECHNOLOGY
UNIVERSITY OF DHAKA
Software Testing
Submitted by
Minhas Kamal
Roll- BSSE0509
Submitted to
Alim-ul-Giash
Lecturer
Institute of Information Technology,
University of Dhaka
Data: 10-Nov-15
Method -1: findQueen
1 private int findQueen(int row){
2 intqueenColumnNo=
3 for(int j=0; j<boardSize; j++){
4 if(boxes[row][j]==1){
5 queenColumnNo=j;
6 break;
7 }
8 }
9 return queenColumnNo;
10 }
Flow Diagram:
Cyclomatic Complexity:
1. V(G) = e - n + 2p = 7 – 6 + 2 = 3
2. V(G) = d + 1 = (1+1) + 1 = 3
3. V(G) = number of regions = 3
findQueen(int row){
intqueenColumnNo=-1;
for(int j=0; j<boardSize; j++){
if(boxes[row][j]==1){
queenColumnNo=j;
break;
return queenColumnNo;
6 + 2 = 3
V(G) = d + 1 = (1+1) + 1 = 3
V(G) = number of regions = 3
1
2
Independent Paths:
1. 1, 2, 3, 4, 5, 6, 9, 10
2. 1, 2, 3, 9, 10
3. 1, 2, 3, 4, 8, 3, 9, 10
Test Case:
Test Case ID Input Expected Output Independent Path
Covered by Test Case
TC-1 row = 0
boardSize = 2
boxes = {{1,0},{0,0}}
queenColumnNo = 0 1
TC-2 row = 0
boardSize = -1
boxes = {{ }}
queenColumnNo = -1 2
TC-3 row = 0
boardSize = 1
boxes = {{0}}
queenColumnNo = -1 3
Data Flow Graph for ‘queenColumnNo
Data Flow Graph for ‘row’:
queenColumnNo’:
3
4
All du-paths:
queenColumnNo row
2-3-9 1-2-3-4-8-3-4
2-3-4-8-3-9 1-2-3-4
2-3-4-5-6-9
2-3-4-8-3-4-5-6-9
5-6-9
Method -2: setQueen
1 public void setQueen(int row, int column) {
2 for(int i=0; i<boardSize; i++){
3 boxes[row][i] = 0;
4 }
5
6 geneticSequence[row] = column;
7 boxes[row][column] = 1;
8 }
Flow Diagram:
Cyclomatic Complexity:
1. V(G) = e - n + 2p = 4 – 4
2. V(G) = d + 1 = 1 + 1 = 2
3. V(G) = number of regions =
Independent Paths:
1. 1, 2, 3, 4, 2, 5, 6, 7, 8
2. 1, 2, 5, 6, 7, 8 (unfeasible path)
public void setQueen(int row, int column) {
for(int i=0; i<boardSize; i++){
boxes[row][i] = 0;
geneticSequence[row] = column;
boxes[row][column] = 1;
4 + 2 = 2
V(G) = number of regions = 2
(unfeasible path)
5
Test Case:
Test Case ID Input
TC-1 row = 0
column = 0
boardSize = 1
Data Flow Graph for ‘row’:
Expected Output Independent Path
Covered by Test Case
boxes = {{1}}
queenColumnNo = {0}
1
6
Independent Path
Covered by Test Case
Data Flow Graph for ‘column’
All du-paths:
row
1-2-5-6-7
1-2-3-4-2-5-6-7
1-2-3
1-2-3-2-3
column’:
column
1-2-5-6-7
1-2-3-4-2-5-6-7
7
Method -3: toString
1 public String toString(){
2 String string = "";
3
4 for(int i=0; i<boardSize; i++){
5 for(int j=0; j<boardSize; j++){
6 string += boxes[i][j] + " ";
7 }
8 string += "
9 }
10
11 return string;
12 }
Flow Diagram:
Cyclomatic Complexity:
1. V(G) = e - n + 2p = 7 – 6 + 2 = 3
2. V(G) = d + 1 = (1+1) + 1 = 3
3. V(G) = number of regions = 3
public String toString(){
String string = "";
for(int i=0; i<boardSize; i++){
for(int j=0; j<boardSize; j++){
string += boxes[i][j] + " ";
string += "n";
6 + 2 = 3
V(G) = d + 1 = (1+1) + 1 = 3
(G) = number of regions = 3
8
9
Independent Paths:
1. 1, 2, 3, 4, 5, 6, 7, 5, 8, 9, 4, 10, 11, 12
2. 1, 2, 3, 4, 10, 11, 12
3. 1, 2, 3, 4, 5, 8, 9, 4, 10, 11, 12 (unfeasible path)
Test Case:
Test Case ID Input Expected Output Independent Path
Covered by Test Case
TC-1 boardSize = 1
boxes = {{0}}
string = “0 n” 1
TC-2 boardSize = -1
boxes = {{ }}
string = “” 2
Data Flow Graph for ‘string’:
All du-paths:
string
2-
2-
2-
2-
6-
6-
6-
8-
8-
8-
string
-3-4-10-11
-3-4-5-6
-3-4-5-6-7-5-8
-3-4-5-6-7-5-8-4-10-11
-5-8
-5-8-4-10-11
-5-6
-4-10-11
-4-5-6
-4-5-8
10
Method -4: occurMutation
1 public void occurMutation(
2 Random random = new Random();
3
4 if(randomValue
5 int rowNo = Math.abs(random.nextInt()%boardSize);
6 int columnNo = Math.abs(random.nextInt()%boardSize);
7
8 setQueen(rowNo, columnNo);
9 }
10 }
Flow Diagram:
Cyclomatic Complexity:
1. V(G) = e - n + 2p = 4 – 4
2. V(G) = d + 1 = 1 + 1 = 2
3. V(G) = number of regions = 2
Independent Paths:
1. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
2. 1, 2, 3, 4, 10
public void occurMutation(int randomValue){
Random random = new Random();
%10==0){
rowNo = Math.abs(random.nextInt()%boardSize);
columnNo = Math.abs(random.nextInt()%boardSize);
setQueen(rowNo, columnNo);
4 + 2 = 2
number of regions = 2
10
11
rowNo = Math.abs(random.nextInt()%boardSize);
columnNo = Math.abs(random.nextInt()%boardSize);
Test Case:
Test Case ID Input
TC-1 random = 100
TC-2 random = 97
Data Flow Graph for ‘random
Data Flow Graph for ‘random
Expected Output Independent Path
Covered by Test Case
“setQueen()” method
is called & queen is
randomly placed
1
Do nothing 2
randomValue’:
random’:
12
Independent Path
Covered by Test Case
Data Flow Graph for ‘rowNo’:
Data Flow Graph for ‘columnNo
All du-paths:
randomValue random
1-2-3-4 2-3-4-5
2-3-4-5
’:
columnNo’:
random rowNo columnNo
5-6 5-6-7-8 6-7
5
13
columnNo
7-8
Method -5: getCopy
1 public Board getCopy(){
2 Board newBoard = new Board(boardSize);
3
4 for(int i=0; i<boardSize; i++){
5 for(int j=0; j<boardSize; j++){
6 newBoard.boxes[i][j] = this.boxes[i][j];
7 }
8 newBoard.geneticSequence[i] = this.geneticSequence[i];
9 }
10
11 return newBoard;
12 }
Flow Diagram:
public Board getCopy(){
Board newBoard = new Board(boardSize);
for(int i=0; i<boardSize; i++){
for(int j=0; j<boardSize; j++){
newBoard.boxes[i][j] = this.boxes[i][j];
newBoard.geneticSequence[i] = this.geneticSequence[i];
return newBoard;
14
newBoard.boxes[i][j] = this.boxes[i][j];
newBoard.geneticSequence[i] = this.geneticSequence[i];
15
Cyclomatic Complexity:
1. V(G) = e - n + 2p = 7 – 6 + 2 = 3
2. V(G) = d + 1 = (1+1) + 1 = 3
3. V(G) = number of regions = 3
Independent Paths:
1. 1, 2, 3, 4, 5, 6, 7, 5, 8, 9, 4, 10, 11, 12
2. 1, 2, 3, 4, 10, 11, 12
3. 1, 2, 3, 4, 5, 8, 9, 4, 10, 11, 12 (unfeasible path)
Test Case:
Test Case ID Input Expected Output Independent Path
Covered by Test Case
TC-1 boardSize = 1
boxes = {{1}}
newBoard = {{1}} 1
TC-2 boardSize = -1
boxes = {{ }}
newBoard = {{ }} 2
Data Flow Graph for ‘newBoard
All du-paths:
newBoard
2-3-4-10-11
2-3-4-5-8-4-10
2-3-4-5-6-7-5
6-7-5-8-9-4-10
8-9-4-10-11
newBoard’:
10-11
5-8-4-10-11
10-11
16

More Related Content

What's hot

Java awt (abstract window toolkit)
Java awt (abstract window toolkit)Java awt (abstract window toolkit)
Java awt (abstract window toolkit)Elizabeth alexander
 
Constructors in java
Constructors in javaConstructors in java
Constructors in javachauhankapil
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional arrayRajendran
 
SRS(software requirement specification)
SRS(software requirement specification)SRS(software requirement specification)
SRS(software requirement specification)Akash Kumar Dhameja
 
Static and Dynamic Behavior
Static and Dynamic BehaviorStatic and Dynamic Behavior
Static and Dynamic Behavioradil raja
 
Array Presentation (EngineerBaBu.com)
Array Presentation (EngineerBaBu.com)Array Presentation (EngineerBaBu.com)
Array Presentation (EngineerBaBu.com)EngineerBabu
 
An Online Car Parking System (Features & Diagrams Only)
An Online Car Parking System (Features & Diagrams Only)An Online Car Parking System (Features & Diagrams Only)
An Online Car Parking System (Features & Diagrams Only)Jubayer Al Mahmud
 
9781111530532 ppt ch08
9781111530532 ppt ch089781111530532 ppt ch08
9781111530532 ppt ch08Terry Yoast
 
Advance C++notes
Advance C++notesAdvance C++notes
Advance C++notesRajiv Gupta
 
Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function Kamlesh Makvana
 
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...Nithin Kumar,VVCE, Mysuru
 
C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#Dr.Neeraj Kumar Pandey
 

What's hot (20)

Java awt (abstract window toolkit)
Java awt (abstract window toolkit)Java awt (abstract window toolkit)
Java awt (abstract window toolkit)
 
Java – lexical issues
Java – lexical issuesJava – lexical issues
Java – lexical issues
 
Constructors in java
Constructors in javaConstructors in java
Constructors in java
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional array
 
SRS(software requirement specification)
SRS(software requirement specification)SRS(software requirement specification)
SRS(software requirement specification)
 
Input Validation
Input ValidationInput Validation
Input Validation
 
Static and Dynamic Behavior
Static and Dynamic BehaviorStatic and Dynamic Behavior
Static and Dynamic Behavior
 
Methods and constructors in java
Methods and constructors in javaMethods and constructors in java
Methods and constructors in java
 
Array Presentation (EngineerBaBu.com)
Array Presentation (EngineerBaBu.com)Array Presentation (EngineerBaBu.com)
Array Presentation (EngineerBaBu.com)
 
Classes objects in java
Classes objects in javaClasses objects in java
Classes objects in java
 
An Online Car Parking System (Features & Diagrams Only)
An Online Car Parking System (Features & Diagrams Only)An Online Car Parking System (Features & Diagrams Only)
An Online Car Parking System (Features & Diagrams Only)
 
9781111530532 ppt ch08
9781111530532 ppt ch089781111530532 ppt ch08
9781111530532 ppt ch08
 
Advance C++notes
Advance C++notesAdvance C++notes
Advance C++notes
 
Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function
 
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
 
C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#
 
Oops in Java
Oops in JavaOops in Java
Oops in Java
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
 
Java program structure
Java program structure Java program structure
Java program structure
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 

Similar to IT Software Testing Methods

Idea for ineractive programming language
Idea for ineractive programming languageIdea for ineractive programming language
Idea for ineractive programming languageLincoln Hannah
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_22-Feb-2021_L9-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_22-Feb-2021_L9-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_22-Feb-2021_L9-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_22-Feb-2021_L9-...MaruMengesha
 
Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語ikdysfm
 
The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)theijes
 
Order-Picking-Policies.ppt
Order-Picking-Policies.pptOrder-Picking-Policies.ppt
Order-Picking-Policies.pptTaspiyaAfroz
 
All pairs shortest path algorithm
All pairs shortest path algorithmAll pairs shortest path algorithm
All pairs shortest path algorithmSrikrishnan Suresh
 
Ip 5 discrete mathematics
Ip 5 discrete mathematicsIp 5 discrete mathematics
Ip 5 discrete mathematicsMark Simon
 
2015 16combinepdf
2015 16combinepdf2015 16combinepdf
2015 16combinepdfmadhesi
 
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
Current Score  –  0 Due  Wednesday, November 19 2014 0400 .docxCurrent Score  –  0 Due  Wednesday, November 19 2014 0400 .docx
Current Score – 0 Due Wednesday, November 19 2014 0400 .docxfaithxdunce63732
 
Control system lab nyquist plot
Control system lab nyquist plotControl system lab nyquist plot
Control system lab nyquist plotkawsarmahmud8
 

Similar to IT Software Testing Methods (20)

Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Idea for ineractive programming language
Idea for ineractive programming languageIdea for ineractive programming language
Idea for ineractive programming language
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_22-Feb-2021_L9-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_22-Feb-2021_L9-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_22-Feb-2021_L9-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_22-Feb-2021_L9-...
 
C programs
C programsC programs
C programs
 
Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語
 
The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)
 
Gate-Cs 1993
Gate-Cs 1993Gate-Cs 1993
Gate-Cs 1993
 
Order-Picking-Policies.ppt
Order-Picking-Policies.pptOrder-Picking-Policies.ppt
Order-Picking-Policies.ppt
 
All pairs shortest path algorithm
All pairs shortest path algorithmAll pairs shortest path algorithm
All pairs shortest path algorithm
 
Ip 5 discrete mathematics
Ip 5 discrete mathematicsIp 5 discrete mathematics
Ip 5 discrete mathematics
 
White box testing
White box testingWhite box testing
White box testing
 
Parameters
ParametersParameters
Parameters
 
2 d matrices
2 d matrices2 d matrices
2 d matrices
 
2015 16combinepdf
2015 16combinepdf2015 16combinepdf
2015 16combinepdf
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
CS.3.Arrays.pdf
CS.3.Arrays.pdfCS.3.Arrays.pdf
CS.3.Arrays.pdf
 
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
Current Score  –  0 Due  Wednesday, November 19 2014 0400 .docxCurrent Score  –  0 Due  Wednesday, November 19 2014 0400 .docx
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
 
Math assignment Program
Math assignment ProgramMath assignment Program
Math assignment Program
 
Control system lab nyquist plot
Control system lab nyquist plotControl system lab nyquist plot
Control system lab nyquist plot
 

More from Minhas Kamal

Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingMinhas Kamal
 
Deep Learning - Exploring The Magical World of Neural Network
Deep Learning - Exploring The Magical World of Neural NetworkDeep Learning - Exploring The Magical World of Neural Network
Deep Learning - Exploring The Magical World of Neural NetworkMinhas Kamal
 
Machine Learning - Entering into The Wonderful Galaxy of Machine Learning
Machine Learning - Entering into The Wonderful Galaxy of Machine LearningMachine Learning - Entering into The Wonderful Galaxy of Machine Learning
Machine Learning - Entering into The Wonderful Galaxy of Machine LearningMinhas Kamal
 
Artificial Intelligence - Staring at The Grand Universe of AI (1)
Artificial Intelligence - Staring at The Grand Universe of AI (1)Artificial Intelligence - Staring at The Grand Universe of AI (1)
Artificial Intelligence - Staring at The Grand Universe of AI (1)Minhas Kamal
 
Final Project Report- Bengali Braille to Text Translator
Final Project Report- Bengali Braille to Text TranslatorFinal Project Report- Bengali Braille to Text Translator
Final Project Report- Bengali Braille to Text TranslatorMinhas Kamal
 
Abstract- Bengali Braille to Text Translator
Abstract- Bengali Braille to Text TranslatorAbstract- Bengali Braille to Text Translator
Abstract- Bengali Braille to Text TranslatorMinhas Kamal
 
Software Project Management: Project Summary
Software Project Management: Project SummarySoftware Project Management: Project Summary
Software Project Management: Project SummaryMinhas Kamal
 
Software Project Management: Budget
Software Project Management: BudgetSoftware Project Management: Budget
Software Project Management: BudgetMinhas Kamal
 
Software Project Management: Testing Document
Software Project Management: Testing DocumentSoftware Project Management: Testing Document
Software Project Management: Testing DocumentMinhas Kamal
 
Software Project Management: Change Control
Software Project Management: Change ControlSoftware Project Management: Change Control
Software Project Management: Change ControlMinhas Kamal
 
Software Project Management: Release Notes
Software Project Management: Release NotesSoftware Project Management: Release Notes
Software Project Management: Release NotesMinhas Kamal
 
Software Project Management: Configuration Management
Software Project Management: Configuration ManagementSoftware Project Management: Configuration Management
Software Project Management: Configuration ManagementMinhas Kamal
 
Software Project Management: Risk Management
Software Project Management: Risk ManagementSoftware Project Management: Risk Management
Software Project Management: Risk ManagementMinhas Kamal
 
Software Project Management: Software Architecture
Software Project Management: Software ArchitectureSoftware Project Management: Software Architecture
Software Project Management: Software ArchitectureMinhas Kamal
 
Software Project Management: Software Requirement Specification
Software Project Management: Software Requirement SpecificationSoftware Project Management: Software Requirement Specification
Software Project Management: Software Requirement SpecificationMinhas Kamal
 
Software Project Management: Project Planning
Software Project Management: Project PlanningSoftware Project Management: Project Planning
Software Project Management: Project PlanningMinhas Kamal
 
Software Project Management: Business Case
Software Project Management: Business CaseSoftware Project Management: Business Case
Software Project Management: Business CaseMinhas Kamal
 
Software Project Management: Project Initiation
Software Project Management: Project InitiationSoftware Project Management: Project Initiation
Software Project Management: Project InitiationMinhas Kamal
 
Software Project Management: Project Charter
Software Project Management: Project CharterSoftware Project Management: Project Charter
Software Project Management: Project CharterMinhas Kamal
 
Software Project Management Presentation Final
Software Project Management Presentation FinalSoftware Project Management Presentation Final
Software Project Management Presentation FinalMinhas Kamal
 

More from Minhas Kamal (20)

Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Deep Learning - Exploring The Magical World of Neural Network
Deep Learning - Exploring The Magical World of Neural NetworkDeep Learning - Exploring The Magical World of Neural Network
Deep Learning - Exploring The Magical World of Neural Network
 
Machine Learning - Entering into The Wonderful Galaxy of Machine Learning
Machine Learning - Entering into The Wonderful Galaxy of Machine LearningMachine Learning - Entering into The Wonderful Galaxy of Machine Learning
Machine Learning - Entering into The Wonderful Galaxy of Machine Learning
 
Artificial Intelligence - Staring at The Grand Universe of AI (1)
Artificial Intelligence - Staring at The Grand Universe of AI (1)Artificial Intelligence - Staring at The Grand Universe of AI (1)
Artificial Intelligence - Staring at The Grand Universe of AI (1)
 
Final Project Report- Bengali Braille to Text Translator
Final Project Report- Bengali Braille to Text TranslatorFinal Project Report- Bengali Braille to Text Translator
Final Project Report- Bengali Braille to Text Translator
 
Abstract- Bengali Braille to Text Translator
Abstract- Bengali Braille to Text TranslatorAbstract- Bengali Braille to Text Translator
Abstract- Bengali Braille to Text Translator
 
Software Project Management: Project Summary
Software Project Management: Project SummarySoftware Project Management: Project Summary
Software Project Management: Project Summary
 
Software Project Management: Budget
Software Project Management: BudgetSoftware Project Management: Budget
Software Project Management: Budget
 
Software Project Management: Testing Document
Software Project Management: Testing DocumentSoftware Project Management: Testing Document
Software Project Management: Testing Document
 
Software Project Management: Change Control
Software Project Management: Change ControlSoftware Project Management: Change Control
Software Project Management: Change Control
 
Software Project Management: Release Notes
Software Project Management: Release NotesSoftware Project Management: Release Notes
Software Project Management: Release Notes
 
Software Project Management: Configuration Management
Software Project Management: Configuration ManagementSoftware Project Management: Configuration Management
Software Project Management: Configuration Management
 
Software Project Management: Risk Management
Software Project Management: Risk ManagementSoftware Project Management: Risk Management
Software Project Management: Risk Management
 
Software Project Management: Software Architecture
Software Project Management: Software ArchitectureSoftware Project Management: Software Architecture
Software Project Management: Software Architecture
 
Software Project Management: Software Requirement Specification
Software Project Management: Software Requirement SpecificationSoftware Project Management: Software Requirement Specification
Software Project Management: Software Requirement Specification
 
Software Project Management: Project Planning
Software Project Management: Project PlanningSoftware Project Management: Project Planning
Software Project Management: Project Planning
 
Software Project Management: Business Case
Software Project Management: Business CaseSoftware Project Management: Business Case
Software Project Management: Business Case
 
Software Project Management: Project Initiation
Software Project Management: Project InitiationSoftware Project Management: Project Initiation
Software Project Management: Project Initiation
 
Software Project Management: Project Charter
Software Project Management: Project CharterSoftware Project Management: Project Charter
Software Project Management: Project Charter
 
Software Project Management Presentation Final
Software Project Management Presentation FinalSoftware Project Management Presentation Final
Software Project Management Presentation Final
 

Recently uploaded

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 

Recently uploaded (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 

IT Software Testing Methods

  • 1. INSTITUTE OF INFORMATION TECHNOLOGY UNIVERSITY OF DHAKA Software Testing Submitted by Minhas Kamal Roll- BSSE0509 Submitted to Alim-ul-Giash Lecturer Institute of Information Technology, University of Dhaka Data: 10-Nov-15
  • 2. Method -1: findQueen 1 private int findQueen(int row){ 2 intqueenColumnNo= 3 for(int j=0; j<boardSize; j++){ 4 if(boxes[row][j]==1){ 5 queenColumnNo=j; 6 break; 7 } 8 } 9 return queenColumnNo; 10 } Flow Diagram: Cyclomatic Complexity: 1. V(G) = e - n + 2p = 7 – 6 + 2 = 3 2. V(G) = d + 1 = (1+1) + 1 = 3 3. V(G) = number of regions = 3 findQueen(int row){ intqueenColumnNo=-1; for(int j=0; j<boardSize; j++){ if(boxes[row][j]==1){ queenColumnNo=j; break; return queenColumnNo; 6 + 2 = 3 V(G) = d + 1 = (1+1) + 1 = 3 V(G) = number of regions = 3 1
  • 3. 2 Independent Paths: 1. 1, 2, 3, 4, 5, 6, 9, 10 2. 1, 2, 3, 9, 10 3. 1, 2, 3, 4, 8, 3, 9, 10 Test Case: Test Case ID Input Expected Output Independent Path Covered by Test Case TC-1 row = 0 boardSize = 2 boxes = {{1,0},{0,0}} queenColumnNo = 0 1 TC-2 row = 0 boardSize = -1 boxes = {{ }} queenColumnNo = -1 2 TC-3 row = 0 boardSize = 1 boxes = {{0}} queenColumnNo = -1 3
  • 4. Data Flow Graph for ‘queenColumnNo Data Flow Graph for ‘row’: queenColumnNo’: 3
  • 5. 4 All du-paths: queenColumnNo row 2-3-9 1-2-3-4-8-3-4 2-3-4-8-3-9 1-2-3-4 2-3-4-5-6-9 2-3-4-8-3-4-5-6-9 5-6-9
  • 6. Method -2: setQueen 1 public void setQueen(int row, int column) { 2 for(int i=0; i<boardSize; i++){ 3 boxes[row][i] = 0; 4 } 5 6 geneticSequence[row] = column; 7 boxes[row][column] = 1; 8 } Flow Diagram: Cyclomatic Complexity: 1. V(G) = e - n + 2p = 4 – 4 2. V(G) = d + 1 = 1 + 1 = 2 3. V(G) = number of regions = Independent Paths: 1. 1, 2, 3, 4, 2, 5, 6, 7, 8 2. 1, 2, 5, 6, 7, 8 (unfeasible path) public void setQueen(int row, int column) { for(int i=0; i<boardSize; i++){ boxes[row][i] = 0; geneticSequence[row] = column; boxes[row][column] = 1; 4 + 2 = 2 V(G) = number of regions = 2 (unfeasible path) 5
  • 7. Test Case: Test Case ID Input TC-1 row = 0 column = 0 boardSize = 1 Data Flow Graph for ‘row’: Expected Output Independent Path Covered by Test Case boxes = {{1}} queenColumnNo = {0} 1 6 Independent Path Covered by Test Case
  • 8. Data Flow Graph for ‘column’ All du-paths: row 1-2-5-6-7 1-2-3-4-2-5-6-7 1-2-3 1-2-3-2-3 column’: column 1-2-5-6-7 1-2-3-4-2-5-6-7 7
  • 9. Method -3: toString 1 public String toString(){ 2 String string = ""; 3 4 for(int i=0; i<boardSize; i++){ 5 for(int j=0; j<boardSize; j++){ 6 string += boxes[i][j] + " "; 7 } 8 string += " 9 } 10 11 return string; 12 } Flow Diagram: Cyclomatic Complexity: 1. V(G) = e - n + 2p = 7 – 6 + 2 = 3 2. V(G) = d + 1 = (1+1) + 1 = 3 3. V(G) = number of regions = 3 public String toString(){ String string = ""; for(int i=0; i<boardSize; i++){ for(int j=0; j<boardSize; j++){ string += boxes[i][j] + " "; string += "n"; 6 + 2 = 3 V(G) = d + 1 = (1+1) + 1 = 3 (G) = number of regions = 3 8
  • 10. 9 Independent Paths: 1. 1, 2, 3, 4, 5, 6, 7, 5, 8, 9, 4, 10, 11, 12 2. 1, 2, 3, 4, 10, 11, 12 3. 1, 2, 3, 4, 5, 8, 9, 4, 10, 11, 12 (unfeasible path) Test Case: Test Case ID Input Expected Output Independent Path Covered by Test Case TC-1 boardSize = 1 boxes = {{0}} string = “0 n” 1 TC-2 boardSize = -1 boxes = {{ }} string = “” 2
  • 11. Data Flow Graph for ‘string’: All du-paths: string 2- 2- 2- 2- 6- 6- 6- 8- 8- 8- string -3-4-10-11 -3-4-5-6 -3-4-5-6-7-5-8 -3-4-5-6-7-5-8-4-10-11 -5-8 -5-8-4-10-11 -5-6 -4-10-11 -4-5-6 -4-5-8 10
  • 12. Method -4: occurMutation 1 public void occurMutation( 2 Random random = new Random(); 3 4 if(randomValue 5 int rowNo = Math.abs(random.nextInt()%boardSize); 6 int columnNo = Math.abs(random.nextInt()%boardSize); 7 8 setQueen(rowNo, columnNo); 9 } 10 } Flow Diagram: Cyclomatic Complexity: 1. V(G) = e - n + 2p = 4 – 4 2. V(G) = d + 1 = 1 + 1 = 2 3. V(G) = number of regions = 2 Independent Paths: 1. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 2. 1, 2, 3, 4, 10 public void occurMutation(int randomValue){ Random random = new Random(); %10==0){ rowNo = Math.abs(random.nextInt()%boardSize); columnNo = Math.abs(random.nextInt()%boardSize); setQueen(rowNo, columnNo); 4 + 2 = 2 number of regions = 2 10 11 rowNo = Math.abs(random.nextInt()%boardSize); columnNo = Math.abs(random.nextInt()%boardSize);
  • 13. Test Case: Test Case ID Input TC-1 random = 100 TC-2 random = 97 Data Flow Graph for ‘random Data Flow Graph for ‘random Expected Output Independent Path Covered by Test Case “setQueen()” method is called & queen is randomly placed 1 Do nothing 2 randomValue’: random’: 12 Independent Path Covered by Test Case
  • 14. Data Flow Graph for ‘rowNo’: Data Flow Graph for ‘columnNo All du-paths: randomValue random 1-2-3-4 2-3-4-5 2-3-4-5 ’: columnNo’: random rowNo columnNo 5-6 5-6-7-8 6-7 5 13 columnNo 7-8
  • 15. Method -5: getCopy 1 public Board getCopy(){ 2 Board newBoard = new Board(boardSize); 3 4 for(int i=0; i<boardSize; i++){ 5 for(int j=0; j<boardSize; j++){ 6 newBoard.boxes[i][j] = this.boxes[i][j]; 7 } 8 newBoard.geneticSequence[i] = this.geneticSequence[i]; 9 } 10 11 return newBoard; 12 } Flow Diagram: public Board getCopy(){ Board newBoard = new Board(boardSize); for(int i=0; i<boardSize; i++){ for(int j=0; j<boardSize; j++){ newBoard.boxes[i][j] = this.boxes[i][j]; newBoard.geneticSequence[i] = this.geneticSequence[i]; return newBoard; 14 newBoard.boxes[i][j] = this.boxes[i][j]; newBoard.geneticSequence[i] = this.geneticSequence[i];
  • 16. 15 Cyclomatic Complexity: 1. V(G) = e - n + 2p = 7 – 6 + 2 = 3 2. V(G) = d + 1 = (1+1) + 1 = 3 3. V(G) = number of regions = 3 Independent Paths: 1. 1, 2, 3, 4, 5, 6, 7, 5, 8, 9, 4, 10, 11, 12 2. 1, 2, 3, 4, 10, 11, 12 3. 1, 2, 3, 4, 5, 8, 9, 4, 10, 11, 12 (unfeasible path) Test Case: Test Case ID Input Expected Output Independent Path Covered by Test Case TC-1 boardSize = 1 boxes = {{1}} newBoard = {{1}} 1 TC-2 boardSize = -1 boxes = {{ }} newBoard = {{ }} 2
  • 17. Data Flow Graph for ‘newBoard All du-paths: newBoard 2-3-4-10-11 2-3-4-5-8-4-10 2-3-4-5-6-7-5 6-7-5-8-9-4-10 8-9-4-10-11 newBoard’: 10-11 5-8-4-10-11 10-11 16