There are so many types of the code coverage and the multiple condition coverage is also one of them and that is what has been discussed all about in this article.
What is code Coverage?
Code coverage as we all know is a process that aims at the following purposes:
- Creation of the additional test cases for increasing the coverage.
- Looking up for such areas of the software system or application code that have not been exercised by any of the test cases.
- Determination of the quantitative measure of the extent of the code coverage which can be thought of as an indirect measure of the software quality.
- Identification of the redundant test cases which does not affect the code coverage.
The whole process is a time consuming one and thus is helped by an automating tool called the code coverage analyzer.
What is Multiple Condition Coverage?
- Multiple condition coverage is a modification of the condition coverage type of the code coverage.
- As the term “multiple condition coverage” itself suggests that it implements almost all the possible combinations of the conditions in order to check whether those possible combinations do occur in the execution of the test cases or not.
- A large number of the test cases are required for carrying out a full multiple condition coverage of a decision and these are supplied by the truth tables of the logical operators obtained for that particular decision.
- The multiple condition coverage offers an added advantage in the languages such as C, C++, Java and so on which have short circuit operators which is that it helps in implementing a thorough testing.
- It in turn makes the multiple condition coverage in such languages very similar to the condition coverage.
Disadvantage of Multiple Condition Coverage
But, one should not think that the multiple condition coverage is void of any disadvantages.
- It does have one which is that the deciding up on the minimum number of test cases required for the coverage proves to be very difficult job.
- The problem worsens as the complexity of the boolean expressions implemented in the decisions increases.
- Another disadvantage adds to the problem of the test case designer which is that the minimum number of the test cases required for the coverage varies substantially from condition to condition having the similar level of complexity.
Lets take an example:
For example, in a decision, first condition may require 5 test cases while the second one may require 11 test cases and both the conditions are having the same number of operators and operands.
In contrast to the condition coverage that includes the decision coverage also, the multiple condition coverage does not include any decision coverage.
Now what about the languages like Pascal and visual basic that do not have short circuit operators? For such languages the multiple condition coverage is implemented in the form of the path coverage for logical expressions.
One point to be noted here is that the advantages and disadvantages remain the same in the path coverage form also since in the path coverage the number of each additional logical operator is doubled the number of the required test cases.
Multiple condition coverage takes in to consideration two or more conditions and then makes them in to a group and then they are tested. "Since the multiple condition coverage requires a very detailed knowledge of the software system or application’s code in order to understand all the decision aiming statements in that and in turn decide for the minimum requirement of the test cases, therefore it has been categorized under the white box testing techniques."
Friday, March 23, 2012
Multiple Condition Coverage is a white box testing technique - Explain?
Posted by
Sunflower
at
3/23/2012 11:35:00 AM
0
comments
Labels: Advantages, Application, Branch Coverage, Code, Code Coverage, Combinations, Conditions, Decision, Disadvantages, Multiple, Multiple Condition Coverage, Paths, Test cases, White box testing
![]() | Subscribe by Email |
|
Monday, January 16, 2012
What are different concepts of Pair wise testing?
We all know that we can't test everything. This is particularly appropriate for testing multiple combinations of input parameters. To test all the possible combinations for these parameters would require millions of tests.
- Pair wise testing or all pairs testing is an effective and systematic way to reduce the number of tests.
- The process of integrating this testing technique into test practices can prove to be a boon in saving time and efforts.
- Pair wise testing is also known as all pairs testing.
- Pair wise testing is nothing but a combined form of software testing methodologies or techniques.
- In a typical pair wise testing, all the pairs of input parameters, which are basically software algorithms, are tested in various possible unique combinations.
If the test vectors are chosen carefully, this process can be carried out much faster instead of performing an exhaustive search of all combinations of all the involved parameters and by parallelizing the tests of input parameter pairs.
The number of tests is typically given by the following formula:
O(nm)
Where n is the number of possibilities of first input parameter with most choices and m is the number of possibilities for the second input parameter with the most choices.
Reason of pair wise testing
- The pair wise testing is based on a certain reason.
- Even a simplest or primitive bug or error can cause havocs to the program.
- The petty errors are caused unknowingly by an input parameter.
- Other bugs and errors are a result of interaction between the various pairs of parameters.
- All these kind of bugs and errors can be arrested with the help of pair wise testing.
- Bugs and errors involving the interactions between three or more parameters are progressively less common in occurrence, but at the same time they are progressively more expensive to be found out by carrying out the exhaustive testing, which has its limit as the exhaustive testing of all possible inputs.
Many testers and software developers consider the pairs wise testing of a software system or subsystem or an application as a reasonable and efficient cost-benefit compromise between higher-order testing methods or techniques that can be combined and used, and less exhaustive methods or techniques which fail to exercise all the possible pairs of input parameters.
Since it is not possible for any testing technique or methodology to find out all the bugs and errors, pairs wise testing is typically used together with other testing methods and software quality assurance techniques and methodologies such as:
- Unit testing
- Symbolic execution
- Code review and
- Fuzz testing
Advantages of Pair Wise testing
- The best advantage of pair wise testing is that pair wise test cases give over 90 percent of coverage.
- In a research the pair wise testing was compared with the random input testing and it was found that pair wise testing provided better coverage.
- The block coverage obtained by pair wise testing has always been found to be comparable with the block coverage achieved by the exhaustive testing by testing all the possible factor combinations.
- Pair wise testing is actually based up on the fact that most faults are caused by interactions mostly between two factors.
- Pair wise generated test suites are quite effective in covering all the possible combinations of two parameters and therefore are much smaller than exhaustive test suites and still very effective in discovering defects.
Necessary condition for pair wise testing: - For each pair of input parameters, all the combinations of valid values of these two parameters should be covered.
- To test a small number of input parameters can result in a combinatorial explosion of a large number of possible permutations.
- Pair wise testing is to reduce the combinations to a more small and manageable size and provide effective fault detection.
Posted by
Sunflower
at
1/16/2012 03:10:00 PM
0
comments
Labels: Advantages, Application, Bugs, Combinations, Conditions, Defects, Errors, Exhaustive, Input, Necessary, Pair, Pair wise testing, Parameters, Quality, Software testing, Techniques, Test cases, Tests
![]() | Subscribe by Email |
|