Test explorer integration for NatUnit in VSCode.
For this extension to work (run tests and parse results) it needs a NatUnit version which writes test results to disk in a JUnit XML format.
Additionally, there needs to be a bash script (on Linux) or PowerShell script (on Windows) within the workspace that starts the Natural process and makes sure that the test result file is copied to the expected location.
Both scripts are passed the following parameter in order:
LIBRARY
: The library the testcase resides inTESTCASE
: The name of the testcase without extension (e.g.TCSTTEST
NATPARM
: The NATPARM that the Natural process should be started withCOVERAGE
: Flag if coverage data should be recorded (currently not implemented, preview API of VSCode)
The results are expected to land in the following directory, relative to the workspace (may be configurable in the future):
build/test-results/natunit/${natparm}/${testFileLibrary}-${testCaseName}.xml
The extension has the following configurations:
natunit.script.windows
: Relative workspace path to the PowerShell script to run to invoke NatUnit on Windowsnatunit.script.linux
: Relative workspace path to the script to run to invoke NatUnit on Linuxnatunit.natparms
: Possible NATPARMs to run tests with. Will be passed to the run script.
NATPARMs need to be configured in JSON format, e.g.:
"natunit.natparms": [
"NATPARM1",
"NATPARM2"
]
Some assertion failures get parsed and rendered differently in the UI, e.g. ASSERT-STRING-EQUALS
: