Test-Driven Development (TDD) is an agile software development approach. It promotes short cycles, composed of three phases each, to incrementally implement software functionality: Red, Green, and Refactor. In the Red Phase, the TDD developer writes a unit test for a small chunk of functionality not yet implemented and watches the test fail. In the Green Phase, the TDD developer writes production code to make the test pass as quickly as possible. Finally, in the refactor phase, the TDD developer 'cleans' written code. In this demo paper, we present GAI4-TDD (Generative Artificial Intelligence for Test-Driven Development), a PyCharm plugin to support the Green Phase of TDD. Specifically, this plugin generates production code from the tests the TDD developer had written in the Red Phase so that the generated code makes these tests pass. Previous studies have shown that TDD can be beneficial not only in the 'traditional' software development context but also in the Embedded Systems (ESs) development context. We preliminary assessed GAI4-TDD in the latter context through a laboratory empirical study on three ESs. We observed that in the greater part of the cases, GAI4-TDD generates production code that successfully implements the chunk of functionality required. A video showing GAI4-TDD in action is available at: https://youtu.be/30IDb-6NgS4.

Generative Artificial Intelligence for Test-Driven Development: GAI4-TDD

Cassieri P.;Romano S.;Scanniello G.
2024

Abstract

Test-Driven Development (TDD) is an agile software development approach. It promotes short cycles, composed of three phases each, to incrementally implement software functionality: Red, Green, and Refactor. In the Red Phase, the TDD developer writes a unit test for a small chunk of functionality not yet implemented and watches the test fail. In the Green Phase, the TDD developer writes production code to make the test pass as quickly as possible. Finally, in the refactor phase, the TDD developer 'cleans' written code. In this demo paper, we present GAI4-TDD (Generative Artificial Intelligence for Test-Driven Development), a PyCharm plugin to support the Green Phase of TDD. Specifically, this plugin generates production code from the tests the TDD developer had written in the Red Phase so that the generated code makes these tests pass. Previous studies have shown that TDD can be beneficial not only in the 'traditional' software development context but also in the Embedded Systems (ESs) development context. We preliminary assessed GAI4-TDD in the latter context through a laboratory empirical study on three ESs. We observed that in the greater part of the cases, GAI4-TDD generates production code that successfully implements the chunk of functionality required. A video showing GAI4-TDD in action is available at: https://youtu.be/30IDb-6NgS4.
2024
9798350330663
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11386/4894277
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? ND
social impact