test automation architecture in microservices

27
TEST AUTOMATION ARCHITECTURE IN MICROSERVICES Alper Mermer

Upload: alper-mermer

Post on 19-Mar-2017

81 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Test Automation Architecture in Microservices

TEST AUTOMATION ARCHITECTURE IN MICROSERVICES

Alper Mermer

Page 2: Test Automation Architecture in Microservices

TESTING RELATED ISSUES IN MICROSERVICES

Services are built and deployed independentlyServices talk to each other to accomplish things

Builds and deploys are automatedData is not centralized

Cross functionals need to be tested way before the endTests need to be executed way earlierTests need to be executed way later

Page 3: Test Automation Architecture in Microservices

THE INFAMOUS TEST AUTOMATION PYRAMIDE

Page 4: Test Automation Architecture in Microservices

INTERNAL TESTS

Page 5: Test Automation Architecture in Microservices

EXTERNAL TESTS

Page 6: Test Automation Architecture in Microservices

SERVICES ARE BUILT AND DEPLOYED INDEPENDENTLY

You can’t depend on other services to be up

Page 7: Test Automation Architecture in Microservices

SERVICES ARE BUILT AND DEPLOYED INDEPENDENTLY

Use test doubles to resolve your dependenciesMountebank

Page 8: Test Automation Architecture in Microservices

SERVICES ARE BUILT AND DEPLOYED INDEPENDENTLY

Your tests should be able to run in isolationDocker

Page 9: Test Automation Architecture in Microservices

SERVICES TALK TO EACH OTHER TO ACCOMPLISH THINGS

Keep the communication between your services alive

Page 10: Test Automation Architecture in Microservices

SERVICES TALK TO EACH OTHER TO ACCOMPLISH THINGS

Create Consumer Driven Contract Tests between servicesPact

Page 11: Test Automation Architecture in Microservices

BUILDS AND DEPLOYS ARE AUTOMATED

You don’t have a buffer time between builds

Page 12: Test Automation Architecture in Microservices

BUILDS AND DEPLOYS ARE AUTOMATED

Multiple layers of testing

Layered path to production deployment

Blue - Green deployments

Canary releases

Page 13: Test Automation Architecture in Microservices

BUILDS AND DEPLOYS ARE AUTOMATED

Repeatable environments Vagrant, Puppet, Chef, Ansible, Docker

Page 14: Test Automation Architecture in Microservices

DATA IS NOT CENTRALIZED

You have to manage each test data seperatelyEach test creates its own data

Page 15: Test Automation Architecture in Microservices

DATA IS NOT CENTRALIZED

Each test data should be unique accross the test suiteEach test deletes only the data it created

Page 16: Test Automation Architecture in Microservices

CROSS FUNCTIONALS NEED TO BE TESTED WAY BEFORE THE END

Again, you can’t wait until everything is completed

Page 17: Test Automation Architecture in Microservices

CROSS FUNCTIONALS NEED TO BE TESTED WAY BEFORE THE END

Put in automated performance tests in your CDPJmeter, Gattling, Locust

Page 18: Test Automation Architecture in Microservices

CROSS FUNCTIONALS NEED TO BE TESTED WAY BEFORE THE END

Put in automated security checks in your CDPOWASP ZAP, OWASP Dependency Check, W3af

Page 19: Test Automation Architecture in Microservices

TESTS NEED TO BE EXECUTED WAY EARLIER

Tests aren’t the responsibility of the testers aloneYou need to start testing right away

Page 20: Test Automation Architecture in Microservices

TESTS NEED TO BE EXECUTED WAY EARLIER

You should minimize testing things as a wholeEnd to End (E2E) tests

Page 21: Test Automation Architecture in Microservices

TESTS NEED TO BE EXECUTED WAY EARLIER

Implement Journey TestsSelenium, Capybara, Sahi, Appium

Page 22: Test Automation Architecture in Microservices

TESTS NEED TO BE EXECUTED WAY LATER

See what’s going on in productionMonitor things

Page 23: Test Automation Architecture in Microservices

TESTS NEED TO BE EXECUTED WAY LATER

Analyze trends and problems on productionHave some tests which are run in production

Page 24: Test Automation Architecture in Microservices

TESTS NEED TO BE EXECUTED WAY LATER

Be a Quality Analyst

Page 25: Test Automation Architecture in Microservices

COMMON PITFALLS

Don’t use a fixed recipeBuild your architecture

incrementallyKeep your architecture

alive

Page 26: Test Automation Architecture in Microservices

BOOK SUGGESTIONS

Building Microservices - Designing Fine-Grained Systems, Sam Newman

Infrastructure as Code - Managing Servers in the Cloud, Kief Morris

Page 27: Test Automation Architecture in Microservices

THANK YOUQuestions ?

[email protected]

@alpermermer

@test_hive