SlideShare a Scribd company logo
MICROSERVICES: BETTER FOR DEVS OR
QA'S?
Aliona Tudan, senior QA at N-iX
ABOUT MYSELF
 7-8 years in QA
 Leading teams
 BI testing
 WS testing
 Back-end auto-tests writing & maintaining
 Java, Groovy
Альона Тудан “Microservices: better for Devs or QA’s?”
Альона Тудан “Microservices: better for Devs or QA’s?”
Client
Server
WTF?
WTF?REST
Hello dear Mr.Blah,
sorry for disturbing,
could you please...
Kind regards,
...
Hello dear Mr.Blah,
sorry for disturbing,
could you please...
Kind regards,
...
SOAP
ARCHITECTURE OF COMMUNICATION
ONE LAYER
MORE
Альона Тудан “Microservices: better for Devs or QA’s?”
Альона Тудан “Microservices: better for Devs or QA’s?”
Альона Тудан “Microservices: better for Devs or QA’s?”
Microservice applications are composed of small, independently
versioned, and scalable customer-focused services that
communicate with each other over standard protocols with well-
defined interfaces.
MICROSERVICE
Альона Тудан “Microservices: better for Devs or QA’s?”
In short, the microservice architectural style is an approach to developing a
single application as a suite of small services, each running in its own
process and communicating with lightweight mechanisms, often an HTTP
resource API. These services are built around business capabilities and
independently deployable by fully automated deployment machinery.
There is a bare minimum of centralized management of these services,
which may be written in different programming languages and use different
data storage technologies.
-- James Lewis and Martin Fowler
https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-overview-microservices
https://martinfowler.com/articles/microservice-trade-offs.html
DIFFERENCES
 A monolithic app contains domain-specific functionality and is normally
divided by functional layers, such as web, business, and data.
 You scale a monolithic app by cloning it on multiple servers/virtual
machines/containers.
 A microservice application separates functionality into separate smaller
services.
 The microservices approach scales out by deploying each service
independently, creating instances of these services across servers/virtual
machines/containers.
https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-overview-microservices
REAL LIFE
REAL LIFE
REAL LIFE
private static class EventDetails {
private static final String eventHubName = "Hub";
private static final String sasKeyName = "KeyName";
private static final String sasKey = "Key";
public static EventDetailsDto getEventDetails() {
final URI endpoint;
try {
endpoint = new URI("http://url.com");
} catch (URISyntaxException e) {
throw new RuntimeException("URI is not correct. Cause: " + e.getLocalizedMessage(), e);
}
EventDetailsDto eventDetailsDto = new EventDetailsDto();
eventDetailsDto.setEndpoint(endpoint);
eventDetailsDto.setEventHubName(eventHubName);
eventDetailsDto.setSasKeyName(sasKeyName);
eventDetailsDto.setSasKey(sasKey);
return eventDetailsDto;
}
}
JAVA CODE
public class EventDetailsDto{
private URI endpoint;
private String eventHubName;
private String sasKeyName;
private String sasKey;
public EventDetailsDto() {}
public URI getEndpoint() {
return endpoint;
}
public void setEndpoint(URI endpoint) {
this.endpoint = endpoint;
}
public String getEventHubName() {
return eventHubName;
}
public void setEventHubName(String eventHubName) {
this.eventHubName = eventHubName;
}
JAVA CODE
JAVA CODE
public String getSasKeyName() {
return sasKeyName;
}
public void setSasKeyName(String sasKeyName) {
this.sasKeyName = sasKeyName;
}
public String getSasKey() {
return sasKey;
}
public void setSasKey(String sasKey) {
this.sasKey = sasKey;
}
@Override
public String toString() {
return "EventDetailsDto{" +
"endpoint=" + endpoint +
", eventHubName='" + eventHubName + ''' +
", sasKeyName='" + sasKeyName + ''' +
", sasKey='" + sasKey + ''' +
'}';
}
}
public static void sendEvent(final EventDetailsDto detailsDto, String partitionKey, byte[] payloadBytes,
String streamNamespace) {
EventHubClient ehClient = null;
EventDetailsDto eventDetailsDto = detailsDto;
try {
if (eventDetailsDto == null) {
eventDetailsDto = EventDetails.getEventDetails();
}
ConnectionStringBuilder connStr = new ConnectionStringBuilder(eventDetailsDto.getEndpoint(),
eventDetailsDto.getEventHubName(), eventDetailsDto.getSasKeyName(), eventDetailsDto.getSasKey());
EventData eventData = new EventData(payloadBytes);
eventData.getProperties().put("StreamNamespace", streamNamespace);
ehClient = EventHubClient.createFromConnectionStringSync(connStr.toString());
ehClient.sendSync(eventData, partitionKey);
} catch (Throwable throwable) {
throw new RuntimeException("There was a trouble building connection to Azure: " +
throwable.getLocalizedMessage(), throwable);
} finally {
try {
ehClient.closeSync();
} catch (ServiceBusException e) {
throw new RuntimeException("Event to Azure Event Hub was not sent. Cause: " +
e.getLocalizedMessage(), e);
}
}
}
JAVA CODE
HOW TO APPLY IN TESTS?
Simply add scripts step into SOAP UI
SOAP UI SCRIPT
import lib.PushEvent;
def eventHubName =
context.getTestCase().getTestSuite().project.getPropertyValue("eventHubName");
def sasKeyName = "Key";
def sasKey = "Blahblahblah";
endpoint = new URI("http://blah.net");
EventDetailsDto eventDetailsDto = new EventDetailsDto();
eventDetailsDto.setEndpoint(endpoint);
eventDetailsDto.setEventHubName(eventHubName);
eventDetailsDto.setSasKeyName(sasKeyName);
eventDetailsDto.setSasKey(sasKey);
String partitionKey = "uuid";
byte[] payloadBytes =
"[{"EmailAddress":"test@test.com","TemplateId":"WelcomeEmail","TimeStamp":"
2017-04-20T13:26:25","Parameters":{"SenderName":“John
Doe"},"Random":"Random"}]".getBytes("UTF-8");
String streamNamespace = "Email";
PushEvent.sendEvent(eventDetailsDto, partitionKey,payloadBytes, streamNamespace);
CONCLUSIONS
 Microservices are more expensive
 More difficult for development
 More time for settings
 Easier to test when having OOP knowledge or desire to know OOP
 More difficult to test manually because of configurations
 More progress
QUESTIONS
LINKS
 Microsoft docs
 Martin Fowler: microservices
 Microservices and Rules Engines – a blast from the past - Udi Dahan
CONTACTS
Skype: ymkocv
Facebook: ymkocv
Email: ymkocv@gmail.com

More Related Content

PDF
Ярослав Пернеровський “Побудова системи автоматизації функціональних тестів ч...
PPTX
Web service testing_final.pptx
PPTX
Testing RESTful web services with REST Assured
PPTX
Rest-Assured - легкий способ автоматизации тестирования REST
PPTX
Test your microservices with REST-Assured
PDF
Automate REST Services Testing with RestAssured
PPTX
Dependency injection
PDF
TADHack 2015 Webinar Oracle Comms & Optare
Ярослав Пернеровський “Побудова системи автоматизації функціональних тестів ч...
Web service testing_final.pptx
Testing RESTful web services with REST Assured
Rest-Assured - легкий способ автоматизации тестирования REST
Test your microservices with REST-Assured
Automate REST Services Testing with RestAssured
Dependency injection
TADHack 2015 Webinar Oracle Comms & Optare

What's hot (7)

PPT
Servicehost Customization
PDF
Server-Sent Events in Action
ODP
SCWCD 1. get post - url (cap1 - cap2 )
PDF
Building RESTful applications using Spring MVC
PDF
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
PPTX
REST Easy with AngularJS - ng-grid CRUD EXAMPLE
DOCX
Take REST
Servicehost Customization
Server-Sent Events in Action
SCWCD 1. get post - url (cap1 - cap2 )
Building RESTful applications using Spring MVC
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
REST Easy with AngularJS - ng-grid CRUD EXAMPLE
Take REST
Ad

Similar to Альона Тудан “Microservices: better for Devs or QA’s?” (20)

PPTX
Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
PPTX
Vertx - Reactive & Distributed
PDF
JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
PPTX
The Windows Runtime and the Web
PPTX
DeployR: Revolution R Enterprise with Business Intelligence Applications
PDF
SOA with C, C++, PHP and more
PPTX
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
PPTX
Quick and Easy Development with Node.js and Couchbase Server
PDF
Spring Web Services: SOAP vs. REST
PDF
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
PDF
Old WP REST API, New Tricks
PDF
PaaS Anywhere - Deploying an OpenShift PaaS into your Cloud Provider of Choice
PDF
Webservices in SalesForce (part 1)
PPTX
NodeJS
PDF
Building apps with tuscany
PDF
PPTX
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
DOCX
@@@Resume2016 11 11_v001
PPTX
PHP and Platform Independance in the Cloud
PPTX
Mean stack Magics
Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
Vertx - Reactive & Distributed
JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
The Windows Runtime and the Web
DeployR: Revolution R Enterprise with Business Intelligence Applications
SOA with C, C++, PHP and more
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
Quick and Easy Development with Node.js and Couchbase Server
Spring Web Services: SOAP vs. REST
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
Old WP REST API, New Tricks
PaaS Anywhere - Deploying an OpenShift PaaS into your Cloud Provider of Choice
Webservices in SalesForce (part 1)
NodeJS
Building apps with tuscany
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
@@@Resume2016 11 11_v001
PHP and Platform Independance in the Cloud
Mean stack Magics
Ad

More from Dakiry (20)

PDF
НАРЦИСИЗМ ЯК ПАСИВНЕ КУРІННЯ
PDF
МАНІПУЛЯЦІЇ: ХТО КОГО І ДЛЯ ЧОГО? - Інна Тіторенко
PPTX
How to run a discovery workshop
PPTX
З понеділка йду на новий проект. The tester’s version - Олександра Зубаль
PDF
Робота з текстом: від чернетки до опублікування
PPTX
Контентна стратегія в ІТ: від статті до першого ліда
PPTX
Oleh Shpyrna "Security Testing Basics: Check your Webapp for gaps before l_unch"
PPTX
Stepan Shykerynets "Power of QA (A Journey: From Hell to Heaven. Story of gr...
PDF
Микола Солопій "Selenium рулить, однак..."
PDF
Oleksandra Zubal "Project starters: test automation view"
PDF
Vladyslav Romanchenko "How to keep high code quality without e2e tests"
PPTX
Діана Пінчук "Як відрізнити авторизацію від аутентифікації та перестати бояти...
PPT
Yuriy Malyi "E2E testing organization in multi-system projects"
PPTX
Petro Tarasenko "You've become a TL. What's next?"
PDF
Roman Yakymchuk "Дослідницьке тестування. Перезапуск"
PPTX
Maryna Shulga "Mission Impossible. Впровадити тест процеси, якщо ніхто цього ...
PDF
Олексій Брошков "Мистецтво Дослідницького Тестування"
PPSX
Альона Тудан " Життя QA в ажурі"
PPTX
Андрій Степура "Тренди в публічних виступах"
PPTX
Зоряна Борбулевич "Підхід, який трансформував компанію Microsoft: ННК і його...
НАРЦИСИЗМ ЯК ПАСИВНЕ КУРІННЯ
МАНІПУЛЯЦІЇ: ХТО КОГО І ДЛЯ ЧОГО? - Інна Тіторенко
How to run a discovery workshop
З понеділка йду на новий проект. The tester’s version - Олександра Зубаль
Робота з текстом: від чернетки до опублікування
Контентна стратегія в ІТ: від статті до першого ліда
Oleh Shpyrna "Security Testing Basics: Check your Webapp for gaps before l_unch"
Stepan Shykerynets "Power of QA (A Journey: From Hell to Heaven. Story of gr...
Микола Солопій "Selenium рулить, однак..."
Oleksandra Zubal "Project starters: test automation view"
Vladyslav Romanchenko "How to keep high code quality without e2e tests"
Діана Пінчук "Як відрізнити авторизацію від аутентифікації та перестати бояти...
Yuriy Malyi "E2E testing organization in multi-system projects"
Petro Tarasenko "You've become a TL. What's next?"
Roman Yakymchuk "Дослідницьке тестування. Перезапуск"
Maryna Shulga "Mission Impossible. Впровадити тест процеси, якщо ніхто цього ...
Олексій Брошков "Мистецтво Дослідницького Тестування"
Альона Тудан " Життя QA в ажурі"
Андрій Степура "Тренди в публічних виступах"
Зоряна Борбулевич "Підхід, який трансформував компанію Microsoft: ННК і його...

Recently uploaded (20)

PPTX
New Microsoft PowerPoint Presentation - Copy.pptx
PPTX
Amazon (Business Studies) management studies
PDF
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
PDF
Elevate Cleaning Efficiency Using Tallfly Hair Remover Roller Factory Expertise
DOCX
unit 1 COST ACCOUNTING AND COST SHEET
PPTX
AI-assistance in Knowledge Collection and Curation supporting Safe and Sustai...
PDF
IFRS Notes in your pocket for study all the time
PDF
DOC-20250806-WA0002._20250806_112011_0000.pdf
PPT
Data mining for business intelligence ch04 sharda
PDF
Solara Labs: Empowering Health through Innovative Nutraceutical Solutions
PPTX
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
PPTX
svnfcksanfskjcsnvvjknsnvsdscnsncxasxa saccacxsax
PDF
Reconciliation AND MEMORANDUM RECONCILATION
PDF
Roadmap Map-digital Banking feature MB,IB,AB
PPTX
Lecture (1)-Introduction.pptx business communication
PDF
Katrina Stoneking: Shaking Up the Alcohol Beverage Industry
PDF
Laughter Yoga Basic Learning Workshop Manual
PDF
Tata consultancy services case study shri Sharda college, basrur
PPTX
Principles of Marketing, Industrial, Consumers,
PDF
Nidhal Samdaie CV - International Business Consultant
New Microsoft PowerPoint Presentation - Copy.pptx
Amazon (Business Studies) management studies
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
Elevate Cleaning Efficiency Using Tallfly Hair Remover Roller Factory Expertise
unit 1 COST ACCOUNTING AND COST SHEET
AI-assistance in Knowledge Collection and Curation supporting Safe and Sustai...
IFRS Notes in your pocket for study all the time
DOC-20250806-WA0002._20250806_112011_0000.pdf
Data mining for business intelligence ch04 sharda
Solara Labs: Empowering Health through Innovative Nutraceutical Solutions
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
svnfcksanfskjcsnvvjknsnvsdscnsncxasxa saccacxsax
Reconciliation AND MEMORANDUM RECONCILATION
Roadmap Map-digital Banking feature MB,IB,AB
Lecture (1)-Introduction.pptx business communication
Katrina Stoneking: Shaking Up the Alcohol Beverage Industry
Laughter Yoga Basic Learning Workshop Manual
Tata consultancy services case study shri Sharda college, basrur
Principles of Marketing, Industrial, Consumers,
Nidhal Samdaie CV - International Business Consultant

Альона Тудан “Microservices: better for Devs or QA’s?”

  • 1. MICROSERVICES: BETTER FOR DEVS OR QA'S? Aliona Tudan, senior QA at N-iX
  • 2. ABOUT MYSELF  7-8 years in QA  Leading teams  BI testing  WS testing  Back-end auto-tests writing & maintaining  Java, Groovy
  • 8. Hello dear Mr.Blah, sorry for disturbing, could you please... Kind regards, ...
  • 9. Hello dear Mr.Blah, sorry for disturbing, could you please... Kind regards, ... SOAP
  • 12. MORE
  • 16. Microservice applications are composed of small, independently versioned, and scalable customer-focused services that communicate with each other over standard protocols with well- defined interfaces. MICROSERVICE
  • 18. In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies. -- James Lewis and Martin Fowler
  • 21. DIFFERENCES  A monolithic app contains domain-specific functionality and is normally divided by functional layers, such as web, business, and data.  You scale a monolithic app by cloning it on multiple servers/virtual machines/containers.  A microservice application separates functionality into separate smaller services.  The microservices approach scales out by deploying each service independently, creating instances of these services across servers/virtual machines/containers. https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-overview-microservices
  • 25. private static class EventDetails { private static final String eventHubName = "Hub"; private static final String sasKeyName = "KeyName"; private static final String sasKey = "Key"; public static EventDetailsDto getEventDetails() { final URI endpoint; try { endpoint = new URI("http://url.com"); } catch (URISyntaxException e) { throw new RuntimeException("URI is not correct. Cause: " + e.getLocalizedMessage(), e); } EventDetailsDto eventDetailsDto = new EventDetailsDto(); eventDetailsDto.setEndpoint(endpoint); eventDetailsDto.setEventHubName(eventHubName); eventDetailsDto.setSasKeyName(sasKeyName); eventDetailsDto.setSasKey(sasKey); return eventDetailsDto; } } JAVA CODE
  • 26. public class EventDetailsDto{ private URI endpoint; private String eventHubName; private String sasKeyName; private String sasKey; public EventDetailsDto() {} public URI getEndpoint() { return endpoint; } public void setEndpoint(URI endpoint) { this.endpoint = endpoint; } public String getEventHubName() { return eventHubName; } public void setEventHubName(String eventHubName) { this.eventHubName = eventHubName; } JAVA CODE
  • 27. JAVA CODE public String getSasKeyName() { return sasKeyName; } public void setSasKeyName(String sasKeyName) { this.sasKeyName = sasKeyName; } public String getSasKey() { return sasKey; } public void setSasKey(String sasKey) { this.sasKey = sasKey; } @Override public String toString() { return "EventDetailsDto{" + "endpoint=" + endpoint + ", eventHubName='" + eventHubName + ''' + ", sasKeyName='" + sasKeyName + ''' + ", sasKey='" + sasKey + ''' + '}'; } }
  • 28. public static void sendEvent(final EventDetailsDto detailsDto, String partitionKey, byte[] payloadBytes, String streamNamespace) { EventHubClient ehClient = null; EventDetailsDto eventDetailsDto = detailsDto; try { if (eventDetailsDto == null) { eventDetailsDto = EventDetails.getEventDetails(); } ConnectionStringBuilder connStr = new ConnectionStringBuilder(eventDetailsDto.getEndpoint(), eventDetailsDto.getEventHubName(), eventDetailsDto.getSasKeyName(), eventDetailsDto.getSasKey()); EventData eventData = new EventData(payloadBytes); eventData.getProperties().put("StreamNamespace", streamNamespace); ehClient = EventHubClient.createFromConnectionStringSync(connStr.toString()); ehClient.sendSync(eventData, partitionKey); } catch (Throwable throwable) { throw new RuntimeException("There was a trouble building connection to Azure: " + throwable.getLocalizedMessage(), throwable); } finally { try { ehClient.closeSync(); } catch (ServiceBusException e) { throw new RuntimeException("Event to Azure Event Hub was not sent. Cause: " + e.getLocalizedMessage(), e); } } } JAVA CODE
  • 29. HOW TO APPLY IN TESTS? Simply add scripts step into SOAP UI
  • 30. SOAP UI SCRIPT import lib.PushEvent; def eventHubName = context.getTestCase().getTestSuite().project.getPropertyValue("eventHubName"); def sasKeyName = "Key"; def sasKey = "Blahblahblah"; endpoint = new URI("http://blah.net"); EventDetailsDto eventDetailsDto = new EventDetailsDto(); eventDetailsDto.setEndpoint(endpoint); eventDetailsDto.setEventHubName(eventHubName); eventDetailsDto.setSasKeyName(sasKeyName); eventDetailsDto.setSasKey(sasKey); String partitionKey = "uuid"; byte[] payloadBytes = "[{"EmailAddress":"test@test.com","TemplateId":"WelcomeEmail","TimeStamp":" 2017-04-20T13:26:25","Parameters":{"SenderName":“John Doe"},"Random":"Random"}]".getBytes("UTF-8"); String streamNamespace = "Email"; PushEvent.sendEvent(eventDetailsDto, partitionKey,payloadBytes, streamNamespace);
  • 31. CONCLUSIONS  Microservices are more expensive  More difficult for development  More time for settings  Easier to test when having OOP knowledge or desire to know OOP  More difficult to test manually because of configurations  More progress
  • 33. LINKS  Microsoft docs  Martin Fowler: microservices  Microservices and Rules Engines – a blast from the past - Udi Dahan