-
Notifications
You must be signed in to change notification settings - Fork 31
Description
I have a little project with one Test executable, and wanted to try out the test adapter.
First, I had a hard time getting the discovery to work. My Test executables are commonly named ".Test.exe" and only after fiddling around I discovered (ha!) that I need to specify <FilenameFilter>\.Test$</FilenameFilter> with the $ end marker, or otherwise it wouldn't find my test executable.
After that, discovery works, with the .runsettings file co-located with the solution, after I do a full solution rebuild.
Test discovery finished: 3 Tests found in 417ms
When I run this test executable, it finishes instantly and reports 76 successful assertions.
When I try to run the tests in th test explorer via Run, it hangs forever.
The command line as reported by Process Explorer is:
"D:\myprj\bin\Debug\x64-vc143\mytst.Test.exe" --reporter xml --durations yes --input-file "D:\myprj\bin\Debug\x64-vc143\mytst.Test.exe.testcaselist.638864573819662252" --out "D:\myprj\bin\Debug\x64-vc143\mytst.Test.exe.report.638864573819662252.xml"
the content of the input file is like this:
# testcase list generated by Test Adpater for Catch2
"mytsts priorities"
"mytsts Default Blackbox Tests"
"mytsts Priority Tests"
... this matches my test names.
Output File hangs at line 18:
<?xml version="1.0" encoding="UTF-8"?>
<Catch2TestRun ... ...
<TestCase name="-redact- Default Blackbox Tests" filename="D:\-redact-\prj\mytst.Test\-redact-.Test.cpp" line="6">
<Section name="ActivateAdd" filename="D:\-redact-\prj\mytst.Test\-redact-.Test.cpp" line="10">
<Section name="Deactivate/Remove after add" filename="D:\-redact-\prj\mytst.Test\-redact-.Test.cpp" line="31">
XXX ... it is only written up to here.
Now, when I stop the test in the Test Runner GUI with the Stop 🟥 Button, I noticed that after refreshing the result file in Notepad++ it is actually now written to completion, and contains successfully run 76 test cases:
... ...
</TestCase>
<OverallResults successes="76" failures="0" expectedFailures="0" skips="0"/>
<OverallResultsCases successes="3" failures="0" expectedFailures="0" skips="0"/>
</Catch2TestRun>
When I run that command line manually in cmd.exe in runs to completion successfully.