If you have already built unit tests using the %UnitTest framework, or are thinking about doing so, please take a look at InterSystems Testing Manager.
Without leaving VS Code you can now browse your unit tests, run or debug them, and view previous run results.
InterSystems Testing Manager works with both of the source code location paradigms supported by the ObjectScript extension. Your unit test classes can either be mastered in VS Code's local filesystem (the 'client-side editing' paradigm) or in a server namespace ('server-side editing'). In both cases the actual test runs occur in a server namespace.
Feedback welcome.
Don't see it in Open Exchange :) Could you please publish?
@Evgeny Shvarov
It's available on the VS Code Marketplace, which is where people would expect to find it.
Right, I'm not suggesting to remove it from there. But if you publish on Open Exchange it will let developers from InterSystems ecosystem it will help some developers to notice it.
E.g. here on Open Exchange InterSystems can find dev tools and libs that could form their development environment.
Now at https://openexchange.intersystems.com/package/InterSystems-Testing-Manag...
Thank you!
This is awesome! I've really missed this from working in other programming languages.
According to the ReadMe (v0.2.0), this extension is currently considered a "Preview". Is there a product roadmap/timeline of what needs to be done to promote it out of "preview" status?
Thanks for the positive response. IMO the main thing needed before the Preview tag gets dropped is feedback from %UnitTest users.
One motivation for publishing the Preview is the upcoming Global Summit, which I hope will be a good opportunity for in-person discussion about this extension and others. Find me at the George James Software booth in the Partner Pavilion.
Also welcome are reviews, which can be posted on Marketplace and on Open Exchange.
Tried with the project where I have ObjectScript Unittests. I call them manually with IPM and automatically with github workflow.
Testing manager is installed, I'm on a class with unit test.
Not sure though how it works?
@Evgeny Shvarov I believe the Market place link @John Murray provided has details of how to run the test (including some GIFs etc.)
https://marketplace.visualstudio.com/items?itemName=intersystems-communi...
Since you are working client-side I think you need to set a
intersystems.testingManager.client.relativeTestRoot
setting to contain the workspace-relative path to the tests folder that's showing at the beginning of the breadcrumb in your screenshot.Please see point 2 of https://github.com/intersystems-community/intersystems-testingmanager#wo...
@Evgeny Shvarov
Did my suggestion help you get started with this extension?
Hi @John Murray !
Not sure if I put it in a right place:
Says it shouldn't be here
Move it outside the `objectscript.conn` object please.
Did it:
Now it likes it, but still the testing tool doesn't see any tests. Should it be absolute path or relative to the root of repo?
Do you mind to send a PR with a working setting to the repo?
Please change this to a relative path (no leading slash).
Also, there was a bug in how it handled a "docker-compose" type of configuration.
Please try this dev build by downloading the zip, extracting the VSIX and dropping it into VS Code's Extensions view. If it works for you I will publish a new version to Marketplace.
Now it sees them:
But they ask for ^UnitTest to be setup, instructions, etc.
Could it work similar as it works in IPM as @Timothy Leavitt demonstrated?
Because with IPM I can run tests all and standalone without any settings at all - it just works.
Could the IPM be leveraged if it is presented in the repo/namespace?
Thanks for confirming the fix. I'm publishing 0.2.1 now.
Please post enhancement ideas on the repo, for better tracking.
BTW,
this setting worked:
An extension described in this announcement implements the idea Unit testing in VSCode | InterSystems Ideas
from the InterSystems Ideas Portal.
Thank you @John Murray for implementing this idea! 👏
People interested in a better testing experience in VS Code may like to support this idea I posted recently:
https://ideas.intersystems.com/ideas/DPI-I-437
@John Murray
Thank you, great news, I just voted for your idea.
General questions or comments about the extension are also welcome on this DC thread.