Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
In the ideal world you have a nightly build, creating your entire solution from scratch, running all the automated tests that come with standard NAV and so on.
During business hours you basically want the same thing but a lot faster, you want to have feedback about your modifications as quickly as possible and running all the tests might be unnecessary and it’s very much time consuming.
You might have seen this sneaky little option when you add test codeunits to your suite:
Btw: the last two options only pop up if you have at least one record in table 130406 CAL Test Coverage Map.
So what do we have to do to get this to work?
Before you can take advantage of the last two options you should run all the available tests but before that make sure that the ‘Update Test Coverage Map’ setting on your test suite is set to true.
When this setting is active the CAL Test Runner will start/stop the Code Coverage tool for each test codeunit, loop table 2000000049 Code Coverage and store the unique combinations of
Test Codeunit ID, Object Type, Object ID in the CAL Test Coverage Map table.
Because of the fact that the Code Coverage table is a virtual table, all the data will be lost when you close your session, however the CAL Test Coverage Map table is stored in the database so we can retrieve tests based on modified/selected objects!
Retrieving them based on the modified flag in the object table is also a weakness because your objects will most likely come from a source control system and you’ll never store them as modified.
But there are plenty of workarounds, for example:
– write your own filter function before hooking into the GetTestCodeunitsForObjects function in codeunit CAL Test Management (unfortunately it’s local)
– use the Set-NAVApplicationObjectProperty cmdlet to (temporarily) set the modified property to true before importing your objects into the database.
Business Applications communities