vscode-catch2-test-adapter icon indicating copy to clipboard operation
vscode-catch2-test-adapter copied to clipboard

CppUTest Support

Open SizaSL opened this issue 3 years ago • 15 comments

Add CppUTest Framework support with tests.

TODOs:

  • [ ] make it work without junit-report-merger
  • [x] fix TODO comments
  • [x] fix Manual Cpp debugging

SizaSL avatar Aug 21 '21 06:08 SizaSL

Hello, It's cool that you made this PR and I don't wanna kill your mood just I need more time to review and adjust a bit. Meanwhile you can pack, install and use your branch with npm run package. It will create a ___.vsix file which can be installed. (maybe you need to uninstall the extension first)

matepek avatar Aug 23 '21 10:08 matepek

@matepek Can you please elaborate more about the task you created?

  1. What is the reason not to use junit-report-merger?
  2. I used the following debug,configTemplate settings and seems to debug fine, "testMate.cpp.debug.configTemplate": { "type": "cppvsdbg", "linux": { "type": "cppdbg", "MIMode": "gdb" }, "darwin": { "type": "cppdbg", "MIMode": "lldb" }, "win32": { "type": "cppvsdbg" }, "program": "${exec}", "args": "${argsArray}", "cwd": "${cwd}", "env": "${envObj}", "environment": "${envObjArray}", "sourceFileMap": "${sourceFileMapObj}", } Let me know what is your issue with manual debugging?

SizaSL avatar Aug 24 '21 04:08 SizaSL

@matepek

Figured what you meant by Manual Cpp test. My implementation is base on v3.6.36 and I've been using it via .vsix package for my own projects until I merge with the new v3.6.27 just before my PR. I just ran Integration tests after I merged with the new v3.6.27. I will figure out what changes in v3.6.27 break my code and will commit my fix soon.

SizaSL avatar Aug 24 '21 09:08 SizaSL

Hello, I didn’t mean giving you tasks by that just started to write a list to myself. But if you know what I meant and can fix it even better :) I will elaborate when I can. (My life is pretty busy nowadays but don’t want to abandon this project.)

matepek avatar Aug 24 '21 09:08 matepek

@matepek Not a problem. I'm having a bit of free time now. I don't mind trying it out. Will let you know if I need your support.

SizaSL avatar Aug 24 '21 09:08 SizaSL

@matepek I just downloaded your master branch (e03c017), tried to build and did Manual Cpp test doesn't work with same error. So I can confirm the problem is in latest master. Error

SizaSL avatar Aug 24 '21 11:08 SizaSL

@matepek I have found and fixed the bug in your master which failing the extension during start or activation time. That is the bug that failed to run Manual Cpp debugging. I have created a separate PR for that fix. This PR should be fine once the other PR has merged. Let me know your test result?

SizaSL avatar Aug 27 '21 15:08 SizaSL

Would you explain to me why you need the junit in case of enabledTestListCaching?

matepek avatar Aug 28 '21 20:08 matepek

Would you explain to me why you need the junit in case of enabledTestListCaching?

CppUTest -ln (list of test names) options don't include any test metrics. On the other side -ojunit option provided the popular junit output xml which includes all sorts of useful test metrics especially the source file path and line number needed for our case otherwise there won't be "Show source" option next to the tests or test result indications on the related source files. The only problem is CppUTest -ojunit doesn't support single xml output file instead it will create multiple junit xml test output files for every test group in single test source or executable. So we don't know which test output xml file belongs to which executable file. That's why I have used junit-report-merger to merge them all and saved it with the name corresponding to it's executable file so you know which cache xml file belongs to which executable and simple/easy for tests parsing. My work projects include multiple xml test output files created by CI/CD pipeline so I can easily and safely delete these cache files when needed, such as create tasks for clearing TestListCaches.

SizaSL avatar Aug 29 '21 02:08 SizaSL

@matepek I think adding support for a new test framework should be considered as at least a minor version change, not just a patch or build whatever you considered for the last number in your version.

SizaSL avatar Aug 29 '21 02:08 SizaSL

@matepek I have created a new branch for your last commit which has a merge conflict, failed integration test and breaking functionality of the implemented feature. I just like to keep my master as clean and functional as possible for myself, my colleagues and other people. Take your time for reviewing and testing this PR. I don't mind waiting and let me know if you have any questions or need any assistants.

SizaSL avatar Aug 29 '21 02:08 SizaSL

I had some thought on this framework and I don't really like that they don't have a proper listing support where the location is shown. Moreover the new vscode testing api only supports readonly uri?: Uri; which would require special handling again.

Wondering that isn't it a better choice adding this "advanced" test listing functionality to the cpputest ..

matepek avatar Sep 07 '21 09:09 matepek

Hey. Sorry, This new vscode-test-api development brings all my time spending on the extension. Refactoring, simplifying, adding some cool features like stream processing. After it's done your task is the next. pinky swear

matepek avatar Oct 21 '21 09:10 matepek

Hi there,

No problem at all. I released beta version on my repo and using it. Take your time. Cheers!

Regards

On Thu, 21 Oct 2021, 10:02 pm Mate Pek, @.***> wrote:

Hey. Sorry, This new vscode-test-api development brings all my time spending on the extension. Refactoring, simplifying, adding some cool features like stream processing. After it's done your task is the next. pinky swear

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/matepek/vscode-catch2-test-adapter/pull/276#issuecomment-948406192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2GL2B5M4DRDCKS4JBNSELUH7JJNANCNFSM5CRQMXWA .

SizaSL avatar Oct 21 '21 10:10 SizaSL

Wondering that isn't it a better choice adding this "advanced" test listing functionality to the cpputest ..

Hey,

Let me know if the CppUTest can support those basic features. 🙂

matepek avatar Mar 17 '23 05:03 matepek