Automatic Generation of Effective Unit Tests based on Code Behaviour

2020 
A large amount of test cases is very useful to check the correctness of a software system while it is developed. Often a considerable time is dedicated by human programmers to designing effective test cases. This paper proposes an approach for automatically generating test cases tailored to the characteristics of the code under test. For this, the classes of a software system to be tested are characterised by a static code analysis aiming at summarising and representing their behaviour. As test cases check the behaviour of code, classes that exhibit a close behaviour may be checked using similar test cases. Therefore, in the approach proposed, for classes having a comparable behaviour, test cases are generated by taking as a template the test cases available for one of the classes among the similar ones. The approach has been assessed on a few open source projects and has proved to be viable for generating applicable and effective test cases for the classes.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    25
    References
    0
    Citations
    NaN
    KQI
    []