GenAI-Powered Test Case Generation for Microservices in CI/CD Pipelines

Authors

  • Mohan Siva Krishna Konakanchi Independent Researcher, USA. Author

DOI:

https://doi.org/10.63282/3050-922X.IJERET-V1I1P111

Keywords:

Generative AI, Microservices, Test Case Generation, CI/CD, Federated Learning, Explainable AI, Software Testing

Abstract

The adoption of microservice architectures has significantly accelerated software development velocity, yet it has introduced profound challenges in software testing. The distributed and independently deployable nature of microser- vices complicates the generation of comprehensive unit and integration test cases, often creating a bottleneck within Con- tinuous Integration/Continuous Deployment (CI/CD) pipelines. This paper introduces a novel framework, ”TestGenius,” that leverages Generative Artificial Intelligence (GenAI) to auto- mate and optimize test case generation for microservices. Our approach utilizes a multi-modal generative model that learns from API contracts (e.g., OpenAPI specifications) and runtime operational logs to produce semantically rich and contextually relevant test cases. To facilitate cross-organizational learning without compromising sensitive data, we propose a federated learning framework governed by a novel trust metric, ensuring the integrity and accountability of model contributions from different silos. Furthermore, we address the critical need for transparency in AI-driven testing by developing a framework to quantify and optimize the trade-off between the performance (i.e., test coverage, bug detection rate) and explainability of the generated tests. Our experimental design and hypothetical results demonstrate that TestGenius can significantly increase test coverage and fault detection rates compared to traditional test generation methods, paving the way for more resilient, efficient, and intelligent testing paradigms in modern software engineering

References

[1] S. Newman, ”Building Microservices: Designing Fine-Grained Sys- tems,” O’Reilly Media, 2015.

[2] C. Richardson, ”Microservices Patterns: With examples in Java,” Man- ning Publications, 2018.

[3] A. Arcuri, ”A Theoretical and Empirical Study of Search-Based Test- ing for Object-Oriented Software,” Ph.D. dissertation, King’s College London, 2009.

[4] A. Vaswani et al., ”Attention is All You Need,” in Advances in Neural Information Processing Systems (NIPS), 2017, pp. 5998-6008.

[5] M. Harman, S. A. Mansouri, and Y. Zhang, ”Search-based software engineering: Trends, techniques and applications,” ACM Computing Surveys (CSUR), vol. 45, no. 1, pp. 1-61, 2012.

[6] M. Zalewski, ”American Fuzzy Lop,” technical report, Google, 2014.

[7] G. Fraser and A. Arcuri, ”EvoSuite: automatic test suite generation for object-oriented software,” in Proceedings of the 19th ACM SIGSOFT symposium and the 13th European conference on Foundations of soft- ware engineering, 2011, pp. 416-419.

[8] M. Chen et al., ”Evaluating Large Language Models Trained on Code,” arXiv preprint arXiv:2107.03374, 2018.

[9] C. H. H. Schramm, C. S. Corro, ”Testing with Large Language Models: A study on the state of the art,” in 2015 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW),pp. 384-391.

[10] H. B. McMahan, E. Moore, D. Ramage, S. Hampson, and B. A. y Arcas, ”Communication-Efficient Learning of Deep Networks from Decentralized Data,” in Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS), 2017.

[11] M. F. P. da Silva, ”Federated Learning for Software Defect Prediction,” in 2011 IEEE/ACM 1st Workshop on AI Engineering - Software Engineering for AI (WAIN), pp. 83-86.

[12] S. M. Lundberg and S.-I. Lee, ”A Unified Approach to Interpreting Model Predictions,” in Advances in Neural Information Processing Systems (NIPS), 2017, pp. 4765-4774.

[13] R. Li et al., ”StarCoder: may the source be with you!,” arXiv preprint arXiv:2305.06161, 2013.

Downloads

Published

2020-03-30

Issue

Section

Articles

How to Cite

1.
Konakanchi MSK. GenAI-Powered Test Case Generation for Microservices in CI/CD Pipelines. IJERET [Internet]. 2020 Mar. 30 [cited 2026 Jan. 27];1(1):93-8. Available from: https://ijeret.org/index.php/ijeret/article/view/325