AX – D365FO – Acceptance Test Library (ATL) Code Generation Wizard

The ATL Code Generation Wizard is a feature in the D365 Visual Studio development environment, which automatically generates Entities, Queries, and Specifications that you can use within the ATL framework. The ATL models within D365 contain objects for nearly every situation one would need to test, but with the new Wizard custom objects can be added to the test libraries coverage.

To get started using the wizard, you should create a model where the ATL objects will reside in. This will need a reference to the Acceptance Test Library Foundation model, and should only be used for your ATL code. Keeping this model separate from our customizations will allow us to omit it from production builds when we are generating packages. We also need to make sure this test has a reference to the model where the customization resides.

Once you have a model with the proper references, open the table that you wish to generate code for. Right click the object name, and expand the Addins menu. The options for generating an ATL Query, Specification, or Entity will be displayed.

dynamics 365 atl code generation wizard

In the example below, we have a simple table called els_WidgetTable, and we will generate an Entity for the table that will allow us to access it through ATL.

generate atl entity d365

Once the wizard is opened, you are able to select the fields that should be included in your structure, the name of the object, and the destination model where the new objects will be created. It is important to change the destination model to the model you created. Otherwise, you run the risk of accidentally creating objects in the read-only system models, which can be a pain to remove.

dynamics 365 acceptance test library code generation wizard

Once the field list is configured, we are able to preview the generated code prior to actually generating the artifacts. After this configuration is complete, pressing Generate will create the artifacts in the specified model, where they can then be used in ATL tests.

The code that is generated will allow to interact with custom objects just like they were part of the vanilla objects available in the ATL, setting up tests with Entities and Queries, and validating them with Specifications.

Furthermore, if you have already generated code using the wizard and add additional fields and functionality to your customizations, the wizard will detect it and allow you to update the generated ATL objects. If your organization is planning on fully embracing automated testing utilizing the ATL, maintaining the objects needed is very simple using the wizard.

dynamics 365 atl code generation wizard

The Acceptance Test Library code generation wizard is available starting in version 10.0.4, which is available now, so get out there and start testing!

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...