Add Autorun test on save
Opened this issue · 2 comments
It is unclear if autorun is supported or not by this extension, it's not mentioned but it appears in some parts of the sources. I never used autorun before in VSCode, so I may be mistaken on how it works. My guess is that the tests marked as autorun should run on file save. I don't expect much autodetection magic to know which tests to run depending on the file saved, so it would be okay if all tests marked were run on save.
My current layout looks like this:
src/
├── linked4
│ ├── mod.rs
│ └── test.rs
├── linked5
│ ├── mod.rs
│ └── test.rs
└── main.rs
So the tests are in a separate file from the module. I've tried to save the test file or the mod file. Nothing happens. I can't find any option in any extension to enable this. My guess the support should be provided in this extension but I might be wrong.
For the time being I added Alt-S as a keybinding to run all the tests, so I can do Ctrl-S ; Alt-S; to trigger a save, then test.
hi @deavid, this is not an implemented feature. You can view the list of currently supported features for this extension here.
We'd certainly consider adding this feature one day (I believe the Mocha Test Explorer extension has it), but for now it's a low priority feature relative to other items on the backlog, especially since there are alternative ways to achieve the result in the interim.
Thanks for the request!
Hi,
Hope this helps someone,
I got it to run on save with this extension: https://marketplace.visualstudio.com/items?itemName=pucelle.run-on-save
Config:
"runOnSave.commands": [
{
"match": ".*\\.rs$",
"command": "test-explorer.run-all",
"runIn": "vscode"
}
]