Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Test-Driven Development: Exploring Prompt Engineering
Blekinge Institute of Technology, Faculty of Computing, Department of Software Engineering.
Blekinge Institute of Technology, Faculty of Computing, Department of Software Engineering.
2025 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [en]

Background: Test-Driven Development (TDD) offers theoretical benefits for software quality and design but faces significant adoption challenges due to its counter-intuitive approach and steep learning curve. Recent advances in artificial intelligence (AI), particularly large language models, present opportunities to address these barriers by automating aspects of the TDD process.

Objectives: This study aimed to (1) identify key benefits and challenges of AI-assisted TDD for novice developers through systematic literature review, (2) quantify how AI assistance affects efficiency, accuracy, and test coverage compared to manual TDD, and (3) determine whether AI can help minimize the skill gap between novice and experienced developers in TDD testing.

Methods: Two methods were used to answer the questions, combining a literature review of six recent studies on AI-assisted TDD with an experimental study. The experiment involved 13 participants (8 novices, 5 experienced) who implemented a concert itinerary system using both manual and AI-assisted TDD. Performance was measured across three phases of TDD (red, green, refactoring) regarding time efficiency, test accuracy, and code coverage.

Results: Literature analysis revealed three main benefits (automation, education, quality improvement) and three key challenges (learning difficulties, technical implementation, supervision requirements) of AI-assisted TDD. Experimental results showed that AI significantly improved test writing efficiency while maintaining comparable accuracy. Code coverage showed modest improvements with AI assistance , with experienced developers gaining greater benefits than novices. Despite efficiency gains, novices using AI required substantially more refactoring time than experienced, indicating persistent understanding gaps.

Conclusions: AI assistance significantly reduces the time burden of TDD, addressing a key adoption barrier, while maintaining test quality and modestly improving coverage. However, AI creates a paradox: making TDD more accessible while potentially limiting deeper understanding development. The most effective approach integrates AI efficiency with human critical evaluation, where AI handles routine aspects while developers focus on the higher-order reasoning that makes TDD valuable. This integration represents a promising path toward wider TDD adoption in experienced software development

Place, publisher, year, edition, pages
2025. , p. 41
Keywords [en]
Test-Driven Development, Artificial Intelligence, Prompt Engineering, Software Testing
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:bth-28129OAI: oai:DiVA.org:bth-28129DiVA, id: diva2:1971520
Subject / course
PA1445 Kandidatkurs i Programvaruteknik
Educational program
PAGPT Software Engineering
Presentation
2025-05-26, C245ALC, Valhallavägen 10, 371 79, Karlskrona, 13:30 (English)
Supervisors
Examiners
Available from: 2025-06-17 Created: 2025-06-17 Last updated: 2025-09-30Bibliographically approved

Open Access in DiVA

Test-Driven Development Exploring Prompt Engineering(1320 kB)358 downloads
File information
File name FULLTEXT01.pdfFile size 1320 kBChecksum SHA-512
55b20c3ebcc5c02cb7a9df32c7638eaeb9a42e2346952104fd5a892017072ec1c5c82e81902418b17c250efd1f68ff400128931493f325ddc353b33d414407e6
Type fulltextMimetype application/pdf

By organisation
Department of Software Engineering
Software Engineering

Search outside of DiVA

GoogleGoogle Scholar
Total: 358 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 710 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf