Skip to content

Unable to run tests on already published apps (Global scope) #8244

@Thomas-Torggler-EOS

Description

@Thomas-Torggler-EOS

1. Describe the bug
When running tests through the new BC28 test runner forces a deploy of the app being tested before running tests. It does so in Developer-Mode. If I already have the app deployed through other means (PowerShell or API) I cannot use the test runner because it fails with the following error:

[2026-04-27 10:56:20.16] The request for path /local28/dev/apps?SchemaUpdateMode=synchronize&DependencyPublishingOption=ignore failed with code UnprocessableEntity. 
Reason: The extension could not be deployed because it is already deployed as a global application or a per tenant application. 
The extension that is already deployed is <redacted> by <redacted> 28.0.0.0 published as Global application.

I understand that publishing the app first ensures that the code that is ran/tested is effectively the one currently present in VS Code. This should be configurable though, so it becomes the developers job to ensure this. This wouldn't force me into a workflow that I don't want or can apply.

2. To Reproduce

  1. Publish an app via PowerShell in global scope
  2. Try to run a test from VS Code

3. Expected behavior
Two options basically. One does not exclude the other:

  1. If the app being tested is already deployed into a global scope (and therefore a development-deploy is not possible), do not attempt to re-deploy it, give a warning rather. Thus, run tests on the already deployed app. It is my responsibility to ensure the correct one is deployed.
  2. Add a setting where I can configure if a pre-test deployment should be done. This allows me to disable it for my use cases.

4. Actual behavior
Running a test will always attempt a deploy first. This adds a series of problems/requirements that aren't strictly necessary.

5. Versions:

  • AL Language: 18.0.2293710
  • Visual Studio Code: 1.117.0
  • Business Central: 28.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions