All pairs Testing and the advantages of software testing

Tram Ho

This article is hopefully useful for testers who are looking for a way to perform a test that combines all pairs, to reduce the number of test cases, save time and cover all the cases that need to be tested. to try on.

Is testing as many test cases as possible? The key is to include all possible states and variables, making sure to find all errors. In fact, there is not enough time or effort to test every combination of all variables.

So how to confirm that the product is ready for release in time and cost reasonable? One solution is to use an effective testing method, supported by appropriate tools.

1. What are All pairs Testing?

All pair testing, also known as pairwise testing, is a test method that is performed to test software using a combination method. It is a method to test all possible discrete combinations of relevant parameters, the method of testing at least so that the best quality.

Actual observations show that most errors are due to a combination of 2 factors / parameters => Testing all test generator pairs containing all pairs of values ​​to be tested of variables. Significantly reduce the number of test cases and still be effective in detecting errors (50-90%).

Suppose there is a function of the software being tested: There are 10 input fields and 10 values ​​for each input field ==> there are 10 ^ 10 inputs that can be tested. In this case, comprehensive testing is not possible.

For example:

A simple list box application with 10 elements (0,1,2,3,4,5,6,7,8,9) along with a checkbox, radio Button, Text Box and OK Button. The binding for the Text box is that it can accept values ​​from only 1 to 100. Here are the values ​​that each of the interface objects can do:

  • List Box – 0,1,2,3,4,5,6,7,8,9
  • Check Box – Checked or Unchecked
  • Radio Button – ON or OFF
  • Text Box – Any value from 1 to 100

The full combination of applications is calculated as follows:

  • List Box = 10 values
  • Check Box = 2 values
  • Radio Button = 2 values
  • Text Box = 100 values

==> The total number of test cases using the Cartesian method, that is, when we fully test all cases is 10 x 2 x 2 x 100 = 4000 testcase.

==> Total testcase including possible negative cases> 4000

As such, it will take a lot of time to fully test.

The idea to reduce the number of test cases is to try to find the number of cases using common software testing techniques.

We consider the values

  • List box: divided into 2 areas to test 0 and other values ​​(others) (1,2,3,4,5,6,7,8,9).
  • Check box: keep 2 values ​​as Checked or Unchecked
  • Radio Button: keep the 2 values ​​as ON or OFF
  • Text Box: Any value from 1 to 100 can be divided into three inputs (Valid Integer is between 1 and 100, Invalid Integer is outside of about 1 to 100 and special characters are not integer).

==> The number of test cases using software testing techniques has decreased to 2 x 2 x 2 x 3 = 24

Technical application of All pairs testing …

The number of test cases = (number of values ​​max – 1) (number of variables max – 1) ==> The number of test cases in this example is: 2×3 = 6

Step 1. Sort the variable with the most valuable regions first and the variable with the lowest number of values ​​left at last.

Step 2. Fill in the corresponding values ​​in the table with the columns. Starting from the List box (2nd column), you can get 2 values: 0 and others.

Text BoxList BoxCheck boxRadio Button

Step 3. Continue to fill in the value area for the Check box column: get 2 values, check and uncheck.

Take care to make sure that all instances of the List box and the Check box are covered.

Text BoxList BoxCheck boxRadio Button

Step 4. Continue to enter values ​​for Radio Button column: there are 2 values: ON or OFF.

Text BoxList BoxCheck boxRadio Button

Step 5. Verify to ensure all value pairs are covered as shown in the table below.

Text BoxList BoxCheck boxRadio Button
Valid Int0checkON
Valid IntothersuncheckOFF
InValid Int0uncheckOFF
InValid IntotherscheckON

Compare results

Complete combined results in> 4000 test cases. Common technical results software testing 24 test cases. Technical results Pair Wise Software testing in only 6 test cases.

1.1. Perform all test pairs

If testing all possible combinations of values ​​is not needed, then how to build a way to test all pairs.

There are several applications that allow you to enter variables and create tests. However, it is helpful to try building test cases manually once or twice to understand exactly how all test pairs work.

1.2. Comment on a composite table using the All-Pairs method

  • PICT (Pairwise Independent Combinatorial Testing Tool) is an easy to use and functional software of Microsoft company.
  • This is free software used to create combination test cases easily.
  • Use pairwise as needed
    • Lots of variables / parameters and errors occurring will be serious.
    • Significant reduction in the number of test cases.

2. Pair Testing

  • If you are a software tester, you may find yourself in one of the following situations:
  • You are working hard to find bugs in a large system and cannot test everything within the deadline. You have found some good bugs and think that there are many bugs there, but by the deadline and the software is released. A week later, a major customer found a serious problem with the new release. At that point, you start thinking about what happened and how you can improve your test method.
  • Once you get a job interview, you get asked how to test a product, especially when there is so much to do in too little time.
  • Leader sets unrealistic expectations for you to “test everything” with 100% coverage, including testing all possible inputs, from all fields, screens, from all The access path to the system, all possible outputs. You know these are ridiculous requirements, and you start thinking about alternative testing methods.
  • Pair testing is the process of testing by two testers at the same time and place, constantly exchanging ideas.
  • When combined, two testers use the same computer or the same test equipment. During a session, for ideas or ways to test, pay attention and take notes, listen, ask questions, get different references, …
  • The pair of testers should solve a single test job, have the same common goal, work together … A checklist, test case or set of test ideas will be a good starting point.
  • Pair testers should exchange more when they test to get a share, an understanding of what they are doing, and more importantly, why they are doing it.

2.1. Advantages of Pair testing when working

  • High creativity
    • Work in pairs to exchange ideas, debate, increase efficiency, focus better and discover more ideas.
    • Applying both information and perspectives on the same issue is certainly easier than one who works alone and is a victim of tunnel vision.
    • Pair to interact, create close relationships, get to know each other and practice communication and problem-solving skills.
  • High productivity
    • Each person must focus on the work and improve the spirit of the partner.
    • Pairing motivates them to think without stopping to take notes or find reference information, increasing their understanding.
  • Technical Training
    • A strong pairing is complementary to each other, overcoming each other’s weaknesses. This is an opportunity for everyone to learn from each other.
    • Matching helps newcomers learn, accumulate better, is also useful for experienced testers, answering questions for newcomers is also a motivation for them to learn, learn more knowledge.

3. Conclusion

  • Testing all pairs ensures proper testing without testing every possible combination.
  • Testing all pairs could reduce> = 75% of the number of test cases. Along with saving time, testers can spend more time developing complex test cases.
  • Help improve the ability to manage effort for testing. More time will be spent focusing on actual testing and more peace of mind on software quality when solving the question “whether testing has enough cases?”

The article is referenced and translated from: http: //www.slideshare .net / ushakannappan / all-pairs-testing-technique

Share the news now

Source : Viblo