Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi)
Vol 6 No 2 (2022): April 2022

Towards Generating Unit Test Codes Using Generative Adversarial Networks

Muhammad Johan Alibasa (Telkom University)
Rizka Widyarini Purwanto (University of New South Wales)
Yudi Priyadi (Telkom University)
Rosa Reska Riskiana (Telkom University)



Article Info

Publish Date
29 Apr 2022

Abstract

Unit testing is one of the critical software development steps to ensure the software’s quality. Unit testing is often neglected despite its importance since it requires a significant amount of time and effort from the software developers to write them. Existing automated testing generating systems from past research still have shortcomings due to the limitations of the Genetic Algorithm (GA) in generating the appropriate unit test codes. This study explores the feasibility of using Generative Adversarial Networks (GAN) models to generate unit test code with the ability of GAN to cover GA’s drawbacks. We perform experimentations using four state-of-the-art GAN models to generate basic unit test codes and compare the results by analyzing the generated output codes using novel metrics proposed from past studies and performing a qualitative evaluation of the generated outputs. The results show that the generated codes have satisfactory quality scores (BLEU-2 of around 99%) from the models and adequate diversity scores (NLL-Div and NLL-Gen) in most models. Our study shows positive indications and potential in the use of GAN for automatic unit test code generation and suggests recommendations for future studies in GAN-based unit test code generation systems

Copyrights © 2022






Journal Info

Abbrev

RESTI

Publisher

Subject

Computer Science & IT Engineering

Description

Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi) dimaksudkan sebagai media kajian ilmiah hasil penelitian, pemikiran dan kajian analisis-kritis mengenai penelitian Rekayasa Sistem, Teknik Informatika/Teknologi Informasi, Manajemen Informatika dan Sistem Informasi. Sebagai bagian dari semangat ...