Unit Test based Verification of Unidirectional Interactions in Component-based Systems

Component-based software systems are assessed through software tests, examining the system on various levels. The smallest level involves testing individual components, called unit testing. Integration testing is the next higher level and checks proper integration among components. Generally, integration testing is more intricate and expensive compared to unit testing, prompting the need for cost-effective approaches. The unit test based integration testing approach is one such solution, aiming to extract interaction expectations from existing unit tests by analyzing how the component interacts with the mocked environment. These expectations are then tested by emulating the interaction with the actual environment. The emulation is achieved by manipulating unit tests of interacting components to acquire actual responses that replace the mocked messages in the unit tests. However, the approach is currently limited to checking bidirectional interactions, where the component under test expects a response to a sent-out request. In modern microservices architectures, unidirectional events are common and pose a challenge to traditional software testing since there is no expectation towards the reaction to a send message imposed by the sending component. We propose an extension to automated integration testing based on unit tests to handle unidirectional interactions. The proposed extension to automated integration testing incorporates external expectations for unidirectional interactions. The extension automates the verification of these external expectations using unit tests to broaden the validation scope by including unidirectional interactions. In essence, this extension aims to enable testing of diverse communication scenarios that are not based on request-response scenarios.

Project information

Status:

Finished

Thesis for degree:

Master

Student:

Constantin Mensendiek

Supervisor:
Id:

2023-035