1 of 11

Testing Methodologies in Microservice Architecture

Microservices

2 of 11

Agenda

  • Purpose of the Microservices Testing?
  • Understanding the Architectural objectives for the Testing
  • Devising the strategy
  • Qualification Methodology of Microservices
  • Pinch about Quality Engineering methodology (Vector based Quality Engineering Pattern)

3 of 11

Purpose of the Microservices Testing?

  • Releasing a “Failure proof” product for Domain Testers

MS1

MS2

MS3

Qualification for Engineering Quality

Qualification for Customer Quality

Goal = 0 Defects on engineering quality

SDET

Tester

4 of 11

Understanding the Architectural objectives for Testing

  • Modularity
  • Testability
  • Suitability
  • Deployability
  • Scalability
  • Resilience

5 of 11

Devising the Strategy

  • Adjusting the Test Vector

E.g. Test Pyramid < E2E Tests, Integration Tests, Unit Tests>

Enrollment Qualification /Alpha Qualification

Integrated Qualification /Beta Qualfication

Test Acceptance

Microsservice Test Adaptation

Test Vector for Msrv < 100, 100, 20>

6 of 11

Devising Strategy - Microservice enrollment qualification

  • Quality Vector :

<Modularity,Testability, Suitability,Deployability,Scalability, Resilience>

  • Test Methodology : Contract Driven Testing

C

Contract

P

Consumer

Provider

C

Contract

Mock

7 of 11

Devising Strategy - Microservice enrollment qualification Contd

  • Quality Vector <Modularity ,Testability, Suitability, Deployability…….> :

Enrollment Process: Alpha Qualification:

  • Verify (QA) the Test Contracts (e.g. Fine-grained Modularity)
  • Develop the Test Hypothesis for the Provider (Mock Service)
  • Write Contract Tests (API Tests)
  • Validate the Test Contract (100% Test Coverage, e.g. Branch Coverage)
  • Deployment of the Provider (Alpha Qualification)
  • Re- Run the Test Contract (Validation of the Deployment, Suitability, Testability)
  • Qualify the Microservice for Integration (Alpha Test Qualified)

8 of 11

Devising Strategy - Microservice enrollment qualification Contd

  • Quality Vector <Modularity ,Testability, Suitability, Deployability…….> :

Enrollment Process: Beta Qualification:

  • Verify (QA) the Integration Test Contracts/Client App Contracts. (e.g. Client to Backend Integrations) Verification points: Decoupling level
  • Develop the Test Hypothesis for the Provider (Mock Service)
  • Write Contract Tests (API Tests)
  • Validate the Client App Contracts (100% Test Coverage, e.g. Branch Coverage)
  • Integrate the Providers (Incrementally/Bingbang)
  • Re- Run the tests for all Client App Contracts (Validation of Modularity (Decoupling),Deployment, Suitability, Testability)
  • Qualify for the EcoSystem (100% Integration Coverage)

9 of 11

Devising Strategy - Beta Qualification Contd

Enrollment Process: Beta Qualification/Integration Qualification:

Process :

P

C

Contract

Mock Service for EcoSystem

P

Keep adding the providers

Contract

Continue the process until all the micro services are integrated

After the Beta Qualification, Beta Suite is the CI Suite

10 of 11

Quality Engineering Methodology

  • Quality Vector <Modularity ,Testability, Suitability, Deployability…….> :

Vector

Target

Actual

Variance

RCA

Enforcement

Modularity

Regression Defects = 0

2

2

E.g. Review Checklist,

Testability

Branch Coverage 100%

80%

20%

E.g. Sonar Check-In process

Suitability

Dev/QA Leakage = 0

5%

5%

E.g. Test Data partitioning

Deployability

Release Frequency = 2 releases/week

4 releases/week

2

E.g. Remove External Dependencies

11 of 11

Thank You !