Notifications
Announcements
No record found.
Hi Guys,
I have a problem in how to get the code coverage in x++. I try to follow the link below regarding the coverage.runsettings.
https://daxmusings.codecrib.com/2019/02/repost-enabling-x-code-coverage-in.html
But it seems there is no hit objects for the code coverage.
Thank you for your response.
Regards,
CJ
Hi CJ,
Have you tried Test framework.
Please refer to this link - docs.microsoft.com/.../testing-validation
Hi Gunjan,
Thank you so much for your answer. I have already read this article but this is regarding the unit testing. I have already created the unit testing and perfectly pass but when I run the analyze code coverage it will not hit those objects. The results always 0 code coverage.
Looks like you are trying to do a code coverage for methods in a form data source extension. Are you importing a task recorder for the same?
He's running a unit test, which doesn't involve Task Recorder. You write a unit test method and execute it from Test Explorer.
Martin,
I have seen and used unit test cases for tables and classes, creating and deleting dummy data, I am not sure how it is used for form code.
I was going through the link and saw that we can create a test module to manage form adapters. Is there any way we can use the unit tests to test form datasource methods?
Form adapters were deprecated a few years ago. You can find examples of code in the blog post where Microsoft announced the replacement: type providers.
Nevertheless he said he's able to run the test. The problem is code coverage.
Has anyone found a solution to this problem?
I have the exact same issue, unit tests run , but code coverage returns empty results generated.
Thanks.
I am getting code coverage in VS 2019. I have performed the following steps
<ModulePath>.*ABCModel.*</ModulePath>
Module path section will look like as below
<ModulePaths>
<Include>
</Include>
</ModulePaths>
Hope this will help
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 451 Most Valuable Professional
André Arnaud de Cal... 428 Super User 2025 Season 2
BillurSamdancioglu 239 Most Valuable Professional