{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,6,2]],"date-time":"2025-06-02T22:40:04Z","timestamp":1748904004789,"version":"3.41.0"},"publisher-location":"Cham","reference-count":36,"publisher":"Springer Nature Switzerland","isbn-type":[{"type":"print","value":"9783031945434"},{"type":"electronic","value":"9783031945441"}],"license":[{"start":{"date-parts":[[2025,1,1]],"date-time":"2025-01-01T00:00:00Z","timestamp":1735689600000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2025,5,29]],"date-time":"2025-05-29T00:00:00Z","timestamp":1748476800000},"content-version":"vor","delay-in-days":148,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":[],"published-print":{"date-parts":[[2025]]},"abstract":"<jats:title>Abstract<\/jats:title>\n          <jats:p>Generative AI has been rapidly adopted by the software development industry in various ways, offering innovative approaches to transforming requirements into working software. Combining Generative AI with Test-Driven Development (TDD) presents a creative method to accelerate this transformation. However, questions remain about ChatGPT\u2019s readiness for this challenge, including the techniques and best practices required for success and the scenarios where this approach can consistently deliver results. To explore these questions, we designed a study where a group of master\u2019s students performed programming assignments using TDD, first independently and then with the support of ChatGPT. The three assignments represent distinct scenarios: mathematical calculations (function), text processing (class), and system integration (class with dependencies). We performed a qualitative analysis of the submitted code and reports identifying key strategies that significantly influence success rates, such as providing contextual information, separating instructions in prompts following an iterative process, and assisting AI in fixing errors. Among the scenarios, the integration task achieved the highest performance. This study highlights the potential of leveraging Generative AI in TDD for software development and presents a list of effective strategies to maximize its impact. By applying these positive strategies and avoiding identified pitfalls, this research marks a step toward establishing best practices for integrating Generative AI with TDD in software engineering.<\/jats:p>","DOI":"10.1007\/978-3-031-94544-1_10","type":"book-chapter","created":{"date-parts":[[2025,5,28]],"date-time":"2025-05-28T12:14:29Z","timestamp":1748434469000},"page":"145-159","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["Exploratory Test-Driven Development Study with\u00a0ChatGPT in\u00a0Different Scenarios"],"prefix":"10.1007","author":[{"ORCID":"https:\/\/orcid.org\/0009-0008-7400-5767","authenticated-orcid":false,"given":"Juliano Cesar","family":"Pancher","sequence":"first","affiliation":[]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1303-4173","authenticated-orcid":false,"given":"Jorge","family":"Melegati","sequence":"additional","affiliation":[]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5555-3487","authenticated-orcid":false,"given":"Eduardo Martins","family":"Guerra","sequence":"additional","affiliation":[]}],"member":"297","published-online":{"date-parts":[[2025,5,29]]},"reference":[{"key":"10_CR1","doi-asserted-by":"publisher","unstructured":"Ahmad, A., et al.: Towards human-bot collaborative software architecting with ChatGPT\u201d. en. In: Proceedings of the 27th International Conference on Evaluation and Assessment in Software Engineering, Oulu Finland, pp. 279\u2013285. ACM, June 2023. isbn: 9798400700446. https:\/\/doi.org\/10.1145\/3593434.3593468. https:\/\/dl.acm.org\/doi\/10.1145\/3593434.3593468, Accessed 19 May 2024","DOI":"10.1145\/3593434.3593468"},{"key":"10_CR2","unstructured":"Astels, D.: Test-driven development: a practical guide. eng. 3. print. The Coad series. Upper Saddle River, NJ: Prentice Hall PTR (2003). isbn: 978-0-13-101649-1"},{"key":"10_CR3","unstructured":"Bartz, D.: As ChatGPT\u2019s popularity explodes, U.S. lawmakers take an interest. In: Reuters, February 2023. https:\/\/www.reuters.com\/technology\/chatgpts-popularity-explodes-us-lawmakers-takean-interest-2023-02-13\/"},{"key":"10_CR4","doi-asserted-by":"publisher","unstructured":"Beck, K.: Aim, fire [test-first coding]. IEEE Software 18(5), 87\u201389 (2001). issn: 0740-7459, 1937-4194. https:\/\/doi.org\/10.1109\/52.951502, https:\/\/ieeexplore.ieee.org\/document\/951502\/ Accessed 11 May 2024","DOI":"10.1109\/52.951502"},{"key":"10_CR5","unstructured":"Bhat, T., Nagappan, N.: Evaluating the efficacy of test-driven development: industrial case studies"},{"key":"10_CR6","doi-asserted-by":"publisher","unstructured":"Biswas, S.S.: Role of Chat GPT in Public Health. Ann. Biomed. Eng. 51(5), 868\u2013869 (2023). issn: 0090-6964, 1573-9686. https:\/\/doi.org\/10.1007\/s10439-023-03172-7, https:\/\/link.springer.com\/10.1007\/s10439-023-03172-7, Accessed 25 May 2024","DOI":"10.1007\/s10439-023-03172-7"},{"key":"10_CR7","unstructured":"Creswell, J.W.: Research Design: Qualitative, Quantitative, and Mixed Methods Approaches. 4th edition. Sage Publications, Chap. 8 (2013)"},{"key":"10_CR8","doi-asserted-by":"publisher","unstructured":"Crispin, L.: Driving software quality: how test-driven development impacts software quality. IEEE Software 23(6), 70\u201371 (2006), issn: 0740-7459. https:\/\/doi.org\/10.1109\/MS.2006.157, http:\/\/ieeexplore.ieee.org\/document\/4012627\/ Accessed 18 May 2024","DOI":"10.1109\/MS.2006.157"},{"key":"10_CR9","doi-asserted-by":"publisher","unstructured":"Daun, M., Brings, J.: How ChatGPT will change software engineering education. en. In: Proceedings of the 2023 Conference on Innovation and Technology in Computer Science Education V. 1. Turku Finland, pp. 110\u2013116. ACM, June 2023, isbn: 9798400701382. https:\/\/doi.org\/10.1145\/3587102.3588815, https:\/\/dl.acm.org\/doi\/10.1145\/3587102.3588815 Accessed 19 May 2024","DOI":"10.1145\/3587102.3588815"},{"key":"10_CR10","unstructured":"Devlin, J., et al.: BERT: pre-training of deep bidirectional transformers for language understanding. arXiv:1810.04805 [cs], May 2019. http:\/\/arxiv.org\/abs\/1810.04805 Accessed 17 May 2024"},{"key":"10_CR11","doi-asserted-by":"publisher","unstructured":"Fakhoury, S., et al.: LLM-based test-driven interactive code generation: user study and empirical evaluation. arXiv:2404.10100, October 2024. arXiv:2404.10100, https:\/\/doi.org\/10.48550\/arXiv.2404.10100, http:\/\/arxiv.org\/abs\/2404.10100","DOI":"10.48550\/arXiv.2404.10100"},{"issue":"6","key":"10_CR12","doi-asserted-by":"publisher","first-page":"3801","DOI":"10.1007\/s10664-018-9655-0","volume":"23","author":"R Feldt","year":"2018","unstructured":"Feldt, R., et al.: Four commentaries on the use of students and professionals in empirical software engineering experiments. Empir. Softw. Eng. 23(6), 3801\u20133820 (2018). https:\/\/doi.org\/10.1007\/s10664-018-9655-0","journal-title":"Empir. Softw. Eng."},{"key":"10_CR13","doi-asserted-by":"publisher","unstructured":"Ghafari, M., et al.: Why research on test-driven development is inconclusive? en. In: Proceedings of the 14th ACM\/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), pp. 1\u201310, October 2020. arXiv:2007.09863 [cs]. https:\/\/doi.org\/10.1145\/3382494.3410687, http:\/\/arxiv.org\/abs\/2007.09863 (visited on 05\/18\/2024)","DOI":"10.1145\/3382494.3410687"},{"key":"10_CR14","doi-asserted-by":"crossref","unstructured":"Guerra, E., Aniche, M.: Achieving quality on software design through test-driven development. In: Software Quality Assurance, pp. 201\u2013220. Elsevier (2016)","DOI":"10.1016\/B978-0-12-802301-3.00009-0"},{"key":"10_CR15","doi-asserted-by":"publisher","unstructured":"Han, X., et al.: Pre-trained models: past, present and future. In: AI Open 2, pp. 225\u2013250 (2021). issn: 26666510. https:\/\/doi.org\/10.1016\/j.aiopen.2021.08.002, https:\/\/linkinghub.elsevier.com\/retrieve\/pii\/S2666651021000231 Accessed 19 May 2024","DOI":"10.1016\/j.aiopen.2021.08.002"},{"key":"10_CR16","unstructured":"Jaber, M.A., Beganovi\u0107, A., Almisreb, A.A.: Methods and applications of ChatGPT in software development: a literature review, vol. 12, no. 1 (2023)"},{"key":"10_CR17","doi-asserted-by":"publisher","unstructured":"Janzen, D., Saiedian, H.: Test-driven development concepts, taxonomy, and future direction. Computer 38(9), 43\u201350 (2005), issn: 0018-9162. https:\/\/doi.org\/10.1109\/MC.2005.314, http:\/\/ieeexplore.ieee.org\/document\/1510569\/ Accessed 18 May 2024","DOI":"10.1109\/MC.2005.314"},{"key":"10_CR18","doi-asserted-by":"publisher","unstructured":"Janzen, D., Saiedian, H.: Does test-driven development really improve software design quality? IEEE Software 25(2), 77\u201384 (2008), issn: 0740-7459. https:\/\/doi.org\/10.1109\/MS.2008.34, http:\/\/ieeexplore.ieee.org\/document\/4455636\/ Accessed 18 May 2024","DOI":"10.1109\/MS.2008.34"},{"key":"10_CR19","doi-asserted-by":"crossref","unstructured":"Maranh\u00e3o, J.J., Guerra, E.M.: A prompt pattern sequence approach to apply generative AI in assisting software architecture decision-making. In: Proceedings of the 29th European Conference on Pattern Languages of Programs, People, and Practices, pp. 1\u201312 (2024)","DOI":"10.1145\/3698322.3698324"},{"key":"10_CR20","doi-asserted-by":"crossref","unstructured":"Kampenes, V.B., et al.: A systematic review of quasi-experiments in software engineering. Inf. Softw. Technol. 51(1), 71\u201382 (2009)","DOI":"10.1016\/j.infsof.2008.04.006"},{"key":"10_CR21","doi-asserted-by":"publisher","unstructured":"LeCun, Y., Bengio, Y., Hinton, G.: Deep learning. Nature 521(7553), 436\u2013444 (2015). issn: 0028-0836, 1476-4687. https:\/\/doi.org\/10.1038\/nature14539, https:\/\/www.nature.com\/articles\/nature14539 Accessed 25 May 2024","DOI":"10.1038\/nature14539"},{"key":"10_CR22","doi-asserted-by":"crossref","unstructured":"Maranh\u00e3o, J.J., Jr., Correia, F.F., Guerra, E.M.: Can chatgpt suggest patterns? an exploratory study about answers given by AI-assisted tools to design problems. In: International Conference on Agile Software Development, pp. 130\u2013138. Springer, Cham (2024)","DOI":"10.1007\/978-3-031-72781-8_14"},{"key":"10_CR23","unstructured":"Marques, V.S.S.: DevBots can co-design APIs. arXiv:2312.05733 [cs]. December 2023. http:\/\/arxiv.org\/abs\/2312.05733 Accessed 17 May 2024"},{"key":"10_CR24","unstructured":"Mathews, N.S., Nagappan, M.: Test-driven development for code generation. arXiv:2402.13521 [cs]. February 2024. http:\/\/arxiv.org\/abs\/2402.13521 Accessed 11 May 2024"},{"key":"10_CR25","unstructured":"McCarthy, J., et al.: A proposal for the dartmouth summer research project on artificial intelligence, 31 Aug 1955. AI Mag. 27(4), 12 (2006)"},{"key":"10_CR26","doi-asserted-by":"publisher","unstructured":"Mitchell, T.J., Creasey, D.P.: Evolutionary sound matching: a test methodology and comparative study. In: Sixth International Conference on Machine Learning and Applications (ICMLA 2007). Cincinnati, OH, USA, pp. 229\u2013234. IEEE, December 2007. isbn: 978-0-7695-3069-7. https:\/\/doi.org\/10.1109\/ICMLA.2007.34, http:\/\/ieeexplore.ieee.org\/document\/4457236\/ Accessed 25 May 2024","DOI":"10.1109\/ICMLA.2007.34"},{"key":"10_CR27","doi-asserted-by":"publisher","unstructured":"Mock, M., Melegati, J., Russo, B.: Generative AI for test driven development: preliminary results. arXiv:2405.10849, May 2024. arXiv:2405.10849, https:\/\/doi.org\/10.48550\/arXiv.2405.10849, http:\/\/arxiv.org\/abs\/2405.10849","DOI":"10.48550\/arXiv.2405.10849"},{"key":"10_CR28","unstructured":"Ozdemir, S.: quick start guide to large language models: strategies and best practices for using ChatGPT and other LLMs. eng. OCLC: 1432719739. [Place of publication not identified]: Addison Wesley Professional 2023. (2023). isbn: 978-0-13-819933-3"},{"key":"10_CR29","doi-asserted-by":"crossref","unstructured":"Piya, S., Sullivan, A.: LLM4TDD: best practices for test driven development using large language models. arXiv:2312.04687 [cs]. December 2023. http:\/\/arxiv.org\/abs\/2312.04687 Accessed 18 May 2024","DOI":"10.1145\/3643795.3648382"},{"issue":"3","key":"10_CR30","doi-asserted-by":"publisher","first-page":"211","DOI":"10.1007\/s11263-015-0816-y","volume":"115","author":"O Russakovsky","year":"2015","unstructured":"Russakovsky, O., et al.: ImageNet large scale visual recognition challenge. Int. J. Comput. Vision 115(3), 211\u2013252 (2015). https:\/\/doi.org\/10.1007\/s11263-015-0816-y","journal-title":"Int. J. Comput. Vision"},{"key":"10_CR31","unstructured":"Shen, Y., et al.: HuggingGPT: solving AI Tas ks with ChatGPT and its Friends in Hugging Face"},{"key":"10_CR32","doi-asserted-by":"crossref","unstructured":"Spadini, D., et al.: To mock or not to mock? an empirical study on mocking practices. In: 2017 IEEE\/ACM 14th International Conference on Mining Software Repositories (MSR), pp. 402\u2013412. IEEE. (2017)","DOI":"10.1109\/MSR.2017.61"},{"key":"10_CR33","doi-asserted-by":"publisher","first-page":"18","DOI":"10.7250\/csimq.2022-31.02","volume":"31","author":"D Staegemann","year":"2022","unstructured":"Staegemann, D., et al.: A literature review on the challenges of applying test-driven development in software engineering. Complex Syst. Inf. Model. Quart. 31, 18\u201328 (2022)","journal-title":"Complex Syst. Inf. Model. Quart."},{"key":"10_CR34","doi-asserted-by":"publisher","unstructured":"Shafiq Surameery, N.M., Shakor, M.Y.: Use chat gpt to solve programming bugs. In: International Journal of Information technology and Computer Engineering, vol. 31, pp. 17\u201322, January 2023, issn: 2455\u20135290. https:\/\/doi.org\/10.55529\/ijitc.31.17.22, https:\/\/journal.hmjournals.com\/index.php\/IJITC\/article\/view\/1679 Accessed 17 May 2024","DOI":"10.55529\/ijitc.31.17.22"},{"key":"10_CR35","doi-asserted-by":"crossref","unstructured":"Thomas, J., Harden, A.: Methods for the thematic synthesis of qualitative research in systematic reviews. BMC Med. Res. Methodol. 8(1), 1\u201310 (2008)","DOI":"10.1186\/1471-2288-8-45"},{"key":"10_CR36","unstructured":"White, J., et al.: A prompt pattern catalog to enhance prompt engineering with ChatGPT. arXiv:2302.11382 [cs]. February 2023. http:\/\/arxiv.org\/abs\/2302.11382 Accessed 25 May 2024"}],"container-title":["Lecture Notes in Business Information Processing","Agile Processes in Software Engineering and Extreme Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/978-3-031-94544-1_10","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,2]],"date-time":"2025-06-02T22:02:36Z","timestamp":1748901756000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/978-3-031-94544-1_10"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025]]},"ISBN":["9783031945434","9783031945441"],"references-count":36,"URL":"https:\/\/doi.org\/10.1007\/978-3-031-94544-1_10","relation":{},"ISSN":["1865-1348","1865-1356"],"issn-type":[{"type":"print","value":"1865-1348"},{"type":"electronic","value":"1865-1356"}],"subject":[],"published":{"date-parts":[[2025]]},"assertion":[{"value":"29 May 2025","order":1,"name":"first_online","label":"First Online","group":{"name":"ChapterHistory","label":"Chapter History"}},{"value":"XP","order":1,"name":"conference_acronym","label":"Conference Acronym","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"International Conference on Agile Software Development","order":2,"name":"conference_name","label":"Conference Name","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Brugg-Windisch","order":3,"name":"conference_city","label":"Conference City","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Switzerland","order":4,"name":"conference_country","label":"Conference Country","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"2025","order":5,"name":"conference_year","label":"Conference Year","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"2 June 2025","order":7,"name":"conference_start_date","label":"Conference Start Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"5 June 2025","order":8,"name":"conference_end_date","label":"Conference End Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"26","order":9,"name":"conference_number","label":"Conference Number","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"xpu2025","order":10,"name":"conference_id","label":"Conference ID","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"https:\/\/www.agilealliance.org\/event\/xp-2025\/","order":11,"name":"conference_url","label":"Conference URL","group":{"name":"ConferenceInfo","label":"Conference Information"}}]}}