Polylith
  • Polylith
  • Introduction
    • Sharing code
    • Testing incrementally
    • Polylith in a Nutshell
  • Architecture
    • Workspace
    • Component
    • Base
    • Project
    • Development project
    • Bring it all together
    • Simplicity
  • Tool
    • Overview
  • Conclusion
    • Current architectures
    • Advantages of Polylith
    • Transitioning to Polylith
    • Why the name "Polylith"?
    • Videos
    • FAQ
    • Who made this?
Powered by GitBook
On this page
Export as PDF
  1. Introduction

Testing incrementally

PreviousSharing codeNextPolylith in a Nutshell

Last updated 1 year ago

The Polylith architecture can support incremental testing if we build tools for it.

The illustrations here are based on the previous page. Now let's see how we can test code incrementally in Polylith.

Here are our bricks. If only the red brick is changed…

…we can calculate which services and bricks that are affected, by checking how the bricks depend on each other:

Because the red brick is changed, we know that we need to execute the tests for the red, yellow, and blue bricks, from service A, because they are all directly or indirectly affected by the change. The green and purple bricks are not affected and we can therefore skip testing them.

Tests that are run incrementally run faster as we usually don’t need to run the entire test suite. This applies both when we run tests locally and in the CI build.

An example of a tool that supports incremental testing is the for .

poly tool
Clojure
Sharing code