polylith

ppandis 2024-12-30T17:05:09.556009Z

Hello everybody. I'm testing how to move an existing micro-services architecture to polylith. We use Leiningen currently and have tests marked as :unit, :component, :integration which we run using lein test :unit etc. I have done some search online and from what I gather it is not possible to get the same behavior with the default test runner? Would using an external runner be a solution? I have not yet searched all the features of the available external runners but I'd like to check if anyone has attempted anything similar before I dive in further. Ideally I'd like to stick with the default runner but does that mean that I should only have unit test in components/bases and integration tests only in projects?

seancorfield 2024-12-30T17:32:14.968229Z

You can do that with the external test runner: https://github.com/seancorfield/polylith-external-test-runner?tab=readme-ov-file#test-configuration But, note that poly test by default only runs tests that depend on code that has changed since the last stable tag, so you may find incremental testing is sufficient. Our CI test time dropped dramatically once we moved to Polylith, although it is nice to also have the metadata-based control over certain tests.

ppandis 2024-12-30T17:44:03.651159Z

Thank you dear Sean! I've already spotted your test runner and had it it my to-do list 😉 I'll try and get it working with our setup.