Run and evaluate test suites

Completed

Focused AL tests prove the review policy's own rules. A semiautomated release check also runs relevant standard tests and records results through the Business Central Test Tool.

Prepare a compatible sandbox

Run tests in a Business Central online sandbox, not a production environment. Test code can change data and can invoke integrated behavior. Use a company and integrations that are safe for testing.

The test framework, test runner, test libraries, and standard application tests are separate apps. Their availability and versions depend on the Business Central environment. In Extension Management, review the installed apps and coordinate with the environment administrator to install the test apps that match the sandbox version. Use your organization's supported artifact or package source. Don't upload test apps from a different product version.

Before you add a test-library dependency, obtain its exact id, publisher, name, and version from the installed package or its downloaded symbol. An .app or symbol package contains an app.json manifest that provides the authoritative dependency record. This approach avoids relying on example globally unique identifiers (GUIDs) that can become incorrect across releases.

After the required apps are installed, use AL: Download Symbols for the test project. Confirm that the .alpackages folder contains symbols for the production app and each referenced test library. A missing symbol usually indicates a dependency mismatch, an unavailable app, or connection settings that point to the wrong environment.

Build a focused suite

Open Test Tool from Tell Me. A test suite groups the codeunits and test methods that make up a repeatable run. Create a named suite for the release or affected area instead of changing an unrelated suite.

  1. Create or select a suite with a meaningful name, such as REVIEW POLICY.

  2. Select Get Test Codeunits to add extension tests or relevant standard tests.

  3. Use a codeunit range only when the range comes from a verified app manifest or test inventory.

  4. Remove tests that don't contribute evidence for the affected area.

  5. Record the sandbox version, extension version, suite name, and selected scope.

Use impact analysis to choose standard tests. A subscriber to customer validation events can justify customer-related suites. It doesn't justify every finance, warehouse, and manufacturing test. Broader scheduled regression runs complement this focused release suite.

Run tests and interpret results

Select Run Tests for the suite, codeunit, or selected function. Test Tool records the outcome and error details for each method. Treat the result as a starting point for diagnosis:

  • A passed result means the observed behavior met the assertions for that environment and input.

  • A failed result can indicate a product regression, extension defect, missing prerequisite, dependency mismatch, or nondeterministic test.

  • A test that doesn't appear usually indicates that its app isn't installed, its codeunit doesn't have Subtype = Test, or the suite hasn't refreshed its test inventory.

Read the first actionable error and reproduce the smallest failing scope. Check setup, installed app versions, permissions, handlers, and deterministic data before changing production code. Preserve the original failure evidence, the identified cause, and the resolution.

After a correction, rerun the failed method first. Then rerun its codeunit and the complete focused suite. This progression confirms the immediate fix and detects effects on neighboring behavior.

Prove repeatability

Run the complete focused suite twice without manually repairing data between runs. Both runs should contain the same tests and outcomes. A second-run duplicate-key error, missing-record error, or changed assertion often reveals leaked data or hidden ordering dependencies.

Record these verification points:

  • The selected standard and custom test methods remain unchanged across both runs.

  • Both runs finish with the same pass or fail state for every method.

  • Test records don't require manual setup or cleanup between runs.

  • Failures include enough detail to reproduce and classify the issue.

The result is a reproducible release record rather than a one-time green status. For current environment guidance, see Testing the application.