Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CppUTest Support #276

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

CppUTest Support #276

wants to merge 23 commits into from

Conversation

SizaSL
Copy link
Contributor

@SizaSL SizaSL commented Aug 21, 2021

Add CppUTest Framework support with tests.

TODOs:

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

@matepek
Copy link
Owner

matepek commented Aug 23, 2021

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 matepek self-requested a review August 23, 2021 10:17
@SizaSL
Copy link
Contributor Author

SizaSL commented Aug 24, 2021

@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
Copy link
Contributor Author

SizaSL commented Aug 24, 2021

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

@matepek
Copy link
Owner

matepek commented Aug 24, 2021

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

@SizaSL
Copy link
Contributor Author

SizaSL commented Aug 24, 2021

@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
Copy link
Contributor Author

SizaSL commented Aug 24, 2021

@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
Copy link
Contributor Author

SizaSL commented Aug 27, 2021

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

@matepek
Copy link
Owner

matepek commented Aug 28, 2021

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

@SizaSL
Copy link
Contributor Author

SizaSL commented Aug 29, 2021

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
Copy link
Contributor Author

SizaSL commented Aug 29, 2021

@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
Copy link
Contributor Author

SizaSL commented Aug 29, 2021

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

@matepek
Copy link
Owner

matepek commented Sep 7, 2021

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
Copy link
Owner

matepek commented Oct 21, 2021

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

@SizaSL
Copy link
Contributor Author

SizaSL commented Oct 21, 2021 via email

@matepek
Copy link
Owner

matepek commented Mar 17, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants