Test Automation Architecture in Microservices
-
Upload
alper-mermer -
Category
Technology
-
view
84 -
download
2
Transcript of Test Automation Architecture in Microservices
![Page 1: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/1.jpg)
TEST AUTOMATION ARCHITECTURE IN MICROSERVICES
Alper Mermer
![Page 2: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/2.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/3.jpg)
THE INFAMOUS TEST AUTOMATION PYRAMIDE
![Page 4: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/4.jpg)
INTERNAL TESTS
![Page 5: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/5.jpg)
EXTERNAL TESTS
![Page 6: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/6.jpg)
SERVICES ARE BUILT AND DEPLOYED INDEPENDENTLY
You can’t depend on other services to be up
![Page 7: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/7.jpg)
SERVICES ARE BUILT AND DEPLOYED INDEPENDENTLY
Use test doubles to resolve your dependenciesMountebank
![Page 8: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/8.jpg)
SERVICES ARE BUILT AND DEPLOYED INDEPENDENTLY
Your tests should be able to run in isolationDocker
![Page 9: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/9.jpg)
SERVICES TALK TO EACH OTHER TO ACCOMPLISH THINGS
Keep the communication between your services alive
![Page 10: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/10.jpg)
SERVICES TALK TO EACH OTHER TO ACCOMPLISH THINGS
Create Consumer Driven Contract Tests between servicesPact
![Page 11: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/11.jpg)
BUILDS AND DEPLOYS ARE AUTOMATED
You don’t have a buffer time between builds
![Page 12: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/12.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/13.jpg)
BUILDS AND DEPLOYS ARE AUTOMATED
Repeatable environments Vagrant, Puppet, Chef, Ansible, Docker
![Page 14: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/14.jpg)
DATA IS NOT CENTRALIZED
You have to manage each test data seperatelyEach test creates its own data
![Page 15: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/15.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/16.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/17.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/18.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/19.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/20.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/21.jpg)
TESTS NEED TO BE EXECUTED WAY EARLIER
Implement Journey TestsSelenium, Capybara, Sahi, Appium
![Page 22: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/22.jpg)
TESTS NEED TO BE EXECUTED WAY LATER
See what’s going on in productionMonitor things
![Page 23: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/23.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/24.jpg)
TESTS NEED TO BE EXECUTED WAY LATER
Be a Quality Analyst
![Page 25: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/25.jpg)
COMMON PITFALLS
Don’t use a fixed recipeBuild your architecture
incrementallyKeep your architecture
alive
![Page 26: Test Automation Architecture in Microservices](https://reader033.fdocuments.net/reader033/viewer/2022042907/58ce5b0f1a28ab2f268b499f/html5/thumbnails/26.jpg)
BOOK SUGGESTIONS
Building Microservices - Designing Fine-Grained Systems, Sam Newman
Infrastructure as Code - Managing Servers in the Cloud, Kief Morris