Test Adapter cannot find executable on Windows
See original GitHub issueDescribe the bug A clear and concise description of what the bug is. When clicking on the “play” button to run the test, it fail silently with the following error in the chrome console:
ERR spawn c:\Users\Benoit\github\Catch2Test\build\tests\catch2_test.exe ENOENT: Error: spawn c:\Users\Benoit\github\Catch2Test\build\tests\catch2_test.exe ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
To Reproduce Steps to reproduce the behavior:
I created a small test project here: https://github.com/benoxoft/Catch2Test
- Clone the project
- Compile it with cmake (I use CMakeTools in VSCode with the VS2017 compiler and a recent version of cmake. I also installed catch2 with cmake)
- Open the Developer Tools to see the console
- Click Play to run the test executable in the Test Explorer UI
- Notice the error I posted above in the console
- Copy and paste the full path of the executable in a cmd and notice that the executable exists.
Expected behavior Executable should be found and tests are run
Screenshots Here is a screenshot showing VS Code. I compiled the executable with cmake. We can see the error in the chrome console. If I copy and paste the executable in the terminal below, we can see that the executable exists.
Desktop (please complete the following information):
- Extension Version 2.0.2
- VS Code Version 1.29.1
- Catch2 Version latest from master
- OS Type and Version Windows 10
Additional context
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Glob syntax to find tests executable not work for path outside ...
The glob syntax to find tests executables ("catch2TestExplorer.executables.pattern" setting) not work when the path point to a folder outside ...
Read more >test adapter for google test test discovery failure
Hi,. The test adapter for google test cannot discover tests in a test executable if built against the Microsoft.googletest.v140.windesktop.msvcstl.dyn.
Read more >referencing MSTest.TestAdapter in dot executable ... - MSDN
I am trying to run an all included exe (created using Costura ) on a windows VM. As per an answer in this...
Read more >Unit Tests not discovered in Visual Studio 2017 - Stack Overflow
I found out that VS2017 does not install all required packages. When I tried to move my MonoGame from old PC to new...
Read more >Testing the JNDI Installation - PTC Support
The Java executable cannot be found. Option 1—Add the full path to your Java executable to your PATH environment variable. Option 2—Add the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@benoxoft got it. there is no variable:
${absDirname}
. It is a bug in package json. Use${absDirpath}
. It will work. Thanks for the issue. I’m gonna fix in in half an hour.log.txt @matepek