Comments (8)
Hi,
I've only seen that when the app fails to compile. I assume that you can compile and publish without any problem?
from al-test-runner.
Yes, I can use both rapid and normal publish via the command palette. I've taken a look at the source and it doesn't seem like anything has changed in MS's end - the names of the commands are the same.
I tried it again with only my project loaded and publishBeforeTest works - it seems like multi-root workspaces are somehow disabling this feature.
I also tried preTestCommand but it doesn't seem to output anything to the console in the multi-root workspace, so I'm guessing this line isn't getting any config from my .vscode/settings.json in the current workspace:
const config = vscode.workspace.getConfiguration('al-test-runner');
from al-test-runner.
Should config.publishBeforeTest maybe be config.get('publishBeforeTest') ? (workspaces API)
from al-test-runner.
I'm assuming you've got two apps in the workspace, Test and Prod, Test depends on Prod?
It may be that Test is being published, but not Prod. I haven't investigated but that's what I'm seeing. That used to work but seems not to in the latest version of VS Code and/or AL Language.
from al-test-runner.
I've actually been trying this with 3 apps - prod, test and a third one that's just an independent app - just in case the dependencies were causing the issue. It doesn't seem this is strictly caused by the AL Language extension but the extensibility API of vscode.
I haven't debugged this with breakpoints but vscode.workspace.getConfiguration
seems to return a WorkspaceConfiguration object which exposes the properties via the get
method - I'm guessing once you're in a multiroot workspace all properties you try to retrieve via dot-notation give you the undefined value.
Could that be the issue?
from al-test-runner.
I don't know. I've just been testing with different combinations of settings for the user, workspace and both. Everything that I have tried has worked as expected 🤔
from al-test-runner.
I finally managed to clone the repo and debug, turns out the getConfiguration
just picks the first workspaceFolder in a multi-root workspace (vscode.workspace.workspaceFolders
is an array of them and the first one seems to be picked by default: vscode.workspace.workspaceFolders[0].uri
).
getConfiguration
has a second parameter to define the scope more narrowly and it turns out this line retrieves the value correctly (in my case, vscode.workspace.getWorkspaceFolder(vscode.window.activeTextEditor.document.uri).index === 2
):
vscode.workspace.getConfiguration('al-test-runner', vscode.window.activeTextEditor.document.uri).publishBeforeTest
from al-test-runner.
Looks like you've already had to deal with this one, since you have a function called getWorkspaceFolder.
I did this change and packed into a utility function which seems to be the general pattern I saw in the extension file:
vscode.workspace.getConfiguration('al-test-runner', vscode.Uri.file(getWorkspaceFolder()));
from al-test-runner.
Related Issues (20)
- Cant debug test codeunit with <summary>
- Test run doesnt start from workspace (overrrides config.json) HOT 3
- Undefined test procedure status after successful run HOT 2
- Renaming test codeunit leaves incorrect test ranges in test item tree
- Having two launch configurations with the same name causes test run to fail
- Having two .altestrunner folders in the project causes PowerShell error
- Do not require restarting test run after selecting the launch configuration to use
- Namespaces HOT 3
- Issue finding tests when long HandlerFunctions line or test name
- FileSystemWatcher not firing events HOT 1
- Renaming test codeunit does not rediscover tests
- Code Coverage in Proecedures shows 0% HOT 2
- Extension updating the workspace config on activation HOT 1
- Cannot receive test results for test functions with double quoted names HOT 4
- Code coverage % is shown for non-test codeunits HOT 2
- Unable to launch Test Runner (InvokeMethodOnNull, PropertyNotFoundStrict) HOT 2
- Get-ContainerIsRunning always false with PowerShell 7
- One or more errors occurred. (One or more errors occurred. (Invalid JSON. The value 'x..y' is not a valid number.))
- Automatically discover test workspace folder in multiroot workspace
- Running the test in normal mode overwrites the config.json file. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from al-test-runner.