SlideShare une entreprise Scribd logo
1  sur  27
SOFTWARE TESTING METHODOLGY
WITH THE CONTROL FLOW ANALYSIS
      WEN-CHANG PAI, CHI-MING
   CHUNG, CHING-TANG HSIEH, CHUN-
  CHIA WANG, AND YING-HONG WANG
PRESENTED BY:
REEMA QAISER KHAN
     MS(SE)-2
• This paper provides a method for analyzing the control-flow
  of a program.
• The authors define a number of command types and test
  data generating rules based on the control-flow of the
  program.
• An algorithm to scan program and analysis testing paths is
  provided.
• This will allow testers to recover the program’s
  design, understand the software structure, and assist
  software maintenance.
AN OVERVIEW OF PROGRAM TESTING
• In a program P, we say a statement block B = (s1, s2, …, sn)
   is a maximal subset of contiguous statements of P such that
   statement si is the unique successor of si-1 and si-1 is the
   unique predecessor of si, for all
  i = 1, 2, …, n.
• A program graph G = {nodes, edges} contains a set of nodes
   and edges
• A node without a predecessor is a start node.
• A node without a successor is an exit node.
• A complete path is a path whose initial node is the start
  node of G and whose final node is an exit node of G.
• A well known logic coverage criterion is decision coverage
  or branch coverage. Examples of branch or decision
  statements are IF statements, WHILE statements, and
  SWITCH statement.
• This criterion states that each branch direction must be
  traversed at least once.
• In software testing technologies, boundary testing (or
  boundary value analysis; BVA) is a good test case design. It
  selects test data at the boundary of the input domain.
• Experience shows that test data selected with BVA have a
  higher payoff than other data.
• More errors tend to occur at the boundaries of the input
  domain.
AUTOMATICALLY GENERATING TEST
              DATA
• The steps involved in the method are described in the
   following:
1) Choosing Adequacy Testing Criteria:
  The branch coverage criterion is adopted in this paper to
   generate test data for testing a program.
2) Defining Command Types:
   We define three typical statement types in a program:
   (1) sequential commands, (2)conditional commands, and
   (3) loop commands.
   Each command type essentially corresponding to a block or
   some blocks in a program. In this paper, we will generate
   test data for each of the command types to enter every
   branch of a program.
3) Scanning the Program and Generating Test Data:
  The test data are generated from the input domain, which is
   derived through boundary value analysis with the Branch
   coverage criterion.
4) Analyzing Test Paths and Testing :
  Finally, testers analyze the testing paths and test the
   program with the results obtained in step 3.
TEST DATA GENERATING RULES
• Type 1. Sequential Command Set :

• The Sequential commands, such as
  OPEN, READ, WRITE, and CLOSE statements, are usually
  written in the form
• ‘C1; C2’,
Rule 4.1 :
The set S1, S2, …, Sn is a contiguous sequence of
statements of a program P, such that a corresponding block
B exists in P. A node N also exists in the program graph G.
• Type 2. Conditional Command Set :

• A conditional command, such as an If-Then-End
  statement, If-Then-Else-End statement, Switch-Case-With-
  Default statement, or Switch-Case-Without-Default
  statement, has a number of subcommands, from which
  exactly one is chosen to be executed. Conditional
  commands typically have the form

• If CON1 then B1
  Else if CON2 then B2
  …
  else if CONn then Bn
  end if
Rule 4.2 :
Set S′ is a set of Switch statements of a program P, such
that a number of corresponding blocks B1, B2, …, Bk
exist in S′. A number of nodes S, N1, N2, …, Nk, and E
also exist in the program graph G.
• Type 3. Loop Command Set :
• Loop commands, such as For-loop statements, While-loop
  statements, and Repeat- loop statements, have a number
  of subcommands that are executed repeatedly until some
  conditions are true. Loop commands typically have the
  form

 While CON do
     B
  End while
    OR

   Repeat
     B
  Until CON
Rule 4.3 :
Set S′ is a Loop statement s of a program P, such that a
corresponding block B exists in P. A number of nodes, S, N,
and E, also exist in the program graph G.
TEST PATH ANALYSIS ALGORITHM
• The algorithm analyzes the path to search for the command
  types and the apply rules 4.1 to 4.3 accordingly.
• We can transform each statement of a program to its
  corresponding flow. The paths are analyzed and test data
  are generated after the program has been completely
  scanned.
•   Algorithm PATH_ANALYSIS
•   begin
•   get PROGRAM
•   set START_NODE
•   set NEW_NODE
•   move POINTER to NEW_NODE
•   while not END_OF_PROGRAM
•   read next INSTRUCTION
•   search INSTRUCTION_TABLE
•   switch (INSTRUCTION)
•   case “Switch Statement Set”
•   set NEW_NODE (or NODES) /* according to the rule 4.2 */
•   move POINTER to NEW_NODE /* according to the rule 4.2 */
•   case “Loop Statement Set”
•   set NEW_NODE (or NODES) /* according to the rule 4.3 */
•   move POINTER to NEW_NODE /* according to the rule 4.3 */
•   case “Sequence Statement Set” /* according to the rule 4.1 */
•   skip
•   end {switch}
•   end {while}
•   set END_NODE
•   end {PATH_ANALYSIS}
AN EXAMPLE
TEST CASES USING BOUNDARY VALUE
              ANALYSIS
• We have three loop commands, and one conditional
   command.
• Test Cases for the first Loop Command
  (WHILE LOP=“F”) using boundary value analysis:
1- Test Case with test data of character F, to check input
   domain LOP=“F”.
2- Test Case with test data can be any character except F, to
   check input domain LOP<>“F” e.g. LOP=“A”,LOP=“B”, etc.
• Test Cases for the Second Loop Command
  (WHILE ANS<> “Y” and ANS<> “y”) using boundary value
   analysis:
1- Test Case with test data can be any character except “Y” or
   “y”, to check input domain ANS<> “Y” and ANS<> “y”, e.g.
   ANS=“A” or ANS=“a”, ANS=“B”or ANS=“b”, etc.
2- Test Case with test data “Y” and “y” , to check input domain
   ANS=“Y” or ANS=“y”.
• Test Cases for the Third Loop Command
  (WHILE ANS<> “Y” and ANS<> “y”) using boundary value
   analysis:
1- Test Case with test data can be any character except “Y” or
   “y”, to check input domain ANS<> “Y” and ANS<> “y”, e.g.
   ANS=“A” or ANS=“a”, ANS=“B”or ANS=“b”, etc.
2- Test Case with test data “Y” and “y” , to check input domain
   ANS=“Y” or ANS=“y”.
• Test Cases for the First Conditional Command
  (IF ANS<> “Y” and ANS<> “y”) using boundary value
   analysis:
1- Test Case with test data can be any character except “Y” or
   “y”, to check input domain ANS<> “Y” and ANS<> “y”, e.g.
   ANS=“A” or ANS=“a”, ANS=“B”or ANS=“b”, etc.
2- Test Case with test data “Y” and “y” , to check input domain
   ANS=“Y” or ANS=“y”.
•   From Table 1, we have the following testing paths:
•   <S, 1, 2, 13, E>
•   <S, 1, 2, 3, 4, 5, 4, 6, 7, 8, 7, 9, 10, 11, 12, 2, 13, E>
•   <S, 1, 2, 3, 4, 5, 4, 6, 7, 8, 7, 9, 10, 12, 2, 13, E>
•   <S, 1, 2, 3, 4, 6, 7, 8, 7, 9, 10, 11, 12, 2, 13, E>
•   <S, 1, 2, 3, 4, 6, 7, 8, 7, 9, 10, 12, 2, 13, E>
•   <S, 1, 2, 3, 4, 5, 4, 6, 7, 9, 10, 11, 12, 2, 13, E>
•   <S, 1, 2, 3, 4, 5, 4, 6, 7, 9, 10, 12, 2, 13, E>
•   <S, 1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 2, 13, E>
•   <S, 1, 2, 3, 4, 6, 7, 9, 10, 12, 2, 13, E>
CONCLUSION
• The researchers have defined a number of command
  types flows and given some test data generation rules.
  These have been derived based on a branch coverage
  testing path selection criterion and boundary value
  analysis. We have also provided an algorithm and used
  an example to illustrate the methodology and show
  that it is practicable.
• The proposed methodology allows maintainers to
  recover a program’s structure and conduct software
  maintenance. The method proposed in this paper can
  help testers recognize and test programs more
  efficiently.
REFERENCE
• http://www.iis.sinica.edu.tw/page/jise/2005/
  200511_07.pdf
THANKYOU

Contenu connexe

Similaire à Software testing methodolgy with the control flow analysis

Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)ShudipPal
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)ShudipPal
 
SE UNIT 5 part 2 (1).pptx
SE UNIT 5 part 2 (1).pptxSE UNIT 5 part 2 (1).pptx
SE UNIT 5 part 2 (1).pptxPraneethBhai1
 
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
 
Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01Mr. Jhon
 
Chapter 14 software testing techniques
Chapter 14 software testing techniquesChapter 14 software testing techniques
Chapter 14 software testing techniquesSHREEHARI WADAWADAGI
 
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
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniquesFincy V.J
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing TechniquesKiran Kumar
 
Test case techniques
Test case techniquesTest case techniques
Test case techniquesPina Parmar
 
CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4SIMONTHOMAS S
 
Test Case Design
Test Case DesignTest Case Design
Test Case DesignVidya-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueFayis-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueANKUR-BA
 
Test Case Design & Technique
Test Case Design & TechniqueTest Case Design & Technique
Test Case Design & TechniqueRajesh-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueSachin-QA
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfFarjanaParvin5
 
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...HostedbyConfluent
 
Path testing, data flow testing
Path testing, data flow testingPath testing, data flow testing
Path testing, data flow testingpriyasoundar
 

Similaire à Software testing methodolgy with the control flow analysis (20)

Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
 
SE UNIT 5 part 2 (1).pptx
SE UNIT 5 part 2 (1).pptxSE UNIT 5 part 2 (1).pptx
SE UNIT 5 part 2 (1).pptx
 
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
 
Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01
 
Chapter 14 software testing techniques
Chapter 14 software testing techniquesChapter 14 software testing techniques
Chapter 14 software testing techniques
 
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
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
 
Test Techniques
Test TechniquesTest Techniques
Test Techniques
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
 
Test case techniques
Test case techniquesTest case techniques
Test case techniques
 
CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4
 
Test Case Design
Test Case DesignTest Case Design
Test Case Design
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
Test Case Design & Technique
Test Case Design & TechniqueTest Case Design & Technique
Test Case Design & Technique
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdf
 
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
 
Path testing, data flow testing
Path testing, data flow testingPath testing, data flow testing
Path testing, data flow testing
 

Plus de RQK Khan

The latest interface designs
The latest interface designsThe latest interface designs
The latest interface designsRQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 12 Website links-for-gat-questions
GAT NTS SAMPLE PAPERS MATERIAL PART 12 Website links-for-gat-questionsGAT NTS SAMPLE PAPERS MATERIAL PART 12 Website links-for-gat-questions
GAT NTS SAMPLE PAPERS MATERIAL PART 12 Website links-for-gat-questionsRQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 11
GAT NTS SAMPLE PAPERS MATERIAL PART 11GAT NTS SAMPLE PAPERS MATERIAL PART 11
GAT NTS SAMPLE PAPERS MATERIAL PART 11RQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 10
GAT NTS SAMPLE PAPERS MATERIAL PART 10GAT NTS SAMPLE PAPERS MATERIAL PART 10
GAT NTS SAMPLE PAPERS MATERIAL PART 10RQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 9
GAT NTS SAMPLE PAPERS MATERIAL PART 9GAT NTS SAMPLE PAPERS MATERIAL PART 9
GAT NTS SAMPLE PAPERS MATERIAL PART 9RQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 8
GAT NTS SAMPLE PAPERS MATERIAL PART 8GAT NTS SAMPLE PAPERS MATERIAL PART 8
GAT NTS SAMPLE PAPERS MATERIAL PART 8RQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 7
GAT NTS SAMPLE PAPERS MATERIAL PART 7GAT NTS SAMPLE PAPERS MATERIAL PART 7
GAT NTS SAMPLE PAPERS MATERIAL PART 7RQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 6
GAT NTS SAMPLE PAPERS MATERIAL PART 6GAT NTS SAMPLE PAPERS MATERIAL PART 6
GAT NTS SAMPLE PAPERS MATERIAL PART 6RQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 5
GAT NTS SAMPLE PAPERS MATERIAL PART 5GAT NTS SAMPLE PAPERS MATERIAL PART 5
GAT NTS SAMPLE PAPERS MATERIAL PART 5RQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 4
GAT NTS SAMPLE PAPERS MATERIAL PART 4GAT NTS SAMPLE PAPERS MATERIAL PART 4
GAT NTS SAMPLE PAPERS MATERIAL PART 4RQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 3
GAT NTS SAMPLE PAPERS MATERIAL PART 3GAT NTS SAMPLE PAPERS MATERIAL PART 3
GAT NTS SAMPLE PAPERS MATERIAL PART 3RQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 2
GAT NTS SAMPLE PAPERS MATERIAL PART 2 GAT NTS SAMPLE PAPERS MATERIAL PART 2
GAT NTS SAMPLE PAPERS MATERIAL PART 2 RQK Khan
 
GAT NTS SAMPLE PAPERS MATERIAL PART 1
GAT NTS SAMPLE PAPERS MATERIAL PART 1 GAT NTS SAMPLE PAPERS MATERIAL PART 1
GAT NTS SAMPLE PAPERS MATERIAL PART 1 RQK Khan
 
Data mining Tag Clouds
Data mining Tag CloudsData mining Tag Clouds
Data mining Tag CloudsRQK Khan
 
Microkernel architecture
Microkernel architecture Microkernel architecture
Microkernel architecture RQK Khan
 
Monolithic kernel vs. Microkernel
Monolithic kernel vs. MicrokernelMonolithic kernel vs. Microkernel
Monolithic kernel vs. MicrokernelRQK Khan
 

Plus de RQK Khan (16)

The latest interface designs
The latest interface designsThe latest interface designs
The latest interface designs
 
GAT NTS SAMPLE PAPERS MATERIAL PART 12 Website links-for-gat-questions
GAT NTS SAMPLE PAPERS MATERIAL PART 12 Website links-for-gat-questionsGAT NTS SAMPLE PAPERS MATERIAL PART 12 Website links-for-gat-questions
GAT NTS SAMPLE PAPERS MATERIAL PART 12 Website links-for-gat-questions
 
GAT NTS SAMPLE PAPERS MATERIAL PART 11
GAT NTS SAMPLE PAPERS MATERIAL PART 11GAT NTS SAMPLE PAPERS MATERIAL PART 11
GAT NTS SAMPLE PAPERS MATERIAL PART 11
 
GAT NTS SAMPLE PAPERS MATERIAL PART 10
GAT NTS SAMPLE PAPERS MATERIAL PART 10GAT NTS SAMPLE PAPERS MATERIAL PART 10
GAT NTS SAMPLE PAPERS MATERIAL PART 10
 
GAT NTS SAMPLE PAPERS MATERIAL PART 9
GAT NTS SAMPLE PAPERS MATERIAL PART 9GAT NTS SAMPLE PAPERS MATERIAL PART 9
GAT NTS SAMPLE PAPERS MATERIAL PART 9
 
GAT NTS SAMPLE PAPERS MATERIAL PART 8
GAT NTS SAMPLE PAPERS MATERIAL PART 8GAT NTS SAMPLE PAPERS MATERIAL PART 8
GAT NTS SAMPLE PAPERS MATERIAL PART 8
 
GAT NTS SAMPLE PAPERS MATERIAL PART 7
GAT NTS SAMPLE PAPERS MATERIAL PART 7GAT NTS SAMPLE PAPERS MATERIAL PART 7
GAT NTS SAMPLE PAPERS MATERIAL PART 7
 
GAT NTS SAMPLE PAPERS MATERIAL PART 6
GAT NTS SAMPLE PAPERS MATERIAL PART 6GAT NTS SAMPLE PAPERS MATERIAL PART 6
GAT NTS SAMPLE PAPERS MATERIAL PART 6
 
GAT NTS SAMPLE PAPERS MATERIAL PART 5
GAT NTS SAMPLE PAPERS MATERIAL PART 5GAT NTS SAMPLE PAPERS MATERIAL PART 5
GAT NTS SAMPLE PAPERS MATERIAL PART 5
 
GAT NTS SAMPLE PAPERS MATERIAL PART 4
GAT NTS SAMPLE PAPERS MATERIAL PART 4GAT NTS SAMPLE PAPERS MATERIAL PART 4
GAT NTS SAMPLE PAPERS MATERIAL PART 4
 
GAT NTS SAMPLE PAPERS MATERIAL PART 3
GAT NTS SAMPLE PAPERS MATERIAL PART 3GAT NTS SAMPLE PAPERS MATERIAL PART 3
GAT NTS SAMPLE PAPERS MATERIAL PART 3
 
GAT NTS SAMPLE PAPERS MATERIAL PART 2
GAT NTS SAMPLE PAPERS MATERIAL PART 2 GAT NTS SAMPLE PAPERS MATERIAL PART 2
GAT NTS SAMPLE PAPERS MATERIAL PART 2
 
GAT NTS SAMPLE PAPERS MATERIAL PART 1
GAT NTS SAMPLE PAPERS MATERIAL PART 1 GAT NTS SAMPLE PAPERS MATERIAL PART 1
GAT NTS SAMPLE PAPERS MATERIAL PART 1
 
Data mining Tag Clouds
Data mining Tag CloudsData mining Tag Clouds
Data mining Tag Clouds
 
Microkernel architecture
Microkernel architecture Microkernel architecture
Microkernel architecture
 
Monolithic kernel vs. Microkernel
Monolithic kernel vs. MicrokernelMonolithic kernel vs. Microkernel
Monolithic kernel vs. Microkernel
 

Dernier

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Dernier (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Software testing methodolgy with the control flow analysis

  • 1. SOFTWARE TESTING METHODOLGY WITH THE CONTROL FLOW ANALYSIS WEN-CHANG PAI, CHI-MING CHUNG, CHING-TANG HSIEH, CHUN- CHIA WANG, AND YING-HONG WANG
  • 3. • This paper provides a method for analyzing the control-flow of a program. • The authors define a number of command types and test data generating rules based on the control-flow of the program. • An algorithm to scan program and analysis testing paths is provided. • This will allow testers to recover the program’s design, understand the software structure, and assist software maintenance.
  • 4. AN OVERVIEW OF PROGRAM TESTING • In a program P, we say a statement block B = (s1, s2, …, sn) is a maximal subset of contiguous statements of P such that statement si is the unique successor of si-1 and si-1 is the unique predecessor of si, for all i = 1, 2, …, n. • A program graph G = {nodes, edges} contains a set of nodes and edges
  • 5. • A node without a predecessor is a start node. • A node without a successor is an exit node. • A complete path is a path whose initial node is the start node of G and whose final node is an exit node of G. • A well known logic coverage criterion is decision coverage or branch coverage. Examples of branch or decision statements are IF statements, WHILE statements, and SWITCH statement. • This criterion states that each branch direction must be traversed at least once.
  • 6. • In software testing technologies, boundary testing (or boundary value analysis; BVA) is a good test case design. It selects test data at the boundary of the input domain. • Experience shows that test data selected with BVA have a higher payoff than other data. • More errors tend to occur at the boundaries of the input domain.
  • 7. AUTOMATICALLY GENERATING TEST DATA • The steps involved in the method are described in the following: 1) Choosing Adequacy Testing Criteria: The branch coverage criterion is adopted in this paper to generate test data for testing a program. 2) Defining Command Types: We define three typical statement types in a program: (1) sequential commands, (2)conditional commands, and (3) loop commands. Each command type essentially corresponding to a block or some blocks in a program. In this paper, we will generate test data for each of the command types to enter every branch of a program.
  • 8. 3) Scanning the Program and Generating Test Data: The test data are generated from the input domain, which is derived through boundary value analysis with the Branch coverage criterion. 4) Analyzing Test Paths and Testing : Finally, testers analyze the testing paths and test the program with the results obtained in step 3.
  • 9. TEST DATA GENERATING RULES • Type 1. Sequential Command Set : • The Sequential commands, such as OPEN, READ, WRITE, and CLOSE statements, are usually written in the form • ‘C1; C2’,
  • 10. Rule 4.1 : The set S1, S2, …, Sn is a contiguous sequence of statements of a program P, such that a corresponding block B exists in P. A node N also exists in the program graph G.
  • 11. • Type 2. Conditional Command Set : • A conditional command, such as an If-Then-End statement, If-Then-Else-End statement, Switch-Case-With- Default statement, or Switch-Case-Without-Default statement, has a number of subcommands, from which exactly one is chosen to be executed. Conditional commands typically have the form • If CON1 then B1 Else if CON2 then B2 … else if CONn then Bn end if
  • 12. Rule 4.2 : Set S′ is a set of Switch statements of a program P, such that a number of corresponding blocks B1, B2, …, Bk exist in S′. A number of nodes S, N1, N2, …, Nk, and E also exist in the program graph G.
  • 13. • Type 3. Loop Command Set : • Loop commands, such as For-loop statements, While-loop statements, and Repeat- loop statements, have a number of subcommands that are executed repeatedly until some conditions are true. Loop commands typically have the form While CON do B End while OR Repeat B Until CON
  • 14. Rule 4.3 : Set S′ is a Loop statement s of a program P, such that a corresponding block B exists in P. A number of nodes, S, N, and E, also exist in the program graph G.
  • 15. TEST PATH ANALYSIS ALGORITHM • The algorithm analyzes the path to search for the command types and the apply rules 4.1 to 4.3 accordingly. • We can transform each statement of a program to its corresponding flow. The paths are analyzed and test data are generated after the program has been completely scanned.
  • 16. Algorithm PATH_ANALYSIS • begin • get PROGRAM • set START_NODE • set NEW_NODE • move POINTER to NEW_NODE • while not END_OF_PROGRAM • read next INSTRUCTION • search INSTRUCTION_TABLE • switch (INSTRUCTION) • case “Switch Statement Set” • set NEW_NODE (or NODES) /* according to the rule 4.2 */ • move POINTER to NEW_NODE /* according to the rule 4.2 */ • case “Loop Statement Set” • set NEW_NODE (or NODES) /* according to the rule 4.3 */ • move POINTER to NEW_NODE /* according to the rule 4.3 */ • case “Sequence Statement Set” /* according to the rule 4.1 */ • skip • end {switch} • end {while} • set END_NODE • end {PATH_ANALYSIS}
  • 18. TEST CASES USING BOUNDARY VALUE ANALYSIS • We have three loop commands, and one conditional command. • Test Cases for the first Loop Command (WHILE LOP=“F”) using boundary value analysis: 1- Test Case with test data of character F, to check input domain LOP=“F”. 2- Test Case with test data can be any character except F, to check input domain LOP<>“F” e.g. LOP=“A”,LOP=“B”, etc.
  • 19. • Test Cases for the Second Loop Command (WHILE ANS<> “Y” and ANS<> “y”) using boundary value analysis: 1- Test Case with test data can be any character except “Y” or “y”, to check input domain ANS<> “Y” and ANS<> “y”, e.g. ANS=“A” or ANS=“a”, ANS=“B”or ANS=“b”, etc. 2- Test Case with test data “Y” and “y” , to check input domain ANS=“Y” or ANS=“y”.
  • 20. • Test Cases for the Third Loop Command (WHILE ANS<> “Y” and ANS<> “y”) using boundary value analysis: 1- Test Case with test data can be any character except “Y” or “y”, to check input domain ANS<> “Y” and ANS<> “y”, e.g. ANS=“A” or ANS=“a”, ANS=“B”or ANS=“b”, etc. 2- Test Case with test data “Y” and “y” , to check input domain ANS=“Y” or ANS=“y”.
  • 21. • Test Cases for the First Conditional Command (IF ANS<> “Y” and ANS<> “y”) using boundary value analysis: 1- Test Case with test data can be any character except “Y” or “y”, to check input domain ANS<> “Y” and ANS<> “y”, e.g. ANS=“A” or ANS=“a”, ANS=“B”or ANS=“b”, etc. 2- Test Case with test data “Y” and “y” , to check input domain ANS=“Y” or ANS=“y”.
  • 22.
  • 23.
  • 24. From Table 1, we have the following testing paths: • <S, 1, 2, 13, E> • <S, 1, 2, 3, 4, 5, 4, 6, 7, 8, 7, 9, 10, 11, 12, 2, 13, E> • <S, 1, 2, 3, 4, 5, 4, 6, 7, 8, 7, 9, 10, 12, 2, 13, E> • <S, 1, 2, 3, 4, 6, 7, 8, 7, 9, 10, 11, 12, 2, 13, E> • <S, 1, 2, 3, 4, 6, 7, 8, 7, 9, 10, 12, 2, 13, E> • <S, 1, 2, 3, 4, 5, 4, 6, 7, 9, 10, 11, 12, 2, 13, E> • <S, 1, 2, 3, 4, 5, 4, 6, 7, 9, 10, 12, 2, 13, E> • <S, 1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 2, 13, E> • <S, 1, 2, 3, 4, 6, 7, 9, 10, 12, 2, 13, E>
  • 25. CONCLUSION • The researchers have defined a number of command types flows and given some test data generation rules. These have been derived based on a branch coverage testing path selection criterion and boundary value analysis. We have also provided an algorithm and used an example to illustrate the methodology and show that it is practicable. • The proposed methodology allows maintainers to recover a program’s structure and conduct software maintenance. The method proposed in this paper can help testers recognize and test programs more efficiently.