kth.sePublications
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
Effectiveness of software testing suites in regards to a microservice environment: Using mutation testing to analyze and evaluate unit testing in a software development team
KTH, School of Electrical Engineering and Computer Science (EECS).
2025 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
Effektivitet av test-suiter gällande för en microtjänst-mjukvarumiljö : Analys och utvärdering av enhetstester hos ett mjukvaruutvecklingsteam genom mutationstestning (Swedish)
Abstract [en]

Software testing is essential to deliver quality code in software development. Code coverage is a metric that measures how much of the code is tested. Code coverage can be calculated in several ways, for example, lines of code activated by the test or percentage of branches explored. Mutation testing is a method that tests the test suites by modifying the code and then running the test suites to see if the modification (called mutants) can be detected. A higher number of mutants detected leads to a higher mutation score. Currently, mutation testing is primarily used in research since it can be costly and complex to integrate into real-life industry software development. Previous research is divided on whether mutation score correlates with real errors in the code but most agree that is a good metric for determining test suite quality. This thesis uses mutation score to assess the correlation with different code coverage metrics for unit tests. Mutation score is compared and analyzed with branch and line coverage through regression analysis to find the correlation, R2, and t-test statistic. The mutations are also used to find if there are any recurring deficiencies in the test suites. The implementation of mutation testing in a small-scale industry development is also examined and evaluated. The experiments and evaluation are done in collaboration with a software development team at Trafikförvaltningen Region Stockholm. The team works primarily in the Java programming language in a microservice environment using cloud architecture. The results indicate that line and branch coverage are useful and correlate well with the team’s mutation score. The project’s size and structure worked well with mutation testing, and both the results and the team found value in using it. The existing metrics became more reliable, and some common errors in the test suites were found. Further research could examine integration and system tests and larger-scale code bases.

Abstract [sv]

Mjukvarutestning är en vital komponent för att kunna producera högkvalitativ kod inom mjukvaruutveckling. Det finns olika metoder för att mäta mjukvarutestning, varav en av de vanligaste är kodtäckning. Kodtäckning är ett mått som kan beräknas på olika sätt, till exempel antal kodrader aktiverade av testerna eller hur många grenar av koden som utforskas. En annan metod är genom mutationstestning. Metoden introducerar modifieringar (mutanter) i koden och kör testerna för att undersöka om mutanterna kan upptäckas. Desto fler som upptäcks bidrar till högre mutationspoäng och indikerar noggranna tester. För närvarande så är mutationstestning vanligast inom forskning då det kan vara kostsamt och komplext att introducera i industrin. Det finns även blandat resultat gällande mutationspoäng och dess korrelation med riktiga fel i kod. De flesta håller dock med om att det är ett bra sätt att mäta testkvalitet. Den här avhandlingen använder mutationstestning för att bedöma olika kodtäckningsmått för enhetstester. Mutationspoängen jämförs med radtäck- ning och grentäckning genom regressionsanalys för att hitta korrelation, R2 och t-testvärde. Mutationerna används även för att hitta vanligt förekommande brister i testerna. Implementationen av mutationstestning i ett mindre utvecklingsteam som arbetar i industrin utvärderas tillsammans med teamet. Experimenten utförs tillsammans med en mjukvaruutvecklingsteam som arbetar på Trafikförvaltningen Region Stockholm. Teamet arbetar främst med programmeringsspråket Java i en microtjänsmiljö med en molnarkitektur. Resultaten från denna studie indikerar att täckningsmåtten korrelerar väl med mutationspoängen. Strukturen och storleken på kodbasen lämpar sig väl för mutationstestning. Både resultaten och teamet finner värde i metoden och tycker att nuvarande täckningsmått får mer betydelse efter jämförelsen. En del återkommande fel i testerna kunde även hittas. Framtida arbete skulle kunna expandera till integrations- och systemtest eller andra kodbaser i större skala.

Place, publisher, year, edition, pages
2025. , p. 58
Series
TRITA-EECS-EX ; 2025:40
Keywords [en]
Software testing, Mutation testing, Code coverage
Keywords [sv]
Mjukvarutestning, Mutationstestning, Kodtäckning
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-361848OAI: oai:DiVA.org:kth-361848DiVA, id: diva2:1948932
External cooperation
Trafikförvaltningen Region Stockholm
Supervisors
Examiners
Available from: 2025-04-04 Created: 2025-04-01 Last updated: 2025-04-04Bibliographically approved

Open Access in DiVA

fulltext(982 kB)34 downloads
File information
File name FULLTEXT02.pdfFile size 982 kBChecksum SHA-512
5cfdd0aeb5101e1815c615888da2814036088d9e276ef64a67d602caa19f10bfb284d27e57c0c8bca3eba82353933d9e9eb72b4405aa1cb3fc0bb51d23fefcf3
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 34 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: 312 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