DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Building Scalable Real-Time Apps with AstraDB and Vaadin
Register Now

Trending

  • How To Approach Java, Databases, and SQL [Video]
  • Building a Flask Web Application With Docker: A Step-by-Step Guide
  • 5 Key Concepts for MQTT Broker in Sparkplug Specification
  • Why You Should Consider Using React Router V6: An Overview of Changes

Trending

  • How To Approach Java, Databases, and SQL [Video]
  • Building a Flask Web Application With Docker: A Step-by-Step Guide
  • 5 Key Concepts for MQTT Broker in Sparkplug Specification
  • Why You Should Consider Using React Router V6: An Overview of Changes
  1. DZone
  2. Data Engineering
  3. Data
  4. Microservices With a Monolithic Style of Testing — Part 1

Microservices With a Monolithic Style of Testing — Part 1

Here, a software engineer discusses the necessary change of testing strategies when companies are transitioning from monolithic to microservices architecture.

Chirag Naik user avatar by
Chirag Naik
·
Sep. 21, 18 · Opinion
Like (7)
Save
Tweet
Share
5.85K Views

Join the DZone community and get the full member experience.

Join For Free

In times when there are thousands of organizations vying for their existence in a competitive world, faster rollouts of a feature in their respective domains are of the utmost priority. To overcome this problem, the adoption of microservices architecture in small and large-scale companies is growing at an exponential rate. But, this architectural shift requires altogether a new pair of glasses to look at how development, testing, and delivering a product differs from a regular monolithic gigantic service. In my previous post, I briefly talked about how a developer plays an important role in enabling the real benefits of using microservice architecture over a monolith. In this post, I will briefly talk about why there is a growing need to make a change in terms of testing strategies when companies are transitioning from monolithic to microservices architecture.

By definition, a transition to microservices from a monolith involves breaking a monolithic application or service into more logical, isolated components. Let's take an example here: a product which can book tickets for different trains. In the monolithic world, there will be a single application with a UI (User Interface) and backend code, which will do business logic (and talk to a database), bundled up in a single deployable artifact. 

Monolith Service

In the microservice world, there will be a minimum of two different applications bundled up in two different deployable artifacts, one with a UI and other with a backend service which will do business logic (and talk to a database). 

Image title

This transition from monolith to microservices will help in delivering UI or backend changes INDEPENDENTLY (this is in caps, bold, and italics for a purpose). This is perfect in terms of architecture and development for the faster rollouts, but this transition will require altogether different testing strategy.

In other words, if they are independent services, then why not test them individually for faster feedback and fewer failure points to debug? For a monolithic diagram, running a test only has two failure points: either the UI/backend or database is not behaving as it is supposed to.

Now consider, if the same testing strategy as used in the monolith is used to test services in a microservices diagram, failure points have increased from two to three. That means more time required to debug and pinpoint which component is the culprit. More time to debug means slower rollouts of features, which is not what we are intending to do. 

In more complex systems, where there will be more than 30-40 microservices and each service is talking to its own databases, event handlers, logging mechanisms, etc, failure points are just going to multiply. Also, managing different environments for testing with so many microservices will be cumbersome. We can conclude here that a monolithic style of testing is not going to bear fruits for the microservice style of architecture.

For now, just give a thought to how can we treat them independently with testing glasses on. In my next post, I will talk about how we can break down the monolithic style of testing like we do for architecture.

microservice

Opinions expressed by DZone contributors are their own.

Trending

  • How To Approach Java, Databases, and SQL [Video]
  • Building a Flask Web Application With Docker: A Step-by-Step Guide
  • 5 Key Concepts for MQTT Broker in Sparkplug Specification
  • Why You Should Consider Using React Router V6: An Overview of Changes

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: