SlideShare a Scribd company logo
1 of 23
PAIRWISE TESTING
    Sagar V. Hadawale

       14 July, 2011
Agenda

   Introduction to Pairwise Testing

   Methods / Approaches / Algorithms

   Comparison

   Tools
Introduction to Pairwise Testing
   Pairwise testing is a combinatorial technique used to reduce the number
    of test case inputs to a system in situations where exhaustive testing with
    all possible inputs is not possible or prohibitively expensive.
   also known as 2-way testing, All-Pairs testing.
   most basic combinatorial method.
   for each pair of input parameters of a system, every combination of valid
    values of these two parameters be covered by at least one test case.

   Exhaustive Testing Example:
       a manufacturing automation system that has 20 controls, each with 10
        possible settings—a total of 1020 combinations, which is far more than a
        software tester would be able to test in a lifetime.
       Surprisingly, we can check all pairs of these values with only 180 tests if they
        are carefully constructed.
Pairwise Testing
   Example:
   3 parameters and 2 values
       OS: Windows, Linux
       CPU: Intel, AMD
       Protocol: IPv4, IPv6
Methods / Approaches / Algorithms

   Orthogonal Latin Squares / Orthogonal Array Testing

   Automatic Efficient Test Generator (AETG)

   In-Parameter-Order (IPO)

   Variant of In-Parameter-order (VIPO)

   Genetic Algorithm (GA)

   Recently Developed Algorithms
Orthogonal Latin Squares
   Latin Squares:
       Properties:
           no. of rows and columns must be equal
           each entry appears exactly once in each row and column
   A single n x n Latin square can handle three parameters, each of which
    have n possible values.
   To handle more than three parameters, we need a set of orthogonal
    Latin squares.
   If there are k system parameters, then k – 2 orthogonal Latin squares
    are required.
   Orthogonal Latin Squares:
       Suppose we have two matrices [aij] and [bij]. The combined matrix is [cij]
        where the elements are cij= (aij,bij). If cij ≠ crq whenever r ≠ i and q ≠ j, then the
        squares [aij] and [bij] are orthogonal.
Orthogonal Latin Squares
   Example:
       4 parameters, 3 values of each
       2 orthogonal Latin squares
                                                   Configuration       Parameter
            1    2   3          1   2    3
                                                     Number
                                                                   1   2      3    4
            2    3   1          3   1    2
            3    1   2          2   3    1              1          1   1      1    1
                                                        2          1   2      2    2
       Superimposing these two matrices
                                                        3          1   3      3    3
            (1,1)      (2,2)    (3,3)                   4          2   1      2    3
            (2,3)      (3,1)    (1,2)                   5          2   2      3    1
            (3,2)      (1,3)    (2,1)                   6          2   3      1    2

       Matrix entry representation:                    7          3   1      3    2
               (row, column, entry)                    8          3   2      1    3
               eg: highlighted entry: (2,3,1,2)        9          3   3      2    1
Orthogonal Latin Squares

   Limitations:
       For any n, there are at most n - 1 mutually orthogonal n x n Latin squares.
       If p is the smallest prime in the prime factorization of n, and occurs j times in
        that factorization, then there exist at least pj -1 orthogonal Latin squares.


   Problematic case:
       when n = 4t + 2; for some integer t ≥ 1
       specially, t = 1
       one cannot find two 6 x 6 orthogonal Latin squares
Algebraic Strategy
   Special - case Algorithm:
       when N is prime number
       for (int n=0;n<N;n++) // counts the number test case for each variables
         begin
           for(int i=0;i<N;i++) // counts N test case for each n variables
           begin
              for (int j=0;j<N;j++) // fills the parameter values
              begin
                  fill test case with ((n+(i*j))%N);
              end
              display and store the generated test set
           end
        end
Automatic Efficient Test Generator (AETG)
   Motivation:
       First, there are many systems where troublesome faults are caused by the
        interaction of a few test parameters. A test plan should ideally cover those
        interactions.
       Second is that the number of tests required to cover all n-way parameter
        combinations, for fixed n, grows logarithmically in the number of parameters.
   Approach:
       generate a test set for the first two parameters, and then iteratively extend
        the test set to account for each remaining parameter.
   A Heuristic Algorithm:
       The proof of logarithmic growth for the greedy algorithm assumes that at
        each stage it is possible to find a test case that covers the maximum number
        of uncovered pairs. Since there can be many possible test cases, it is not
        always computationally possible to find an optimal test case.
In-Parameter-Order (IPO)

   Strategy:
       problem of generating minimum pairwise test sets is NP-complete
       For a system with two or more input parameters, the IPO strategy generates
        a pairwise test set for the first two parameters, extends the test set to
        generate a pairwise test set for the first three parameters, and continues to
        do so for each additional parameter.
       The extension of a test set for the addition of a new parameter includes the
        following two steps:
           (a) horizontal growth, which extends each existing test by adding one value of the
            new parameter, and values are chosen in a greedy manner.
           (b) vertical growth, which adds new tests, if necessary, after the completion of
            horizontal growth.
IPO
   Framework:
       Assume that system S has parameters p1,p2,.. and pn and n ≥ 2
           Strategy In-Parameter-Order
           begin
               {for the first two parameters p1 and p2}
               T = {(v1, v2) | v1 and v2 are values of p1 and p2 respectively}
               if n = 2 then stop;
               {for the remaining parameters}
               for parameter pi, i = 3, 4,….., n do
               begin
                       {horizontal growth}
                       for each test (v1, v2, …. , vi-1) in T do
                                    replace it with (v1, v2, … , vi-1, vi),
                                    where vi is a value of pi;
                       {vertical growth}
                       while T does not cover all pairs between pi and each of p1, p2, … , pi -1 do
                                    add a new test for p1, p2, … , pi to T;
               end
           end
IPO
   Example:
       3 parameters, 3 values of each
Variant of In-Parameter-order (VIPO)
   shares the same framework as IPO
   uses different heuristics for the greedy construction of each test case
   Example:
       3 parameters, 3 values of each
Genetic Algorithm (GA)

   generate the configuration sets and based on fitness of each set to
    select a set that can serve as S (set of test configurations)
   2 main parts
       Chromosome structure:
           each chromosome C (a subset of T), consists of a number of configurations, where
            T is the set of all possible test configurations.
           form: {v1, … , vn} having one value for each parameter
       Fitness function:
                    number of distinct pair-wise interaction configurations covered by all
                     of the chromosome’s configurations
               =
                     the total number of possible pair-wise interaction configurations, |Φ2|
Genetic Algorithm (GA)
   Fitness function:
       Example:
          chromosome having two configurations for three parameters: {{1,2,2}, {1,1,2}}
          suppose each of the parameters can take two possible values, namely 1 or 2.
          set of pair-wise interaction configurations covered by the chromosome in hand:
                      N1 = {{1, 2, X}, {1, X, 2}, {X, 2, 2}}
                      N2 = {{1, 1, X}, {1, X, 2}, {X, 1, 2}}
                      Here, Ni is the set of distinct pair-wise interaction elements covered by
                                   configuration i.
          so, overall number of distinct pair-wise configurations covered by the chromosome
                      = 3+3-1=5
          Φ2 = {{1, 1, X}, {1, 2, X}, {2, 1, X}, {2, 2, X}, {1, X, 1}, {1, X, 2}, {2, X, 1}, {2, X, 2},
                      {X, 1, 1}, {X, 1, 2}, {X, 2, 1}, {X, 2, 2}}        and
           | Φ2 | = 12
          Fitness = 5 / 12 = 0.42
Recently Developed Algorithms
   GAPTS (Genetic Algorithm for Pairwise Test Sets)




   Simulated Bee Colony Algorithm
Test Set Size Results Comparison
   The data in Table 1 summarize the characteristics of seven benchmark input
    sets
   Table 2 present the results of the six mentioned algorithms.
Manual
Testing
  Vs
Pairwise
Testing
Tools
           AETG
           IPO
           Tconfig
           CTS
           Jenny
           TestCover
           DDA
           AllPairs
           PICT
           EXACT
           IPO-s
           Hexawise
References
1)     A. W. Williams, R. L. Probert, "A Practical Strategy for Testing Pair-wise Coverage of Network Interfaces",
       Software Reliability Engineering, 1996. Proceedings., Seventh International Symposium on, 1996 , pp. 246 - 254
2)     D. M. Cohen, S. R. Dalal, M. L. Fredman, G. C. Patton, ―The AETG system: An Approach to Testing Based on
       Combinatorial Design‖, IEEE Transaction on Software Engineering, 23 (7), 1997, pp. 437-443.
3)     J. D. McCaffrey, "An Empirical Study of Pairwise Test Set Generation Using a Genetic Algorithm", ITNG, 2010
       Seventh International Conference on, 2010 , pp. 992 - 997
4)     J. D. McCaffrey, "Generation of Pairwise Test Sets using a Genetic Algorithm", Computer Software and
       Applications Conference, 2009. COMPSAC '09. 33rd Annual IEEE International, 2009, pp. 626 - 631
5)     J. D. McCaffrey, "Generation of Pairwise Test Sets using a Simulated Bee Colony Algorithm", Information Reuse &
       Integration, 2009. IRI '09. IEEE International Conference on, 2009, pp. 115 - 119
6)     M. I. Younis, K. Z. Zamli, N. A. M. Isa, "Algebraic strategy to generate pairwise test set for prime number
       parameters and variables" Information Technology, 2008. ITSim 2008. International Symposium on, Volume: 3,
       2008, pp. 1 - 4
7)     R. Kuhn, R. Kacker, Yu Lei, J. Hunter, "Combinatorial Software Testing", Computer, Volume: 42 , Issue: 8, 2009 ,
       pp. 94 - 96
8)     R. Kuhn, R. Kacker, Yu Lei, "Practical Combinatorial Testing- Beyond Pairwise" IT Professional, Volume: 10 ,
       Issue: 3, 2008 , pp. 19 - 23
9)     S.A. Ghazi and M.A. Ahmed, "Pair-wise Test Coverage Using Genetic Algorithms", Proceedings of the 2003
       Congress on Evolutionary Computation, vol. 2, December 2003, pp. 1420-1424.
10)    Yingxia Cui, Longshu Li, Sheng Yao, "A New Strategy for Pairwise Test Case Generation", Intelligent Information
       Technology Application, 2009. IITA 2009. Third International Symposium on Volume: 3, 2009 , pp. 303 - 306
11)     Yu Lei and K.C. Tai, "In-Parameter-Order: A Test Generation Strategy for Pairwise Testing", Proceedings of Third
       IEEE International High-Assurance Systems Engineering Symposium, Nov. 1998, pp. 254-261.
Other Useful Resources

   http://www.pairwise.org/default.html
   http://www.developsense.com/pairwiseTesting.html
   http://www.softwaretestingstuff.com/2007/10/pairwise-testing.html

   Hexawise Testing:
     website: http://hexawise.com/

     videos:
          http://www.youtube.com/watch?v=hlFh718i0VQ
          Hexawise amazon example: 9 parts
            2nd part link: http://www.youtube.com/watch?v=BFjDqAnMcew
Any Questions?

More Related Content

What's hot

2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou
vafopoulos
 
Backstepping Controller Synthesis for Piecewise Polynomial Systems: A Sum of ...
Backstepping Controller Synthesis for Piecewise Polynomial Systems: A Sum of ...Backstepping Controller Synthesis for Piecewise Polynomial Systems: A Sum of ...
Backstepping Controller Synthesis for Piecewise Polynomial Systems: A Sum of ...
Behzad Samadi
 
13 recursion-120712074623-phpapp02
13 recursion-120712074623-phpapp0213 recursion-120712074623-phpapp02
13 recursion-120712074623-phpapp02
Abdul Samee
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
Sajid Marwat
 

What's hot (20)

Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou
 
algorithm unit 1
algorithm unit 1algorithm unit 1
algorithm unit 1
 
DSP System Homework Help
DSP System Homework HelpDSP System Homework Help
DSP System Homework Help
 
Backstepping Controller Synthesis for Piecewise Polynomial Systems: A Sum of ...
Backstepping Controller Synthesis for Piecewise Polynomial Systems: A Sum of ...Backstepping Controller Synthesis for Piecewise Polynomial Systems: A Sum of ...
Backstepping Controller Synthesis for Piecewise Polynomial Systems: A Sum of ...
 
Signals and systems assignment help
Signals and systems assignment helpSignals and systems assignment help
Signals and systems assignment help
 
Time andspacecomplexity
Time andspacecomplexityTime andspacecomplexity
Time andspacecomplexity
 
multi threaded and distributed algorithms
multi threaded and distributed algorithms multi threaded and distributed algorithms
multi threaded and distributed algorithms
 
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
TIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMSTIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMS
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
 
algorithm Unit 5
algorithm Unit 5 algorithm Unit 5
algorithm Unit 5
 
13 recursion-120712074623-phpapp02
13 recursion-120712074623-phpapp0213 recursion-120712074623-phpapp02
13 recursion-120712074623-phpapp02
 
Matlab Assignment Help
Matlab Assignment HelpMatlab Assignment Help
Matlab Assignment Help
 
Recursion
RecursionRecursion
Recursion
 
Recursion | C++ | DSA
Recursion | C++ | DSARecursion | C++ | DSA
Recursion | C++ | DSA
 
Lec22
Lec22Lec22
Lec22
 
Knowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and Reasoning
 
FPGA Implementation of A New Chien Search Block for Reed-Solomon Codes RS (25...
FPGA Implementation of A New Chien Search Block for Reed-Solomon Codes RS (25...FPGA Implementation of A New Chien Search Block for Reed-Solomon Codes RS (25...
FPGA Implementation of A New Chien Search Block for Reed-Solomon Codes RS (25...
 
Unit 3
Unit 3Unit 3
Unit 3
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
 
Algorithms Question bank
Algorithms Question bankAlgorithms Question bank
Algorithms Question bank
 

Viewers also liked

Writing up your results – apa style guidelines
Writing up your results – apa style guidelinesWriting up your results – apa style guidelines
Writing up your results – apa style guidelines
Marialena Kostouli
 
Présentation
PrésentationPrésentation
Présentation
Ysied B
 

Viewers also liked (20)

Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...
Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...
Pairwise Coverage-based Testing with Selected Elements in a Query for Databas...
 
QAI QUEST 2016 Webinar Series: Pairwise Testing w/ Philip Lew
QAI QUEST 2016 Webinar Series: Pairwise Testing w/ Philip LewQAI QUEST 2016 Webinar Series: Pairwise Testing w/ Philip Lew
QAI QUEST 2016 Webinar Series: Pairwise Testing w/ Philip Lew
 
Pairwise testing - Strategic test case design
Pairwise testing - Strategic test case designPairwise testing - Strategic test case design
Pairwise testing - Strategic test case design
 
All Pairs Testing Technique
All Pairs Testing TechniqueAll Pairs Testing Technique
All Pairs Testing Technique
 
Combinatorial software test design beyond pairwise testing
Combinatorial software test design beyond pairwise testingCombinatorial software test design beyond pairwise testing
Combinatorial software test design beyond pairwise testing
 
Writing up your results – apa style guidelines
Writing up your results – apa style guidelinesWriting up your results – apa style guidelines
Writing up your results – apa style guidelines
 
What is a Factorial ANOVA?
What is a Factorial ANOVA?What is a Factorial ANOVA?
What is a Factorial ANOVA?
 
Repeated anova measures ppt
Repeated anova measures pptRepeated anova measures ppt
Repeated anova measures ppt
 
Présentation
PrésentationPrésentation
Présentation
 
A cross-layer approach to energy management in manufacturing
A cross-layer approach to energy management in manufacturingA cross-layer approach to energy management in manufacturing
A cross-layer approach to energy management in manufacturing
 
Time management
Time managementTime management
Time management
 
Statystycznie
StatystycznieStatystycznie
Statystycznie
 
GERMANY
GERMANYGERMANY
GERMANY
 
Target audience aa 1
Target audience aa 1Target audience aa 1
Target audience aa 1
 
гост пк
гост пкгост пк
гост пк
 
Losers, bromance and chicken & beer: a journey into Chinese web culture
Losers, bromance and chicken & beer: a journey into Chinese web cultureLosers, bromance and chicken & beer: a journey into Chinese web culture
Losers, bromance and chicken & beer: a journey into Chinese web culture
 
Monalisa arya
Monalisa aryaMonalisa arya
Monalisa arya
 
Sheet1 simplified
Sheet1 simplifiedSheet1 simplified
Sheet1 simplified
 
Personal Branding for Workplace Leaders
Personal Branding for Workplace LeadersPersonal Branding for Workplace Leaders
Personal Branding for Workplace Leaders
 
Gustavo grammar book
Gustavo grammar bookGustavo grammar book
Gustavo grammar book
 

Similar to Pairwise testing sagar_hadawale

2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria
Paulo Faria
 
Ch24 efficient algorithms
Ch24 efficient algorithmsCh24 efficient algorithms
Ch24 efficient algorithms
rajatmay1992
 

Similar to Pairwise testing sagar_hadawale (20)

PCB_Lect02_Pairwise_allign (1).pdf
PCB_Lect02_Pairwise_allign (1).pdfPCB_Lect02_Pairwise_allign (1).pdf
PCB_Lect02_Pairwise_allign (1).pdf
 
Domain Examination of Chaos Logistics Function As A Key Generator in Cryptogr...
Domain Examination of Chaos Logistics Function As A Key Generator in Cryptogr...Domain Examination of Chaos Logistics Function As A Key Generator in Cryptogr...
Domain Examination of Chaos Logistics Function As A Key Generator in Cryptogr...
 
What is chi square test
What  is  chi square testWhat  is  chi square test
What is chi square test
 
Square transposition: an approach to the transposition process in block cipher
Square transposition: an approach to the transposition process in block cipherSquare transposition: an approach to the transposition process in block cipher
Square transposition: an approach to the transposition process in block cipher
 
Slide2
Slide2Slide2
Slide2
 
Michael Bloodgood - 2017 - Using Global Constraints and Reranking to Improve ...
Michael Bloodgood - 2017 - Using Global Constraints and Reranking to Improve ...Michael Bloodgood - 2017 - Using Global Constraints and Reranking to Improve ...
Michael Bloodgood - 2017 - Using Global Constraints and Reranking to Improve ...
 
A0280106
A0280106A0280106
A0280106
 
Accelerating the ant colony optimization by
Accelerating the ant colony optimization byAccelerating the ant colony optimization by
Accelerating the ant colony optimization by
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Hamlet_Khachatryan_57--61
Hamlet_Khachatryan_57--61Hamlet_Khachatryan_57--61
Hamlet_Khachatryan_57--61
 
Adaptive pi based on direct synthesis nishant
Adaptive pi based on direct synthesis nishantAdaptive pi based on direct synthesis nishant
Adaptive pi based on direct synthesis nishant
 
2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria
 
RNA synthesis
RNA synthesisRNA synthesis
RNA synthesis
 
Discrete structure ch 3 short question's
Discrete structure ch 3 short question'sDiscrete structure ch 3 short question's
Discrete structure ch 3 short question's
 
3 analysis.gtm
3 analysis.gtm3 analysis.gtm
3 analysis.gtm
 
Ch24 efficient algorithms
Ch24 efficient algorithmsCh24 efficient algorithms
Ch24 efficient algorithms
 
20 bayes learning
20 bayes learning20 bayes learning
20 bayes learning
 
object oriented programming java lectures
object oriented programming java lecturesobject oriented programming java lectures
object oriented programming java lectures
 
Genetic operators
Genetic operatorsGenetic operators
Genetic operators
 
Alg1
Alg1Alg1
Alg1
 

Recently uploaded

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Pairwise testing sagar_hadawale

  • 1. PAIRWISE TESTING Sagar V. Hadawale 14 July, 2011
  • 2. Agenda  Introduction to Pairwise Testing  Methods / Approaches / Algorithms  Comparison  Tools
  • 3. Introduction to Pairwise Testing  Pairwise testing is a combinatorial technique used to reduce the number of test case inputs to a system in situations where exhaustive testing with all possible inputs is not possible or prohibitively expensive.  also known as 2-way testing, All-Pairs testing.  most basic combinatorial method.  for each pair of input parameters of a system, every combination of valid values of these two parameters be covered by at least one test case.  Exhaustive Testing Example:  a manufacturing automation system that has 20 controls, each with 10 possible settings—a total of 1020 combinations, which is far more than a software tester would be able to test in a lifetime.  Surprisingly, we can check all pairs of these values with only 180 tests if they are carefully constructed.
  • 4. Pairwise Testing  Example:  3 parameters and 2 values  OS: Windows, Linux  CPU: Intel, AMD  Protocol: IPv4, IPv6
  • 5. Methods / Approaches / Algorithms  Orthogonal Latin Squares / Orthogonal Array Testing  Automatic Efficient Test Generator (AETG)  In-Parameter-Order (IPO)  Variant of In-Parameter-order (VIPO)  Genetic Algorithm (GA)  Recently Developed Algorithms
  • 6. Orthogonal Latin Squares  Latin Squares:  Properties:  no. of rows and columns must be equal  each entry appears exactly once in each row and column  A single n x n Latin square can handle three parameters, each of which have n possible values.  To handle more than three parameters, we need a set of orthogonal Latin squares.  If there are k system parameters, then k – 2 orthogonal Latin squares are required.  Orthogonal Latin Squares:  Suppose we have two matrices [aij] and [bij]. The combined matrix is [cij] where the elements are cij= (aij,bij). If cij ≠ crq whenever r ≠ i and q ≠ j, then the squares [aij] and [bij] are orthogonal.
  • 7. Orthogonal Latin Squares  Example:  4 parameters, 3 values of each  2 orthogonal Latin squares Configuration Parameter 1 2 3 1 2 3 Number 1 2 3 4 2 3 1 3 1 2 3 1 2 2 3 1 1 1 1 1 1 2 1 2 2 2  Superimposing these two matrices 3 1 3 3 3 (1,1) (2,2) (3,3) 4 2 1 2 3 (2,3) (3,1) (1,2) 5 2 2 3 1 (3,2) (1,3) (2,1) 6 2 3 1 2  Matrix entry representation: 7 3 1 3 2  (row, column, entry) 8 3 2 1 3  eg: highlighted entry: (2,3,1,2) 9 3 3 2 1
  • 8. Orthogonal Latin Squares  Limitations:  For any n, there are at most n - 1 mutually orthogonal n x n Latin squares.  If p is the smallest prime in the prime factorization of n, and occurs j times in that factorization, then there exist at least pj -1 orthogonal Latin squares.  Problematic case:  when n = 4t + 2; for some integer t ≥ 1  specially, t = 1  one cannot find two 6 x 6 orthogonal Latin squares
  • 9. Algebraic Strategy  Special - case Algorithm:  when N is prime number  for (int n=0;n<N;n++) // counts the number test case for each variables begin for(int i=0;i<N;i++) // counts N test case for each n variables begin for (int j=0;j<N;j++) // fills the parameter values begin fill test case with ((n+(i*j))%N); end display and store the generated test set end end
  • 10. Automatic Efficient Test Generator (AETG)  Motivation:  First, there are many systems where troublesome faults are caused by the interaction of a few test parameters. A test plan should ideally cover those interactions.  Second is that the number of tests required to cover all n-way parameter combinations, for fixed n, grows logarithmically in the number of parameters.  Approach:  generate a test set for the first two parameters, and then iteratively extend the test set to account for each remaining parameter.  A Heuristic Algorithm:  The proof of logarithmic growth for the greedy algorithm assumes that at each stage it is possible to find a test case that covers the maximum number of uncovered pairs. Since there can be many possible test cases, it is not always computationally possible to find an optimal test case.
  • 11. In-Parameter-Order (IPO)  Strategy:  problem of generating minimum pairwise test sets is NP-complete  For a system with two or more input parameters, the IPO strategy generates a pairwise test set for the first two parameters, extends the test set to generate a pairwise test set for the first three parameters, and continues to do so for each additional parameter.  The extension of a test set for the addition of a new parameter includes the following two steps:  (a) horizontal growth, which extends each existing test by adding one value of the new parameter, and values are chosen in a greedy manner.  (b) vertical growth, which adds new tests, if necessary, after the completion of horizontal growth.
  • 12. IPO  Framework:  Assume that system S has parameters p1,p2,.. and pn and n ≥ 2 Strategy In-Parameter-Order begin {for the first two parameters p1 and p2} T = {(v1, v2) | v1 and v2 are values of p1 and p2 respectively} if n = 2 then stop; {for the remaining parameters} for parameter pi, i = 3, 4,….., n do begin {horizontal growth} for each test (v1, v2, …. , vi-1) in T do replace it with (v1, v2, … , vi-1, vi), where vi is a value of pi; {vertical growth} while T does not cover all pairs between pi and each of p1, p2, … , pi -1 do add a new test for p1, p2, … , pi to T; end end
  • 13. IPO  Example:  3 parameters, 3 values of each
  • 14. Variant of In-Parameter-order (VIPO)  shares the same framework as IPO  uses different heuristics for the greedy construction of each test case  Example:  3 parameters, 3 values of each
  • 15. Genetic Algorithm (GA)  generate the configuration sets and based on fitness of each set to select a set that can serve as S (set of test configurations)  2 main parts  Chromosome structure:  each chromosome C (a subset of T), consists of a number of configurations, where T is the set of all possible test configurations.  form: {v1, … , vn} having one value for each parameter  Fitness function:  number of distinct pair-wise interaction configurations covered by all of the chromosome’s configurations = the total number of possible pair-wise interaction configurations, |Φ2|
  • 16. Genetic Algorithm (GA)  Fitness function:  Example:  chromosome having two configurations for three parameters: {{1,2,2}, {1,1,2}}  suppose each of the parameters can take two possible values, namely 1 or 2.  set of pair-wise interaction configurations covered by the chromosome in hand: N1 = {{1, 2, X}, {1, X, 2}, {X, 2, 2}} N2 = {{1, 1, X}, {1, X, 2}, {X, 1, 2}} Here, Ni is the set of distinct pair-wise interaction elements covered by configuration i.  so, overall number of distinct pair-wise configurations covered by the chromosome = 3+3-1=5  Φ2 = {{1, 1, X}, {1, 2, X}, {2, 1, X}, {2, 2, X}, {1, X, 1}, {1, X, 2}, {2, X, 1}, {2, X, 2}, {X, 1, 1}, {X, 1, 2}, {X, 2, 1}, {X, 2, 2}} and | Φ2 | = 12  Fitness = 5 / 12 = 0.42
  • 17. Recently Developed Algorithms  GAPTS (Genetic Algorithm for Pairwise Test Sets)  Simulated Bee Colony Algorithm
  • 18. Test Set Size Results Comparison  The data in Table 1 summarize the characteristics of seven benchmark input sets  Table 2 present the results of the six mentioned algorithms.
  • 20. Tools  AETG  IPO  Tconfig  CTS  Jenny  TestCover  DDA  AllPairs  PICT  EXACT  IPO-s  Hexawise
  • 21. References 1) A. W. Williams, R. L. Probert, "A Practical Strategy for Testing Pair-wise Coverage of Network Interfaces", Software Reliability Engineering, 1996. Proceedings., Seventh International Symposium on, 1996 , pp. 246 - 254 2) D. M. Cohen, S. R. Dalal, M. L. Fredman, G. C. Patton, ―The AETG system: An Approach to Testing Based on Combinatorial Design‖, IEEE Transaction on Software Engineering, 23 (7), 1997, pp. 437-443. 3) J. D. McCaffrey, "An Empirical Study of Pairwise Test Set Generation Using a Genetic Algorithm", ITNG, 2010 Seventh International Conference on, 2010 , pp. 992 - 997 4) J. D. McCaffrey, "Generation of Pairwise Test Sets using a Genetic Algorithm", Computer Software and Applications Conference, 2009. COMPSAC '09. 33rd Annual IEEE International, 2009, pp. 626 - 631 5) J. D. McCaffrey, "Generation of Pairwise Test Sets using a Simulated Bee Colony Algorithm", Information Reuse & Integration, 2009. IRI '09. IEEE International Conference on, 2009, pp. 115 - 119 6) M. I. Younis, K. Z. Zamli, N. A. M. Isa, "Algebraic strategy to generate pairwise test set for prime number parameters and variables" Information Technology, 2008. ITSim 2008. International Symposium on, Volume: 3, 2008, pp. 1 - 4 7) R. Kuhn, R. Kacker, Yu Lei, J. Hunter, "Combinatorial Software Testing", Computer, Volume: 42 , Issue: 8, 2009 , pp. 94 - 96 8) R. Kuhn, R. Kacker, Yu Lei, "Practical Combinatorial Testing- Beyond Pairwise" IT Professional, Volume: 10 , Issue: 3, 2008 , pp. 19 - 23 9) S.A. Ghazi and M.A. Ahmed, "Pair-wise Test Coverage Using Genetic Algorithms", Proceedings of the 2003 Congress on Evolutionary Computation, vol. 2, December 2003, pp. 1420-1424. 10) Yingxia Cui, Longshu Li, Sheng Yao, "A New Strategy for Pairwise Test Case Generation", Intelligent Information Technology Application, 2009. IITA 2009. Third International Symposium on Volume: 3, 2009 , pp. 303 - 306 11) Yu Lei and K.C. Tai, "In-Parameter-Order: A Test Generation Strategy for Pairwise Testing", Proceedings of Third IEEE International High-Assurance Systems Engineering Symposium, Nov. 1998, pp. 254-261.
  • 22. Other Useful Resources  http://www.pairwise.org/default.html  http://www.developsense.com/pairwiseTesting.html  http://www.softwaretestingstuff.com/2007/10/pairwise-testing.html  Hexawise Testing:  website: http://hexawise.com/  videos:  http://www.youtube.com/watch?v=hlFh718i0VQ  Hexawise amazon example: 9 parts  2nd part link: http://www.youtube.com/watch?v=BFjDqAnMcew