code-d icon indicating copy to clipboard operation
code-d copied to clipboard

Support unit testing UI

Open WebFreak001 opened this issue 5 years ago • 3 comments

See:

https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer for UI

https://github.com/atilaneves/unit-threaded and https://code.dlang.org/packages/silly for functionality

WebFreak001 avatar Nov 23 '19 15:11 WebFreak001

Would be this more easy if Silly supported xunit/junit XML output format ?

Zardoz89 avatar May 04 '21 20:05 Zardoz89

test discovery is already implemented through libdparse, just needs test running now. (has the advantage that you don't have to recompile)

However vscode is currently in the process of adding a new official test provider API so I will wait until that is there

WebFreak001 avatar May 04 '21 20:05 WebFreak001

Also d-unit (https://code.dlang.org/packages/d-unit) is quite interesting here. It is very similar to JUnit (Java) and also has as JUnit compatible XML output. It has also means to just list the unit tests without running them. Therefore it would by quite easy to integrate it, show the available tests VSC UI and also run a single test.

Find a small sample project using d-unit here https://andre2007.github.io/d-tips/dub/application_template/

andre2007 avatar Jan 29 '22 12:01 andre2007