Overview
This article describes the interface that is used to create Tests. Tests are stored as Dynamics records and are edited via a specially adapted form.
Tests are added to a Solution to allow for easy transport between Dynamics instances.
Configuration pane
Register tab
Test Plan Name
The name of the Test Plan. Test Plans group together Test Suites.
Test Suite Name
The name of the Test Suite. Test Suites group together Test Cases.
Test Case Name
The name of the Test Case. Test Cases are used to validate your logic and processes.
Sync or Async
Select Sync to test synchronous (real time) processes, and Async to test asynchronous processes.
Async Wait Period (Mins)
Enter the delay, in minutes, that the Test should wait between creating test records and evaluating the Asserts.
Solution Deployment
Select the unmanaged Dynamics solution to associate the Test for deployment. The Test is added as a XML web resource to the selected solution to allow for easy transport between Dynamics instances.
Category and Sub-Category
The purpose of these fields is to allow you to add metadata about the Test which can be used for grouping and sorting in list views.
Functions tab
If you need to manipulate data when it is being created you can use the power of over 450 functions. For example, to add a random number to a field you can use the Random() function. Search and select functions from this tab.
Source tab
From the Source tab you can reference xCache records, Global Calculations, Global Actions, Test Data, view Test Results, and access/reference the Assemble, Arrange, Act, and Assert sheets.
Explore tab
Explore System Data
Data can be automatically added to the Arrange and Assert sheets in two ways:
- By selecting individual records - select an entity, refine the returned records results using the search, then select the record(s) and click the lightning bolt button
- By using FetchXML queries - define the FetchXML queries on the Global FetchXML sheet, then select DP FetchXml Queries from the Explore System Data drop down list, select the desired FetchXML queries and and click the lightning bolt button. This will add the data from all records returned by the FetchXML query to the selected Sheet.
Explore Data Model
Expand the Explore Data Model section to search for specific entities. Expand the Entities node, then an Entity to show all the attributes.
Fetch-Xml tab
The Fetch-Xml tab shows any FetchXML queries defined on the Global FetchXML sheet.
Test editor pane
Default Sheets
There are seven default Sheets when a Test is created: Assemble, Arrange, Act, Assert, Global Calculations*, Global Actions* and Global FetchXml*.
* these sheets are hidden by default and can be revealed by pressing F4, or right-clicking on any sheet and selecting Operations > Toggle Advanced Mode
Assemble
Describe the feature or process that you are testing using a User Story, a link to an external definition, or Gherkin language.
Arrange
One or more Arrange sheets define the Test Data to be created as part of the Test. There will be one sheet per entity type that you need to create records for. For example if you Test needs to create Accounts, Contacts and Opportunities there will be three Arrange sheets: Arrange-Account, Arrange-Contact, Arrange-Opportunity
Act
The Act sheet defines any logic that needs to be execute after the records in the Arrange sheets have been created. For example, you may need to manually trigger an on-demand Workflow/Microsoft Flow to simulate a manually step in the process being Tested.
Assert
Define the fields for which you would like to check Actual versus Expected results.
Multiple Assert sheets can be defined when asserting results from multiple records from different entities.
Global Calculations
This sheet is hidden by default but can be accessed by right-clicking on a sheet and selecting Operations > Toggle Advanced mode or pressing F4. The Global Calculations sheet lets you define 'variables' which can be used within your Test logic. Global Calculations are executed before Test Data is created.
Global Actions
This sheet is hidden by default but can be accessed by right-clicking on a sheet and selecting Operations > Toggle Advanced mode or pressing F4. The Global Actions sheet lets you define 'actions' which can be used within your Test logic. Actions are executed at the point they are used within the Test logic. TestShield automatically creates actions for Asset certain references to make them more readable on the Assert sheet.
Global FetchXml
This sheet is hidden by default but can be accessed by right-clicking on a sheet and selecting Operations > Toggle Advanced mode or pressing F4. The Global FetchXml sheet is used to define FetchXml queries that can be used for adding data to the Arrange and Assert sheet or for use within selected functions.
Command bar
Operators
This menu provides quick access to the allowed Operators that can be used within formulas.
Snippets
Selecting a Snippet adds pre-configured examples of functions/sheets to the Test.
Commands
Select from options to perform the selected command.
Syntax Check button
Validates the structure of the Test is correct.
Clear button
Clears the contents of the selected cell.
Search and Replace button
Toggles the Search and Replace fly out pane.
Execute button
Executes the Test.
Function Wizard button
Toggles the Function Wizard pane open/closed.
N52 Commands
In the command bar for the Test form there is a menu option called N52 Commands with two options:
Clone Test
Creates a copy of the Test record. After the clone has completed, the copied Test record is available in the Test list with a prefix :: added to the current Test's name.
Open Configuration
Opens the North52 Configuration record.