Back close

The Mechanism of Generating the Automated Java Unit Test Cases by Achieving Maximum Code Coverage

Publication Type : Conference Paper

Publisher : Springer Singapore

Source : Learning and Analytics in Intelligent Systems

Url : https://doi.org/10.1007/978-981-15-9293-5_4

Campus : Coimbatore

School : School of Engineering

Center : TIFAC CORE in Cyber Security

Year : 2021

Abstract : The code coverage, being the factor of focus on unit testing that tells us which part of the source code is tested or untested. If the code consists of abstract classes or interfaces, they are also to be tested to ensure the maximum code coverage as generating the high coverage test suites play an important role in realistic systems like airbag systems, autopilot systems, etc. Thus, the correctness in the functionality is properly tested. Mocking is the process of constituting an imitation of the object. It is the technique of unit testing where the virtual objects are created to mock the behavior of the actual object, which helps us to bypass faults to some other class or system like database operation, REST API calls, etc. Hence, this proposed work has been designed to generate highly covered test cases in the aspects of Java. This work helps us to produce the test cases along with the skeleton, which forms a syntactically correct JUnit. It helps to test the subclasses implementing the Abstract class’s methods and classes implementing interfaces, to generate the test cases for no access modifier methods. The generated test cases support mocking as well. Mockito framework is being used to do so.

Cite this Research Publication : Bindu Avadhani, Saumya Ranjan Giri, Venkateswara Rao Pulipati, The Mechanism of Generating the Automated Java Unit Test Cases by Achieving Maximum Code Coverage, Learning and Analytics in Intelligent Systems, Springer Singapore, 2021, https://doi.org/10.1007/978-981-15-9293-5_4

Admissions Apply Now