Hi everyone,
I’m currently learning and trying to deepen my understanding of working with TestRunner codeunits in Business Central, and I have two related questions:
1. Is it possible to automatically run a TestRunner codeunit every time an extension is published to a sandbox environment?
Ideally, I’d like the TestRunner to execute immediately after publishing.
2. Can this behavior be restricted to sandbox environments only?
I want to ensure that the TestRunner runs in sandbox environments but does not execute when the extension is published to production.
I’ve looked into triggers like 'OnInstallAppPerCompany', but I’m unsure if this is the recommended approach or if there are better patterns (especially for environment-specific execution).
Has anyone implemented something similar or can suggest best practices?
Thanks in advance!