Unable to run tests on already published apps (Global scope)
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
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
- Publish an app via PowerShell in global scope
- Try to run a test from VS Code
3. Expected behavior
Two options basically. One does not exclude the other:
- 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.
- 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
Internal work item: AB#634186
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by publishing an app globally through PowerShell, then running a test from the VS Code test runner against Business Central 28.x. Trace the runner's pre-test deployment behavior and determine how the existing global deployment is detected or configured. Done means tests can run without the conflicting deployment, with the requested warning or setting behavior covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, vscode
- Domain
- developer-experience, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100