Aplicação de Large Language Models na Geração Automática de Testes de Software: Uma Revisão Sistemática da Literatura
Resumo
A geração manual de testes é onerosa, impulsionando o uso de Large Language Models (LLMs). Esta Revisão Sistemática da Literatura (RSL), baseada na metodologia de Kitchenham, analisou 20 estudos e identificou a evolução para arquiteturas multiestágio com Retrieval-Augmented Generation (RAG) e reparo iterativo. As abordagens analisadas alcançaram até 77,67% de cobertura de linha e redução de 45,8% no esforço manual. Apesar de desafios como alucinações e limites de contexto, os LLMs consolidam-se como suporte eficaz para geração automática de testes.Referências
Alves, V., Bezerra, C. I. M., Machado, I. d. C., Rocha, L., Virgínio, T., and Silva, P. (2025). Quality assessment of Python tests generated by large language models. In Proc. EASE.
Auer, M., Moreno, I. A., and Fraser, G. (2024). LLMs for automated unit test generation and assessment in Java: The AgoneTest framework. In Proc. AST.
Barr, E. T., Harman, M., McMinn, P., Shahbaz, M., and Yoo, S. (2015). The oracle problem in software testing: A survey. IEEE Transactions on Software Engineering, 41(5):507–525.
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020). Language models are few-shot learners. In Advances in Neural Information Processing Systems (NeurIPS 33).
Cadar, C. and Sen, K. (2013). Symbolic execution for software testing: three decades later. Communications of the ACM, 56(2):82–90.
Fraser, G. and Arcuri, A. (2011). EvoSuite: Automatic test suite generation for object-oriented software. In Proc. FSE, pages 416–419.
Harman, M. and McMinn, P. (2010). A theoretical and empirical study of search-based testing: Local, global, and hybrid search. IEEE Transactions on Software Engineering, 36(2):226–247.
Hossain, S. B., Taylor, R., and Dwyer, M. B. (2025). Doc2OracLL: Investigating the impact of documentation on LLM-based test oracle generation. Proceedings of the ACM on Software Engineering, 2(FSE).
Just, R., Jalali, D., and Ernst, M. D. (2014). Defects4J: A database of existing faults to enable controlled testing studies for Java programs. In Proc. ISSTA, pages 437–440.
Kitchenham, B. (2004). Procedures for performing systematic reviews. Technical Report TR/SE-0401, Keele University and NICTA.
Li, T., Cui, C., Huang, R., Towey, D., and Ma, L. (2026). Large language models for automated web-form-test generation: An empirical study. ACM Transactions on Software Engineering and Methodology, 35(3).
Liu, J., Li, C., Chen, R., Li, S., Gu, B., and Yang, M. (2025). STRUT: Structured seed case guided unit test generation for C programs using LLMs. Proceedings of the ACM on Software Engineering, 2(ISSTA).
Moradi Dakhel, A., Nikanjam, A., Majdinasab, V., Khomh, F., and Desmarais, M. C. (2024). Effective test generation using pre-trained large language models and mutation testing. Information and Software Technology, 171:107468.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. In Advances in Neural Information Processing Systems (NIPS 30).
Yuan, Z., Liu, M., Ding, S., Wang, K., Chen, Y., Peng, X., and Lou, Y. (2024). Evaluating and improving ChatGPT for unit test generation. Proceedings of the ACM on Software Engineering, 1(FSE).
Zhang, Q., Fang, C., Zheng, Y., Zhang, Y., Zhao, Y., Huang, R., Zhou, J., Yang, Y., Zheng, T., and Chen, Z. (2025a). Improving deep assertion generation via fine-tuning retrieval-augmented pre-trained language models. ACM Transactions on Software Engineering and Methodology, 34(7).
Zhang, Q., Kang, R., Liu, Y., and Cao, X. (2025b). Large language model-enhanced test case generation. In Proc. CBASE. IEEE.
Zhang, Z., Liu, X., Lin, Y., Gao, X., Sun, H., and Yuan, Y. (2025c). Reference-based retrieval-augmented unit test generation. ACM Transactions on Software Engineering and Methodology, 34(9).
Auer, M., Moreno, I. A., and Fraser, G. (2024). LLMs for automated unit test generation and assessment in Java: The AgoneTest framework. In Proc. AST.
Barr, E. T., Harman, M., McMinn, P., Shahbaz, M., and Yoo, S. (2015). The oracle problem in software testing: A survey. IEEE Transactions on Software Engineering, 41(5):507–525.
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020). Language models are few-shot learners. In Advances in Neural Information Processing Systems (NeurIPS 33).
Cadar, C. and Sen, K. (2013). Symbolic execution for software testing: three decades later. Communications of the ACM, 56(2):82–90.
Fraser, G. and Arcuri, A. (2011). EvoSuite: Automatic test suite generation for object-oriented software. In Proc. FSE, pages 416–419.
Harman, M. and McMinn, P. (2010). A theoretical and empirical study of search-based testing: Local, global, and hybrid search. IEEE Transactions on Software Engineering, 36(2):226–247.
Hossain, S. B., Taylor, R., and Dwyer, M. B. (2025). Doc2OracLL: Investigating the impact of documentation on LLM-based test oracle generation. Proceedings of the ACM on Software Engineering, 2(FSE).
Just, R., Jalali, D., and Ernst, M. D. (2014). Defects4J: A database of existing faults to enable controlled testing studies for Java programs. In Proc. ISSTA, pages 437–440.
Kitchenham, B. (2004). Procedures for performing systematic reviews. Technical Report TR/SE-0401, Keele University and NICTA.
Li, T., Cui, C., Huang, R., Towey, D., and Ma, L. (2026). Large language models for automated web-form-test generation: An empirical study. ACM Transactions on Software Engineering and Methodology, 35(3).
Liu, J., Li, C., Chen, R., Li, S., Gu, B., and Yang, M. (2025). STRUT: Structured seed case guided unit test generation for C programs using LLMs. Proceedings of the ACM on Software Engineering, 2(ISSTA).
Moradi Dakhel, A., Nikanjam, A., Majdinasab, V., Khomh, F., and Desmarais, M. C. (2024). Effective test generation using pre-trained large language models and mutation testing. Information and Software Technology, 171:107468.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. In Advances in Neural Information Processing Systems (NIPS 30).
Yuan, Z., Liu, M., Ding, S., Wang, K., Chen, Y., Peng, X., and Lou, Y. (2024). Evaluating and improving ChatGPT for unit test generation. Proceedings of the ACM on Software Engineering, 1(FSE).
Zhang, Q., Fang, C., Zheng, Y., Zhang, Y., Zhao, Y., Huang, R., Zhou, J., Yang, Y., Zheng, T., and Chen, Z. (2025a). Improving deep assertion generation via fine-tuning retrieval-augmented pre-trained language models. ACM Transactions on Software Engineering and Methodology, 34(7).
Zhang, Q., Kang, R., Liu, Y., and Cao, X. (2025b). Large language model-enhanced test case generation. In Proc. CBASE. IEEE.
Zhang, Z., Liu, X., Lin, Y., Gao, X., Sun, H., and Yuan, Y. (2025c). Reference-based retrieval-augmented unit test generation. ACM Transactions on Software Engineering and Methodology, 34(9).
Publicado
19/07/2026
Como Citar
ANUNCIAÇÃO, Samuel Ryan da Fonseca; SILVA, Luis Fernando Maia Santos.
Aplicação de Large Language Models na Geração Automática de Testes de Software: Uma Revisão Sistemática da Literatura. In: SEMINÁRIO INTEGRADO DE SOFTWARE E HARDWARE (SEMISH), 53. , 2026, Gramado/RS.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2026
.
p. 884-889.
ISSN 2595-6205.
DOI: https://doi.org/10.5753/semish.2026.20966.
