Middle
If we have 10 fields and 100 test cases, how many cases will remain in pairwise testing?
sobes.tech AI
Answer from AI
For 10 fields with an unlimited set of values, the number of test cases in pairwise testing will depend on the specific tool and algorithm used to generate pairs.
In general, the number of test cases in pairwise testing for 10 fields will be significantly less than 100. The exact number will vary, but a typical range for such a configuration might be from 40 to 80 cases.
Example of using a tool to generate pairs (for example, using combinatorial testing):
# Example pseudocode to understand the principle
# Assume each field has 2 possible values (for simplicity)
fields = {
'Field1': ['ValueA', 'ValueB'],
'Field2': ['ValueC', 'ValueD'],
# ... 9 other fields with similar values
'Field10': ['ValueY', 'ValueZ']
}
# Using a library or algorithm to generate all unique pairs
# Example libraries: actool, pydictrunner, etc.
# generated_test_cases = pairwise_generation(fields)
# len(generated_test_cases) would show the number of test cases
# This number would be significantly less than brute force (2^10 = 1024)
In pairwise testing, we aim to test every possible combination of values of two fields simultaneously, covering most defects related to interactions between fields.