New resources available on Microsoft Learn
Did you know that Microsoft Learn offers free training modules to assist you on your path to mastering Dynamics 365 for Finance and Operations? Become an expert at your own pace or share with your team to foster growth.
Dynamics 365 2019 release wave 2 plan Discover the latest updates to Dynamics 365.Release Plan | Weekly Deployment Notes
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 and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
The day is finally here. The Acceptance Test Library is made publicly available with 10.0.2.
So what is it? It is nothing short of the best productivity feature you'll get this decade as an X++ engineer.
More concretely it is a library of around 5000 classes that makes it really simple to author quality X++ tests. These are the exact same classes that Microsoft uses internally for our testing. It is so powerful, that I often find myself writing a test to repro a bug, instead of going through the UI. The test is repeatable, debuggable and prevents regressions, whereas manual navigation of the UI is time wasted.
The ATL framework is designed for Acceptance Test Driven Development, a powerful idea where acceptance tests are defined and implemented before the production coding begins. Making the tests pass become the goal of the sprint.
You can now write a test like this:
// Get a reference to a well-known warehouse
var warehouse = data.invent().warehouses().default();
// Create a new item with the "default" setup using the item creator class. Adjust the default warehouse before saving the item.
var item = items.defaultBuilder().setDefaultWarehouse(warehouse).create();
// Add on-hand (information about availability of the item in the warehouse) by using the on-hand adjustment command.
// Create a sales order with one line using the sales order entity
var salesOrder = data.sales().salesOrders().createDefault();
var salesLine = salesOrder.addLine().setItem(item).setQuantity(10).save();
// Reserve 3 units of the item using the reserve() command that is exposed directly on the sales line entity
// Verify inventory transactions that are associated with the sales line using the inventoryTransactions query and specifications
Notice how precise it is. One line to add on-hand for an item, one line to create a sales order, etc. That is because the API is fluent, a pattern we are not using much in X++ - but which is used throughout ATL.
This preciseness also invites for specification as example, where instead of writing requirement specification documentation, you write examples. If you write these examples using ATL, then you can run the examples as tests, and if they pass you know the system behaves according to specification. No more stale documentation or manual test.
Embrace ATL - you will not regret it.
Getting this ready for 10.0.2 was a substantial endeavor, and a few piece didn't make it into this MU, but will make it into the next one(s). This includes sample tests and the code generation wizard. Stay tuned for updates.
Learn more here:
THIS POST IS PROVIDED AS-IS; AND CONFERS NO RIGHTS.
I have just created a 10.0.2 development VM, but I am not sure of the steps to follow in order to get started with ATL. Where is the library? How do I reference it? Could not find articles on the net to guide me.
Is Microsoft going to ship the standard test classes as well that are used internally for unit testing different scenarios ?
This is very good news. Seems we can now stop development of our own version of this.
Business Applications communities