ŁUKASZROSŁONEK
TESTING MICROSERVICESARCHITECTURE
ABOUT ME:
# Senior Test Engineer
# TestDetective.com
MONOLITHARCHITECTURE
ISSUES:# application scalability# technology stack commitment# reversed learning curve# development process# single point of failure
MICROSERVICESARCHITECTURE
PROS:# independent development# continuous deployment# scalability# technology diversity# fault isolation
WHAT’S THE RUSH ?
HTTP REQUEST- RESPONSE
client
db
POST
GET ValidationService/NewUser
REST / JSON APIPOST /NewUser
{ name: “John”, surname: “Snow”, address: { city: “Winterfell”, land: “Seven Kingdoms” }}
UserService:
201 Created{ UserId: “1”}
TESTING STRATEGIES
UNIT TESTING
ORM
API
DOMAIN
SERVICE
EXTERNAL CLIENTS
WHAT’S THE PROBLEM ?
INTEGRATION TESTING
ORM
API
DOMAIN
SERVICE
EXTERNAL CLIENTS
DB
WHAT’S THE PROBLEM ?
CONTRACT TESTING
E2E / FUNCTIONALTESTS
END-2-END TESTINGCHALLENGES
# test releases stability# network calls issues
# external services debugging
END-2-END TEST PATTERNS
# as few as possible# focus on user perspective# user perspective != GUI# test environment as code
PERFORMANCE TESTING
DESIGN FOR FAILURE
TAKEAWAYS
# no silver bullet
# automate your checks
# test contracts
# design for failure
Q&A
# [email protected]# twitter.com/TestDetective# testdetective.com