Mock objects: a case study in industry✱.

SBSI(2023)

引用 0|浏览4
暂无评分
摘要
Context: Mock objects are commonly used in unit tests to isolate a class from its dependencies by substituting a dependency class instead of the original. Problem: However, in addition to the use of mock objects in the vast majority of OO applications, there are some discrepancies in their use. Solution: This work aims to present a case study of an industry application regarding the use of mock objects. The application in question is part of a private flight management system. IS Theory: We conceived this work based on the General Systems Theory, specifically to evaluate a microservice-based system's use of testing doubles during testing automation. Method: In the analyzed application, mock object implementations are highly related to the system design. For example, the number of dependencies in a production class is directly related to the number of mocks in the respective test class. As a consequence, poor design choices are harmful to intrinsic quality factors such as the maintainability of the application tests. Our study uses metrics to analyze this practice. The research will consider factors of this system, aiming mainly to contribute to the improvement of test doubles by the test team. Summary of Results: Application of simulated objects in a similar system indicates that developers are making immature use of the technique, possibly due to system design problems. This study concludes that theory and practice are misaligned. Contributions and Impact in the IS area: The main contribution is to indicate points to improving software testing practice by using mocks correctly.
更多
查看译文
关键词
Mock Objects, OOP, OO Design, Software Quality
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要