SlideShare a Scribd company logo
Testing Microservices-a real example
May 24
2
iLottery PLatform
● iLottery Platform built in a microservices architecture
● Java, Spring framework, Cassandra
● Kubernetes, Docker
2
3
Test Pyramid
3
● Stage 1: Automated Unit Tests
● Stage 2: Functional Component tests-
Automated tests against a service with ALL its
dependent services (Platform AND 3rd-party
mocked)
● Stage 3: Platform Integration Tests -
Automated Tests run against the platform
(without web app or admin portal) and 3rd-
party ONLY mocked
● Stage 4: System integration tests - Automated
tests of our platform with web app and admin
but 3rd-parties are mocked.
4
Unit tests
● Technology facing tests
● These are tests against Java classes.
● The boundary is the class
● No build can be done if line, branch, complexity coverage is
less than 80%
4
● Functional component tests-
Automated tests against a service
with ALL its dependent services
(Platform AND 3rd-party mocked)
● Web app, Admin Portal and
backend services are tested in
isolation
● They are triggered with every
merge to master
● If these tests fail then no version
is created, so service is not
deployed
5
Functional Component Tests
5
● Platform Integration Tests -
Automated Tests run against the
platform (without web app or
admin portal) and 3rd-party
ONLY mocked
● Tests that check the integration of
platform services
● They run every 3 hours from 8:00
till 20:00 UK time
● They run against latest stable
versions of services (i.e. services
where functional component tests
are passed)
6
Platform Integration Tests
6
● These are E2E tests
● Automated Tests run against the
Excalibur platform (with webapp
or admin portal) and 3rd-party
ONLY mocked
● They run every 3 hours from 8:00
till 20:00 UK time
● They run against latest stable
versions of services (i.e. services
where functional component tests
are passed)
7
System Integration Tests
7
● These are tests that check how
the platform behaves in case of
errors in http calls
● Wiremock was used with its proxy
ability
● Failure injection of wiremock was
used
● They run against latest stable
versions of services (i.e. services
where functional component tests
are passed)
8
Reconciliation tests
8
{
"request" : {
"urlPath" : "/api/play",
"method" : "POST"
},
"response" : {
"status" : 504
}
}
9
Reconciliation tests
9
10
Tools used
● For UI tests
Geb(http://www.gebish.org/),
Spock test framework were
used
● Web app and admin
functional component tests
● System Integration Tests
10
● For API testing Spock test
framework, groovy REST
client and a custom
framework wascreated
● Wiremock was used for
stubbing external
dependencies
● Functional Component Tests
for BE services
● Platform Integration tests
11
Software Engineer in Test
● A developer role focusing in testability of the platform
● Implement automated tests
● Review automated tests implemented by devs
● Implement test tooling
● Responsible for test environments (Kubernetes cluster in
AWS)
● Implement test APIs
11
12
Lessons learned
● Introduce Contract driven testing-
Spring Cloud Contract integrates
with Spock and Wiremock
● QA and SET need more
collaboration
12
● Layered test suites
parallelized testing and
decreased execution time
● Less UI tests meaned
increased stability
Thank you!

More Related Content

PPTX
Testing microservices
PDF
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
PPTX
Introduction to robot framework
PDF
Api testing
PPTX
Test automation proposal
KEY
Testing Flex RIAs for NJ Flex user group
PDF
ATDD Using Robot Framework
PPTX
ALM@Work - Unit testing in Visual studio 2012
Testing microservices
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
Introduction to robot framework
Api testing
Test automation proposal
Testing Flex RIAs for NJ Flex user group
ATDD Using Robot Framework
ALM@Work - Unit testing in Visual studio 2012

What's hot (20)

PPTX
B4usolution performance testing
DOC
Implementing checkpoint in qtp
PDF
Robot Framework Dos And Don'ts
PDF
Make sure your code works
PPTX
Unquoted service path exploitation
PDF
Continuous Integration with Mozmill
PDF
Mozilla: Mozmill meets L10n
PDF
Test automation design patterns
PDF
EFL QA: Where Are We and Where Should We Go?
PDF
Mozilla: Automated Mozmill Tests
KEY
Mozmill Crowd
PDF
Crowd-sourced Automated Firefox UI Testing
PPTX
Robot a quick automation frame work
PDF
Continuous Quality with Postman
PPTX
Sonar qube to impove code quality
PPTX
BitBucket Pull request vs Crucible
PPT
Alina Cojocariu - Flex and Android tests with Ranorex
PPTX
Wt3 designing apis
PDF
Efficient mobile automation
PPTX
Mockoon - Create mock APIs in seconds
B4usolution performance testing
Implementing checkpoint in qtp
Robot Framework Dos And Don'ts
Make sure your code works
Unquoted service path exploitation
Continuous Integration with Mozmill
Mozilla: Mozmill meets L10n
Test automation design patterns
EFL QA: Where Are We and Where Should We Go?
Mozilla: Automated Mozmill Tests
Mozmill Crowd
Crowd-sourced Automated Firefox UI Testing
Robot a quick automation frame work
Continuous Quality with Postman
Sonar qube to impove code quality
BitBucket Pull request vs Crucible
Alina Cojocariu - Flex and Android tests with Ranorex
Wt3 designing apis
Efficient mobile automation
Mockoon - Create mock APIs in seconds
Ad

Similar to Konstantinos Sidiropoulos - Testing microservices a real example (20)

PDF
Testing microservices
PDF
Test Strategies for Microservices with Christoph Ebeling
PPTX
Testing.pptx
PDF
Testing Microservices
PDF
Microservice Test Strategy (@Bonn Code Meetup)
PPTX
Microservices testing strategy-v2
PPTX
Presentation
PDF
Testing Java Microservices Using Arquillian Hoverfly Assertj Junit Selenium A...
PDF
Microservices. Test smarter, not harder. Voxxed Days 2019
PPTX
microservice testing tools and technologies
PPTX
Testing strategies in microservices
PDF
How_to_create_modular_microservice_test_projects.pdf
PPTX
Ups and downs of contract testing in real life
PDF
Microservices testing in distributed systems
PPTX
Testing your app
PPTX
Testing Microservices Architecture
PPTX
Functional Testing of RESTful Applications
PDF
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
PDF
Pragmatic Java Test Automation
PPTX
Microservice test strategies for applications based on Spring, K8s and Istio
Testing microservices
Test Strategies for Microservices with Christoph Ebeling
Testing.pptx
Testing Microservices
Microservice Test Strategy (@Bonn Code Meetup)
Microservices testing strategy-v2
Presentation
Testing Java Microservices Using Arquillian Hoverfly Assertj Junit Selenium A...
Microservices. Test smarter, not harder. Voxxed Days 2019
microservice testing tools and technologies
Testing strategies in microservices
How_to_create_modular_microservice_test_projects.pdf
Ups and downs of contract testing in real life
Microservices testing in distributed systems
Testing your app
Testing Microservices Architecture
Functional Testing of RESTful Applications
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Pragmatic Java Test Automation
Microservice test strategies for applications based on Spring, K8s and Istio
Ad

Recently uploaded (20)

PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Welding lecture in detail for understanding
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPT
Mechanical Engineering MATERIALS Selection
PDF
Well-logging-methods_new................
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
additive manufacturing of ss316l using mig welding
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
composite construction of structures.pdf
PPTX
Geodesy 1.pptx...............................................
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Lecture Notes Electrical Wiring System Components
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Model Code of Practice - Construction Work - 21102022 .pdf
Foundation to blockchain - A guide to Blockchain Tech
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Welding lecture in detail for understanding
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
R24 SURVEYING LAB MANUAL for civil enggi
Mechanical Engineering MATERIALS Selection
Well-logging-methods_new................
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
additive manufacturing of ss316l using mig welding
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
composite construction of structures.pdf
Geodesy 1.pptx...............................................
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Lecture Notes Electrical Wiring System Components
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
CH1 Production IntroductoryConcepts.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd

Konstantinos Sidiropoulos - Testing microservices a real example

  • 2. 2 iLottery PLatform ● iLottery Platform built in a microservices architecture ● Java, Spring framework, Cassandra ● Kubernetes, Docker 2
  • 3. 3 Test Pyramid 3 ● Stage 1: Automated Unit Tests ● Stage 2: Functional Component tests- Automated tests against a service with ALL its dependent services (Platform AND 3rd-party mocked) ● Stage 3: Platform Integration Tests - Automated Tests run against the platform (without web app or admin portal) and 3rd- party ONLY mocked ● Stage 4: System integration tests - Automated tests of our platform with web app and admin but 3rd-parties are mocked.
  • 4. 4 Unit tests ● Technology facing tests ● These are tests against Java classes. ● The boundary is the class ● No build can be done if line, branch, complexity coverage is less than 80% 4
  • 5. ● Functional component tests- Automated tests against a service with ALL its dependent services (Platform AND 3rd-party mocked) ● Web app, Admin Portal and backend services are tested in isolation ● They are triggered with every merge to master ● If these tests fail then no version is created, so service is not deployed 5 Functional Component Tests 5
  • 6. ● Platform Integration Tests - Automated Tests run against the platform (without web app or admin portal) and 3rd-party ONLY mocked ● Tests that check the integration of platform services ● They run every 3 hours from 8:00 till 20:00 UK time ● They run against latest stable versions of services (i.e. services where functional component tests are passed) 6 Platform Integration Tests 6
  • 7. ● These are E2E tests ● Automated Tests run against the Excalibur platform (with webapp or admin portal) and 3rd-party ONLY mocked ● They run every 3 hours from 8:00 till 20:00 UK time ● They run against latest stable versions of services (i.e. services where functional component tests are passed) 7 System Integration Tests 7
  • 8. ● These are tests that check how the platform behaves in case of errors in http calls ● Wiremock was used with its proxy ability ● Failure injection of wiremock was used ● They run against latest stable versions of services (i.e. services where functional component tests are passed) 8 Reconciliation tests 8
  • 9. { "request" : { "urlPath" : "/api/play", "method" : "POST" }, "response" : { "status" : 504 } } 9 Reconciliation tests 9
  • 10. 10 Tools used ● For UI tests Geb(http://www.gebish.org/), Spock test framework were used ● Web app and admin functional component tests ● System Integration Tests 10 ● For API testing Spock test framework, groovy REST client and a custom framework wascreated ● Wiremock was used for stubbing external dependencies ● Functional Component Tests for BE services ● Platform Integration tests
  • 11. 11 Software Engineer in Test ● A developer role focusing in testability of the platform ● Implement automated tests ● Review automated tests implemented by devs ● Implement test tooling ● Responsible for test environments (Kubernetes cluster in AWS) ● Implement test APIs 11
  • 12. 12 Lessons learned ● Introduce Contract driven testing- Spring Cloud Contract integrates with Spock and Wiremock ● QA and SET need more collaboration 12 ● Layered test suites parallelized testing and decreased execution time ● Less UI tests meaned increased stability