Elsevier

Computer Standards & Interfaces

Volume 50, February 2017, Pages 1-17
Computer Standards & Interfaces

J3 Model: A novel framework for improved Modified Condition/Decision Coverage analysis

https://doi.org/10.1016/j.csi.2016.09.006Get rights and content

Highlights

  • J3 Model is proposed to achieve high MC/DC percentage that shows the improvement of the existing concolic testing technique.

  • JPCT is an efficient version of transformation technique as compare to existing technique.

  • JCA is much more power full than existing coverage analyser for MC/DC, since it is developed by considering all MC/DC essential requirements.

  • Implementation and Experiments are done for forty Java programs, and the results present the improvement in MC/DC.

Abstract

In the real-time systems and safety critical domains, software quality assurance adheres to protocols such as DO-178C standard. Regarding these issues, concolic testing generates test cases that can attain high coverage using an augmented approach based on Modified Condition/Decision Coverage (MC/DC). In this paper, we propose a framework to compute MC/DC percentage for test case generation. To achieve an increase in MC/DC, we transform the input Java program, J, into its transformed version, J, using Java Program Code Transformer (JPCT). Then, we use JCUTE tool to generate test cases. At last, we use Java Coverage Analyzer (JCA) to compute MC/DC percentage. The Java program code transformer adds additional empty nested if-else conditional statements for each decision that causes variation in MC/DC percentage. In later step, these extra conditional statements get stripped-off. This approach resolves some of the bottleneck issues associated with traditional concolic testers. In our experimental study, we have experimented with forty Java programs. We have computed the difference of MC/DC%, for both the scenarios (i.e. with code transformation and without code transformation). Our approach (i.e. with code transformation achieves) 24.09% average increase in MC/DC% over the traditional approach (i.e. without code transformation).

Introduction

Traditional testing techniques, often fail to detect errors or defects in software systems. One of the reasons for failure is that a program may have an enormous number of different execution paths because of the presence of loops and conditional statements. Therefore, it is unlikely for a software tester to create enough test cases manually to detect subtle errors in all the possible execution paths. It is technically a significant challenge to generate a test suite that covers all different paths in an automated manner [22].

To address these issues, CONCOLIC testing has been proposed. CONCOLIC (CONCrete+symbOLIC) [6] testing combines concrete dynamic and static symbolic analysis. This testing technique is used to automatically generate test cases for exploring the possible execution paths of a program [17], [18], [23], [30]. Concolic testing may take a significant amount of time to explore all the execution paths, and this is an issue towards its practical application [8], [11].

Software testing is of two types, one is Black Box testing and another one is White Box testing. Coverage based testing is a white-box testing technique. It includes several testing criteria such as Statement Coverage (SC), Condition Coverage (CC), Branch Coverage (BC), Modified Condition/Decision Coverage (MC/DC), Multiple Condition Coverage (MCC) etc. Though MCC is the strongest criterion but we have chosen MC/DC, because MC/DC generates non-redundant test cases [24]. The process of manually achieving coverage is both very difficult and effort intensive. In accordance with the RTCA/DO-178C standard, coverage-based testing is a measure of acceptability of the requirement-based testing in the context of exercising logical expressions.

Our contribution in this paper is to propose a model to generate test cases that achieve higher MC/DC percentage. In this paper, we propose a framework to compute the MC/DC percentage of Java programs. We have named the proposed framework JPCT JCUTE JCA MODEL (J3 Model). J3 Model consists of mainly three modules: i) Java Program Code Transformer (JPCT), ii) Java Concolic Tester (JCUTE), iii) Java Coverage Analyser (JCA). Out of these three modules, we have proposed and developed two modules – JPCT and JCA, and used an existing open source tool called jCUTE. Our approach integrates these three modules. In our approach, we have developed JPCT to improve the effectiveness and efficiency of the proposed model by generating additional conditional statements. J3 Model overcomes the problems of traditional concolic testing. JCUTE [4] is an open source concolic tester. It takes the non-transformed (original) program and the transformed program as input and generates the test cases as the output. We have developed JCA to compute the MC/DC percentage. This proposed work is the extension of our previous work [12]. In this proposed approach we have improved the technique that is presented in [12], [13], [14]. In the previous work [12], [13], [14], we have used C language to develop the Program Code Transformer (PCT) and Coverage Analyzer (CA) to handle structured programs. PCT was having a number of limitations such as: i) Non-capable of handling larger size programs, ii) The insertion idea of additional if-else statements was based on string matching which poses a constraint on the maximum number of possible combinations of predicates, iii) The Quine McCluskey technique was implemented in C language and, that can only handle up to four variables.

But in our proposed JPCT, we have resolved these aforementioned issues. JPCT is developed in Java language and is capable of handling larger size object-oriented programs. JPCT is developed in a generalized way that can handle all possible combinations for a Sum of Product (SOP) irrespective of number of variables present in the SOP. In JPCT, Quine McCluskey technique is used which is also implemented in Java language. This Java version of Quine McCluskey technique is capable of handling approx. 15 to 18 variables (×4 than older Quine McCluskey technique). In our previous work, we have used a concolic engine called CREST, which supports structured programs (e.g. C programs). Whereas in this proposed work, we have used jCUTE that supports Object-Oriented programs (e.g. Java programs). CREST is non-capable of selecting input values for strings, whereas jCUTE is capable of selecting string values also. In our previous work [12], [13], [14], [15], we have used Coverage Analyzer (CA) which was developed in C language to measure MC/DC%. CA was implemented using two-flag concept. This logic only identifies whether both true_flag and false_flag are TRUE or not. If it is TRUE, then the current condition is included in independently affected conditions set [Please refer to Algorithm for CA in [12]. In this proposed work, we have implemented JCA on the basis of all MC/DC requirements in Java language. JCA is more powerful than the previous version CA to measure MC/DC%. JCA is more scalable than CA, because it can handle large number of conditions in a predicate than CA. Since, CA was developed using C language, so, whenever a C program gets executed to invoke a specific required pre-defined function, we have to include the whole header file, where this function prototype exists. But, JCA is developed using Java language. When we required to invoke a specific pre-defined method, then we can use only the particular pre-defined method of the particular class not the whole package. The advantages of Java language increase the time and memory efficiency.

The rest of the paper is organized as follows: Section 2 discusses some of the basic concepts required to understand the proposed work. Section 3 introduces the proposed J3 Model framework and explains the required steps for implementation. We present the analysis of our experimental results in Section 4. In Section 5, we discuss comparisons of the existing related works with our proposed approach. We report some of the current threats to the validity of our approach in Section 6. Section 7 concludes the paper with some insights into our future work.

Section snippets

Basic concepts

Below we present some definitions which are required to understand our approach.

Definition 1

Condition: A condition or a clause is a Boolean Expression without any Boolean Operator [11].

Definition 2

Group of Conditions: A decision or predicate is composed of two or more conditions with Boolean Operators [11].

Definition 3

Predicate or Decision: A predicate is a Boolean Expression composed of conditions and boolean operators [11].

Definition 4

Branch coverage: In order to achieve branch coverage, each decision should take all possible outcomes at

Proposed J3 Model

Coverage based testing plays critical role in software testing. In real-time systems, branch coverage and MC/DC are very rigid to threshold values. Due to less coverage, testers are compelled to reject the module under consideration. We develop JPCT to increase the MC/DC and include it in J3 Model. The traditional concolic testers suffer from the shortcomings of symbolic execution engines and unavailability of library code [3], [5]. As a result, concolic testing may not achieve full path

Experimental studies

The experimentation is carried out on forty benchmark Java programs taken from the Open Systems Laboratory1 and some student assignments given at NIT Rourkela. The specifications of the experimental programs are given in Table 3. In Table 3, the programs mentioned in Serial nos. 1, 2, 3, 4, 9, 35, 37, and 38 are taken from assignments at NIT Rourkela and rest of the programs are taken from Open Systems Laboratory2

Comparison with related work

In this section, we discuss our literature survey in detail. We compare the different available work on concolic and coverage-based testing in Table 8. Table 8 compares the different aspects (testing type, framework type, input type and output type) of some available work [1], [11], [12], [17]. Our survey includes the contribution of different researchers in the field of MC/DC and concolic testing. This survey of the existing work is based on the following characteristics of the approaches:

Threats to validity

There exists some threats to the validity of our proposed approach.

  • The primary threat to our approach is related to the target programs. The programs chosen for this experimentation are amenable to concolic testing, and thus do not reveal the characteristics that might hinder the proposed approach.

  • The limitations of the underlying symbolic execution engine used in concolic tester form the second threat to the validity of our approach.

  • The third threat to validity is that our constraint solver

Conclusion and future work

We proposed a framework named J3 Model for test case generation that is based on the MC/DC analysis of Java programs. We discussed J3 Model along with model overview, block diagram and description, algorithmic description, and proposed steps. The experimental results show that the proposed approach of test case generation achieves better MC/DC in comparison to the existing approaches. Our proposed approach achieved 24.09% of average increase in MC/DC.

In the future, we will focus to overcome

Acknowledgment

We thank to Web Engineering Project, a FIST project funded by MHRD, Govt. of India for providing necessary support to conduct this research work. We have experimented our case studies in Web engineering lab setup at our Department of Computer Science and Engineering, National Institute of Technology Rourkela.

References (31)

  • P. Godefroid, N. Klarlund, K. Sen, DART: directed automated random testing, in: Proceedings of the PLDI, New York, USA,...
  • HD. Menno, Automatic Unit Test Generation (Master Thesis), Software Engineering Research Group, Delft University of...
  • K. Sen, D. Marinov, G. Agha, CUTE: d concolic unit testing engine for C, in: Proceedings of the ESEC/FSE, Lisbon,...
  • K. Sen, G. Agha, CUTE and jCUTE: concolic unit testing and explicit path model-checking tools (Tools Paper), DTIC...
  • R. Majumder, K. Sen, Hybrid concolic testing, in: Proceedings of the 29th International Conference on Software...
  • J. Burnim, K. Sen, Heuristics for scalable dynamic test generation, in: Proceedings of the ASE, Washington, D.C., USA,...
  • Z. Awedikian, K. Ayari, G. Antoniol, MC/DC automatic test input data generation, in: Proceedings of the GECCO, New...
  • A. Das, Automatic Generation of MC/DC Test Data (Master Thesis), Computer Science & Engineering, Indian Institute of...
  • CREST....
  • P. Bokil, P. Darke, U. Shrotri, R. Venkatesh, Automatic test data generation for C programs, in: Proceedings of the 3rd...
  • A. Das et al.

    Automatic generation of MC/DC test data

    Int. J. Softw. Eng. Acta Press

    (2013)
  • S. Godboley, Improved Modified Condition/Decision Coverage using Code Transformation Techniques, Thesis (MTech) NIT...
  • S. Godboley, DP. Mohapatra, Time analysis of evaluating coverage percentage for C program using advanced program code...
  • S. Godboley, GS. Prashanth, DP Mohapatra, B. Majhi, Increase in modified condition/decision coverage using program code...
  • S. Godboley, GS. Prashanth, DP Mohapatra, B. Majhi, Enhanced modified condition/decision coverage using exclusive-nor...
  • Cited by (23)

    • BOOMPizer: Minimization and prioritization of CONCOLIC based boosted MC/DC test cases

      2022, Journal of King Saud University - Computer and Information Sciences
      Citation Excerpt :

      Their experimental results validated to improve the error detectability of the test suite with higher efficiency. Godboley et al. (2017) and Godboley et al. (2018) proposed two different code transformation techniques viz., JPCT (Godboley et al., 2017) and JEXNCT (Godboley et al., 2018) to achieve high MC/DC. JPCT uses Quine-McClusky methodology to solve the predicates and JEXNCT uses Exclusive-Nor code transformation to generate the additional empty nested conditions into the program in order to generate test cases that will have an increased MC/DC%.

    • MAESTRO: Automated test generation framework for high test coverage and reduced human effort in automotive industry

      2020, Information and Software Technology
      Citation Excerpt :

      MAESTRO has achieved 94.2% branch and 82.3% MC/DC coverage on the four target modules, and reduced the manual testing effort by 58.8%. As future work, we plan to generate more precise test driver/stubs by adopting advanced techniques (e.g., MCDC coverage improvement [64–66] and/or distributed concolic testing [33,67,68]). Also, we will extend MAESTRO by applying compositional concolic testing [69] and apply it to other automotive software modules.

    • Scaling modified condition/decision coverage using distributed concolic testing for Java programs

      2018, Computer Standards and Interfaces
      Citation Excerpt :

      They have not used distributed approach in these works. The current work is highly based on Godboley et al. [36,37]. In this work, we have used Java Program Code Transformer (JPCT) and Java Exclusive-NOR Code Transformer (JEXNCT) to transform the input programs and generated useful test cases to achieve higher MC/DC.

    • An Extensive Investigation of Condition Reachability using CBMC: Study on Negative Results

      2023, 2023 IEEE 20th India Council International Conference, INDICON 2023
    • Carbon-Box Testing

      2023, International Conference on Evaluation of Novel Approaches to Software Engineering, ENASE - Proceedings
    View all citing articles on Scopus
    View full text