If I run specific tests with Debug Test context menu in VSCode, nothing happens.
If I run an individual test file that includes TestItem@testitem things break with missing packages etc.
I’m assuming setting up a debugger and unit tests should be very well documented. Is the TestItemRunner package abandoned, there is no docs there, not even mentioning the fact that the imported modules need to go inside the individual @testitems or they won’t be loaded.
Maybe someone can recommend a better and more useful setup to have VSCode + local test / debugger + CI runner
I’ve used TestItems on a few previous packages but just yesterday was unable to get it to discover tests in a new package, “Package | None 0.0s”. Reverting to standard Tests, I am able to run them in test/runtests.jl and via Pkg.test(), but julia-vscode does not detect or run them.
Something seems to be broken, but it’s a little hard to trace through vscode.
Overall my experience with the TestItems package is it’s just broken and not well documented / supported. I hit another bug where using Pkg inside the tests doesn’t work, which is rather useful to get metadata for the package you are testing like it’s path etc. I will give the standard testing a shot and live without the VSCode runner, just curious whats the Julia ecosystem recommended approach, seems like testing is very fragmented and kinda left behind.
UPDATE: debugging the runtests.jl file with regular Test.jl tests also doesn’t work, breakpoints are skipped… I find it hard to believe that the best way is to copy paste a test into a runnable file and debug that every time, there must be a better way ? Does this merrit a bug report in TestItemRunner.jl ?
awesome, thanks, just in time
I’ll just note for others here that for me it only started working from julia-1.11.0-rc1
(it is not working with Julia 10.4 for me)