Open MohammedUbaid-eaton opened 2 years ago
Hi, you first need to set up the paths in the settings as described here: https://github.com/bneumann/CppUTest-Test-Adapter#setup
After you set the test executable path the plugin will automatically detect the tests inside it and show the in the test explorer
I'm not clear what is meant by "test executable". What kind of file would that be? (.exe or something else?). Is this a file CppUTest provides? I'm on a Mac, just trying to run the tests from James Grenning's book. I can run them from the command line, but see no tests in VS Code.
Well if you compile your test code you should get an executable (i guess the one you are running?). That is your test executable. If you set it in the paths of this extension it should be used to identify your tests.
OK, thanks, I found the executable, and have settings.json correctly configured now. Still no tests showing up in the Test Explorer. Any ideas about what else might be wrong?
You are completely right, I just tried it again (after years to be honest) and it didn't work. I will look into it
Okay I found the culprit and will release a new version today evening. Funny enough I think not a lot people are using this extension because you could actually add multiple files likes so
"cpputestTestAdapter.testExecutable": "test1.exe;test2.exe"
but not like this
"cpputestTestAdapter.testExecutable": "test1.exe"
I never wrote tests (shame on me) for the settings parser, so one of the last PRs got through breaking the default behaviour.
Thanks for adressing this issue
Thank you very much for finding the problem! Looking forward to the fix in the new version.
No problem, i am a bit short on time recently (like in the past 2 years I guess). So it always takes some time to get things done. I just uploaded the latest version 1.3.1. Let me know if it works now
OK, that is definitely an improvement. I'm seeing things in the test explorer for the first time. However, I'm now getting an ERROR_LOADING_TESTS
Here is what I have in settings.json: "cpputestTestAdapter.testExecutable": "${workspaceFolder}/t0/t0_tests", "cpputestTestAdapter.testExecutablePath": "${workspaceFolder}/t0"
That double quote character at the end looks suspicious. Would that still be something going on with the parser?
That is odd, this text is loaded from the executable name itself. it worked with my local test executable file. Is the log showing anything helpful? I will check the commits if i fat fingered something in the code :)
Any update on this? And sorry, I just noticed you aksed if the log is showing anything. Where would I find that?
I have similar problems with this issue.
Here is the software I am running:
I previously had the ERROR LOADING TESTS error, but I resolved that by pointing to the correct executable.
I now get this other weird message:
I get a similar "error" message when i run it from the terminal
Here is the result in the output window
When I run the executable without the parameters, here is the output:
My belief is that the tool tries to run the executable with some parameters.
My question is: does the this tool add some parameters which I am not aware?
Thank you for any help you can provide
Hi,
I installed CppUTest on vscode & also installed dependency Test UI Explorer
I do not understand how to get started.
I have a .cpp file on which i need to run unit tests,
Kindly guide.