community postAL Developmentcommunity - not Microsoftreviewed - checked by Opus

You don't need the base app to run your unit tests

Unit tests for self-contained Business Central logic do not require the base application to run. By structuring code as isolated sub-extensions with their own app.json files and only platform dependencies, developers can significantly reduce container startup time and pipeline costs.

post Stefan Maron

Stefan Maron · 2026-05-24 · 850 words · about 4 min

"If your tests are truly testing a unit, they should not need the entire application stack as their environment."

Key points

  • Isolate business logic and its tests in sub-extensions with no application dependency, only platform dependency
  • Use nested app.json files as compilation scopes - the AL compiler picks up only the app.json at the root folder it targets
  • Deploy isolated sub-extensions to containers without the base app to match test scope with environment scope
  • Test pipeline execution time reduced from 8 minutes to under 2 minutes by eliminating unnecessary base app overhead
  • This pattern mirrors Microsoft’s own application stack structure but requires code to be architected for isolation from the start

Quotes

  • “If your tests are truly testing a unit, they should not need the entire application stack as their environment.” (This principle establishes why isolated testing is both valid and efficient - it’s fundamental to unit test philosophy)
  • “Eight minutes down to under two is not a marginal improvement. It changes how often you run tests and how fast you can iterate.” (Quantifies the practical benefit, showing that performance gains directly impact development workflow and feedback loops)

Context

  • Features: sub-extension compilation, isolated test environments, base app removal, container configuration, pipeline optimization
  • Versions: 27, 28

Source: Stefan Maron, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.