question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test Adapter cannot find executable on Windows

See original GitHub issue

Describe 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

  1. Clone the project
  2. 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)
  3. Open the Developer Tools to see the console
  4. Click Play to run the test executable in the Test Explorer UI
  5. Notice the error I posted above in the console
  6. 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.

image

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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
matepekcommented, Nov 20, 2018

@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.

1reaction
benoxoftcommented, Nov 20, 2018
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found