Microservice architecture has become increasingly popular due to its good maintainability, scalability, fault tolerance, and extensibility. In addition to the REST style of microservices that has been widely used, the event-driven style of microservices is also gaining more and more attention. However, the current software testing methods have little support for event-driven architecture, and the technical complexity of event-driven microservices has further increased the difficulty of testing. In this regard, we propose a software testing tool for event-driven microservice systems called CCTS (Composite Contract Testing Service). By combining consumer-driven contract testing and the event-driven state model, CCTS records the state transitions of event exchange between services, and automatically retrieves the possible transition paths among services. Simultaneously, CCTS analyzes the event logs from the target system to determine whether the event logs conformed with the specified transitions of states and retrieved paths. Besides, CCTS checks the validity of contract testing to ensure that the communication through services. To evaluate CCTS, we conducted functional testing for CCTS using a real-world microservice system. The results show that CCTS can effectively detect potential defects in the event-driven microservice system, such as isolated states, cyclic states, incomplete contract tests, and unqualified event sequences.
[1]
Stefan Wagner,et al.
Industry practices and challenges for the evolvability assurance of microservices
,
2020,
Empirical Software Engineering.
[2]
Israr Ghani,et al.
Microservice Testing Approaches: A Systematic Literature Review
,
2019
.
[3]
Tommi Mikkonen,et al.
Consumer-Driven Contract Tests for Microservices: A Case Study
,
2019,
PROFES.
[4]
Pooyan Jamshidi,et al.
Microservices: The Journey So Far and Challenges Ahead
,
2018,
IEEE Softw..
[5]
Philippe Dobbelaere,et al.
Kafka versus RabbitMQ: A comparative study of two industry reference publish/subscribe implementations: Industry Paper
,
2017,
DEBS.
[6]
Gerhard Weber,et al.
Markdown - A Simple Syntax for Transcription of Accessible Study Materials
,
2014,
ICCHP.
[7]
Mazin S. Yousif,et al.
Microservices
,
2016,
IEEE Cloud Comput..
[8]
H. Garcia-Molina,et al.
Sagas
,
1987,
SIGMOD Conference.