Mid Sweden University

miun.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
Contract Testing: Ensuring Reliable Integrations with Isolated Tests: Support for teams to test in isolation
Mid Sweden University, Faculty of Science, Technology and Media, Department of Computer and Electrical Engineering (2023-).
2023 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [sv]

Mikrotjänstarkitektur är den senaste trenden inom mjukvaruutveckling som gör det möjligt att bygga komplexa system från mindre tjänster utformade för att vara självförsörjande och fokuserade på en specifik affärsfunktionalitet. Dessa kan utvecklas, testas, driftsättas och skalas oberoende av varandra, vilket gör att team kan vara mer autonoma och leverera värde till kunder snabbare. Bolagsverket är i processen att övergå till en arkitektur baserad på mikrotjänster men dess långa historia av omfattande end-to-end-tester som är komplexa att sätta upp, långsamma att köra och kräver mycket resurser gör det svårt att testa att integrationerna fortsätter att fungera efter att ändringar har införts. Contract testing underlättar denna verifiering. Studien implementerar Consumer-Driven förhållningssättet till tekniken med ramverken Pact och Spring Cloud Contract med syftet att undersöka hur integrationen mellan två tjänster som kommunicerar via ett REST API kan testas isolerat, samtidigt som man säkerställer att de kommer att fortsätta att interagera som förväntas när den faktiska integrationen testas. De kvantitativa och kvalitativa resultaten från fem semistrukturerade intervjuer visar att Bolagsverket i genomsnitt skulle kunna minska tiden det tar att leverera en funktion med 24 %, öka frekvensen av distribution med 42 % och minska infrastrukturkostnader med 52 %. Det här skulle göra det möjligt att ersätta end-to-end tester tidigt i utvecklingscykeln med kontraktstester och att ha en enda testmiljö med fullständiga integrationer innan driftsättning till produktion. Tekniken har emellertid vissa inneboende kostnader och garanterar i sig inte alla fördelar med en mikrotjänstarkitektur

Abstract [en]

Microservices architecture are the latest trend in software development enabling to build complex systems from smaller services designed to be self-sufficient and focused on a specific business functionality. These can be developed, tested, deployed, and scaled independently, allowing teams to be more autonomous and deliver value to customers faster. The Swedish Companies Registration Office, Bolagsverket, is in the process of transitioning toward a microservices architecture but its long history of extensive reliance on end-to-end tests that are complex to set up, slow to run, and require plenty of resources makes it difficult to test that the integrations continue to work after changes are introduced. Contract testing facilitates such verification. The study implements the Consumer-Driven approach to this technique with the frameworks Pact and Spring Cloud Contract with the objective of investigating how the integration between two services communicating via a REST API can be tested in isolation, while ensuring that they will continue to interact as expected when the actual integration is tested. The quantitative and qualitative results from five semi-structured interviews show that, on average, the agency could decrease the time it takes to deliver a feature by 24%, increase the deployment frequency by 42%, and reduce infrastructural expenses by 52%. This would allow to replace end-toend tests early in the development cycle with contract tests, and to have a sole test environment with complete integrations before deploying to production. However, the technique has some inherent costs and on its own does not guarantee all the benefits of a microservices architecture

Place, publisher, year, edition, pages
2023. , p. 57
Keywords [en]
Java, Consumer-Driven Contract testing, Pact, Spring Cloud Contract
Keywords [sv]
Java, Consumer-Driven Contract testing, Pact, Spring Cloud Contract
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:miun:diva-48570Local ID: DT-V23-G3-009OAI: oai:DiVA.org:miun-48570DiVA, id: diva2:1773109
Subject / course
Computer Engineering DT1
Educational program
Master of Science in Engineering - Computer Engineering TDTEA 300 higher education credits
Supervisors
Examiners
Available from: 2023-06-22 Created: 2023-06-22 Last updated: 2025-09-25Bibliographically approved

Open Access in DiVA

fulltext(1926 kB)301 downloads
File information
File name FULLTEXT01.pdfFile size 1926 kBChecksum SHA-512
9a516cb4d841ec18d901b48c7ef8b211fdb536c0f957fb31abbd601ff0a7bc774adc43b79432b07889b774705e1c05943d356cfe861de1677f92711f0122f5e7
Type fulltextMimetype application/pdf

Search in DiVA

By author/editor
Hernandez, Christian
By organisation
Department of Computer and Electrical Engineering (2023-)
Software Engineering

Search outside of DiVA

GoogleGoogle Scholar
Total: 302 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: 516 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