jimmymcp / al-test-runner

VS Code Extension to help run AL tests against Business Central container
https://jpearson.blog/al-test-runner-for-visual-studio-code/
MIT License
11 stars 16 forks source link

Config.json location or last.xml #37

Open epernst opened 3 years ago

epernst commented 3 years ago

Hi James, I'm testing the test runner with my BC v14. It works fine, if I use the default setup where it puts the .altestrunner and config.json in the app root folder. But when I then try to publish the app again after running the test, then the AL compiler fails, because it thinks that last.xml is another permission xml file.

When I then move the .altestrunner folder into the apps parent folder, then I can compile/publish, but when running the test runner again, then it cannot find the config.json and creates a new empty file.

Our workspace/repo folder is like this: \Apps\OurApp\app.json \Apps\OurApp\source \Apps\OurApp\tests

It creates the config.json in \Apps\OurApp.altestrunner, while I would like it to be in either \Apps.altestrunner or .altestrunner to avoid the compiler problem.

Note: Tests and regular objects are in the same app when using VSCode, since v14 does not like having it in two Apps. We split the files as part of our build pipeline.

jimmymcp commented 3 years ago

Hi,

Apologies, I broke this in 0.5.5 for single-root workspaces attempting to improve things for multi-root workspaces. Should be fixed in 0.5.6

The last.xml issue is annoying. I don't know if there is a way to tell the AL compiler not to break all xml files as permission files. It's only a warning though isn't it? It doesn't stop the app from being built?

epernst commented 3 years ago

It does stop the compilation. But if we were able to move the .altestrunner folder to a folder above the app.json, then the problem would go away.