Mock objects: um estudo de caso de uma aplicação na indústria
Visualizar/ Abrir
Data
2022-04-18Autor
Faria, Daniel Lippi Castro de
Metadata
Mostrar registro completoResumo
Context: Modern Java applications make extensive use of mock objects. In this context, many approaches to this topic are present in the literature. A great number of these, employ basic OO design principles, such as object interfaces. However, developers practice tend to disagree with such ideas. Aims: This study case will assess how an industry application (in Java) makes use of mock objects and how this practice is related to software quality traits and OO design principles. Method: Relying on the Factor-Criteria-Metrics quality model, this study will analyze how mock object usage correlates to the intrinsic quality factors of the investigated application. In this regard, all the 101 mock occurrences are examined under different
perspectives such as mock distribution in test classes, functionalities used, refactoring required, and others. Results: In the analyzed application, mock object implementations are highly related to the design of the same. The number of dependencies in a production class is directly related to the number of mocks in the respective test class, as an example. As a consequence, poor design choices, are harmful to intrinsic quality factors such as the maintainability of the application tests. Conclusion: The application of mock objects in the assessed system ignores basic OO design principles existent in the literature. This is a sign that developers are making an immature use of the technique. Important software quality aspects are underestimated by the approach analyzed.
Collections
Os arquivos de licença a seguir estão associados a este item: