Acceptance test library Code generation wizard
The Acceptance test library (ATL) code generator quickly generates and updates new ATL entities, queries, and specifications, based on tables and data entities.
Create the AtlEntity class by using the wizard
Follow these steps to create the AtlEntity
class by using the Code generation wizard.
- In Microsoft Visual Studio, open the table in the designer window.
- Right-click the name of the table, and then, on the Add-ins menu, select Generate ATL Entity.
- Select the fields that should be included in the
AtlEntity
class, and then select Add. - Rename the entity and the fields as you require.
- Select Generate to create the class.
Additional optional steps
When you create the AtlEntity
class, you can also complete these tasks:
Add required actions for the scenario.
Add a
default
method toAtlData
classes.Override the
setMainRecordField
method to call themodifiedField(_fieldId)
method on the table.protected void setMainRecordField(FieldId _fieldId, anytype _value) { super(_fieldId, _value); common.modifiedField(_fieldId); }
Create the AtlQuery class by using the wizard
Follow these steps to create the AtlQuery
class by using the Code generation wizard.
- In Visual Studio, open the table in the designer window.
- Right-click the name of the table, and then, on the Add-ins menu, select Generate ATL Query.
- Select the fields and relations that should be included in the
AtlQuery
class, and then select Add. - Rename the query, the fields, and the relations as you require.
- Select Generate to create the class.
Additional optional steps
When you create the AtlQuery
class, you can also add a query
method to the AtlData
class that returns an instance of the AtlQuery
class that you created earlier in this article.
Create the AtlSpec class by using the wizard
Follow these steps to create the AtlSpec
class by using the Code generation wizard.
- In Visual Studio, open the table in the designer window.
- Right-click the name of the table, and then, on the Add-ins menu, select Generate ATL Specification.
- Select the fields that should be included in the
AtlSpec
class, and then select Add. - Rename the specification and the fields as you require.
- Select Generate to create the class.
Additional optional steps
Add a spec
method to the data class that returns an instance of the AtlSpec
class that you created earlier in this article.