Choose which optional cookies you allow. Essential cookies are always on. Your choice lasts for six months and applies to the Testgrity website and workspace.

Essential

Sign-in, security, and remembering your cookie choices.

Always on

Cookie and privacy policy. You can change or withdraw consent at any time using the Cookie button.

Designing tests

Back to the guide index

The Designer has three columns: suites and cases on the left, the selected editor in the centre, and the Action Library on the right. Manage connection-specific metadata from the database icon under Manage connections.

Test case open in the Designer

Create a suite

Suites group related test cases by business process or testing purpose and are the unit executed from the Run workspace. A suite can contain both D365 and Power Pages cases.

  1. Select New > New suite.
  2. Enter a suite name and optional description.
  3. Select Save.

Select a suite name in the left panel to edit it and review its contents. Empty suites remain visible and display No cases in this suite. Suites group business workflows and do not have a platform of their own.

The suite name is the editor heading. Expand Details to edit its name and description. Cases lists its contents and provides reorder handles. Saved or Unsaved changes appears beside Save.

Suite editor and case ordering

Delete a suite

The default suite cannot be deleted. For another suite, open the three-dot menu in the suite editor and select Delete suite. If it has linked cases, choose one of these options in Delete suite:

  • Move cases to another suite — choose a Destination suite in the same project, then select Delete suite. The cases keep their platforms. Create another suite first if there is no destination.
  • Delete the linked cases — select Delete suite and cases to permanently remove the suite and its cases. This cannot be undone.

No option is selected automatically. Choose Cancel to keep the suite and its cases.

Create a test case

  1. Select New > New case. Choose D365 / Model-driven app or Power Pages in the platform selector, which opens the matching designer regardless of the selected suite.
  2. Expand Details and enter a test case name and optional description.
  3. Select the suite that should contain the case.
  4. Add and configure actions in Steps.
  5. Select Save.

Generate a test from a description

This option appears when the installation has a valid Azure AI Foundry connection and Generate from description is enabled for the workspace. A workspace owner or administrator can change it in Settings → Generate from description; the setting saves immediately. Disabling hides the generator and blocks generation requests without changing existing test cases. Platform administrators can change the same setting in the desktop admin app’s workspace editor.

  1. Create a new D365 / Model-driven app case, select its suite, and use the connection selected in the workspace toolbar.
  2. Expand Generate from description. Write the process and exact synthetic values in Test description. Include the expected result there or in Business outcome (optional); you do not need to repeat it in both places. Leave out credentials and confidential customer data. Optional app selection and table filters are under Advanced.
  3. Select Create draft. The authoring panel dims and a spinning AI icon shows progress while AI checks the description and builds the steps. AI identifies the app and tables, checks fields, relationships, required values and outcomes, then generates the steps automatically when the description is complete. An in-app notification confirms when the draft is ready or more details are needed. Generation errors appear in an error notification and beside the description.
  4. If questions appear, update the description, Business outcome, or Advanced options and select Create draft again. For example, AI may request a contact surname or clarification of the app. Unsupported requests must be removed or authored manually. Incomplete drafts do not replace the editor's contents.
  5. A complete draft opens directly in Designer as an unsaved case. Review and edit the normal steps. Hover over, focus, or click the AI icon beside the case's type badge to view the original description and any business outcome. Press Escape, click outside, or use the popup's close button to dismiss it. These original inputs and AI provenance stay with the saved case when you edit its steps. Assumptions requiring your decision are presented as clarification questions before a draft is loaded. Unedited generated steps show an AI-generated badge until saved. Replacing an existing unsaved case requires confirmation, and edits made while AI is working are preserved.
  6. Select Save. Deletion or generic command steps in an AI-authored case require separate confirmation. Technical provider, model, request and review references remain internal for diagnostics and Application Insights task tracking. Use the Run area to validate the saved test separately.

You can describe related records in one scenario, including separate First Name and Last Name values and an account lookup. Default record ownership needs no extra input unless you want to assign a particular owner. To verify a newly saved record after reopening, AI can use Reopen current record, which retains the saved record identity without guessing a contact's full-name format.

This release supports one selected D365 app with multiple automatically identified tables: navigation, new/open/select records, grid keyword search, form and grid waits, field entry/clearing/reading, lookup selection, save/save-and-close, record deletion, and field/text/record/grid assertions. Dataverse create/read/update/verify/delete actions can use named case-scoped record references. References must be created before use, must match the action's table, and cannot be reused after deletion. UI steps navigate explicitly between tables and field targets/choices are validated within each table. Lookup targets must match retrieved relationship metadata, including an explicit target for polymorphic lookups; refresh the table metadata in Manage connections if older cached fields lack relationships. UI lookup values use exact synthetic labels supplied in the description, including labels assigned earlier in the flow. API record reference names are not substituted into lookup values. Define a case variable and capture an output when you need a reusable scalar value; API relationship bindings remain unsupported. AI drafts do not automatically define case variables. Each generation is limited to 12 relevant tables, 60 steps, and 500 fields per selected table. Oversized catalogs can be narrowed with the optional filter; field metadata is never silently truncated. Tabs, custom commands, BPF, Power Pages, Canvas Apps, and external test-case sync are not generated; add those supported actions manually where applicable. A read or save alone is not treated as verified coverage.

AI is advisory. Normal deterministic actions decide test outcomes. Create draft sends one request to the portal. The server runs three application tasks in sequence: identify the app and tables, review the requirements, and generate validated steps. It stops and asks questions if information is missing. A complete draft normally needs three Foundry calls, plus any throttling retries; Azure's request and token limits still apply. The whole attempt counts once toward the limits of 30 authoring attempts per user per hour and 30 shared AI attempts per workspace per hour, including failures. Repeating Create draft starts a new attempt. Analysis and generation retain separate audit records under that attempt. Without explicit reasoning, the complete workflow has a 90-second deadline, with a 45-second limit for analysis and for generation. With explicit reasoning enabled (the Sol infrastructure default), each stage is limited to 180 seconds within a 200-second overall deadline. A provider or validation error leaves the current case unchanged.

New case, recording, and suite options

The case number is assigned automatically. The platform appears beside the case and in the editor. Each case accepts actions for its platform only; saved cases keep their platform. A case is labelled Positive when every step expects success and Negative when at least one step expects failure.

The full test name is the main heading, with the case ID and platform underneath. The toolbar stays visible while scrolling and shows Saved or Unsaved changes beside Save. Use the three-dot menu for Copy case or Delete case. Deletion asks you to confirm the named test. Close is separate from these actions; execution belongs in Run.

Editing with others

Only one session can edit an ordinary test case at a time. The editor badge shows when you are editing, or who is editing and that the case is read-only. A person icon in the case list identifies cases being edited elsewhere; hover over it or focus the case for the editor's name. Indicators refresh periodically. Once the lock is released or expires, Designer loads the latest saved case and enables editing. If your lock is lost, your unsaved draft remains available to copy.

The lock is renewed while the editor is open and expires after two minutes without a renewal. If you lose it, your unsaved draft stays in the editor: use Copy case to save it separately, or Reload latest to discard it and edit the latest version. A save is also rejected if the case has changed since you opened it. Access cases use their existing matrix revision checks instead.

The D365 designer starts with Open environment and offers model-driven app actions and D365 execution personas. The Power Pages designer starts with Open portal and offers website actions; select a portal persona in Log in to portal. Background restores its saved session; Browser verifies the current portal login. Toolkit settings only show groups for the case's platform.

Existing single-platform cases are classified automatically. Existing mixed cases remain visible with Review required. Choose their platform and move the other platform's steps into separate cases before saving. Cases from different platforms can share a suite; steps within each case must belong to its selected platform.

Add and arrange steps

Select an action's + in the Action Library to append it to the test, or drag it to an insertion point between steps. Configure the target and value fields shown for that action.

  • Drag a step's handle to change execution order.
  • Select × on a step to remove it. A case must retain at least one step.
  • Expand Comment to document intent or test data.
  • Expand Advanced settings to change the expected outcome for that step.
  • Use the Action Library settings icon to show only the toolkit groups you use.
  • Select a group heading to collapse or expand it without hiding the group. Search finds actions and group names.

Clicking Details, Comment, or Advanced settings toggles the section; you do not need to target the chevron.

For D365 cases, expand Run as in the case's Details row to choose a saved execution persona or Default connection identity. The expanded control explains which account and session will be used. Browser execution uses the current browser profile; a selected D365 persona requires Background execution.

Select Save after making changes. You can also press Ctrl+S on Windows or Cmd+S on macOS while working in the Designer.

The default first action for D365 cases is Open environment. A common D365 smoke-test sequence is:

  1. Open environment.
  2. Open app.
  3. Open table.
  4. Wait for grid load or form ready.
  5. Perform an action.
  6. Add one or more verification steps.

For website steps and a Power Pages example, see Testing Power Pages.

Test Power Apps custom pages

Custom pages are tested within a normal D365 / Model-driven app case using the same Designer and Background execution. Select that platform through New → New case. The case's Run as identity applies to the workflow; if no persona is selected, the connection's saved session is used.

  1. Start with Open environment and, if needed, Open app.
  2. Add Open custom page from Navigation. Enter the page's logical Name from your solution, for example cr123_requestpage, to open it inline in the current model-driven app.
  3. Add Set field value. Field steps added after Open custom page default to typed labels rather than Dataverse metadata. Use the control's accessible label or placeholder, for example Request title, and enter the test value. Add more fields as needed.
  4. Add Click button, with Submit or your button's exact accessible name.
  5. Add Verify message/text for the expected success message, or a Verify Dataverse record step to check the saved data. Clicking Submit alone does not prove the submission succeeded.
  6. Save and run the suite in Background, then review its logs and reports.

Supported controls include text inputs, text areas, native dropdowns, and dropdowns exposing accessible combobox/option roles, including controls inside embedded frames. Accessible labels must be unique; ambiguous targets, disabled buttons, read-only fields, and navigation errors fail the step.

For existing field steps, enable Use text fallback for this step under Advanced settings and type the label. Canvas control names and Dataverse column names are not substitutes for accessible labels. Custom controls without these accessible roles need additional support. Custom-page dialogs, record-context parameters, and Browser extension execution are not supported in this version.

For Power Pages websites, use a Power Pages case and follow Testing Power Pages.

Select targets from metadata

When metadata is loaded, use the entity, app, field, and choice selectors to avoid spelling errors. Some steps allow typed text as a fallback when the desired control is not present in metadata.

Two navigation actions use metadata by default and offer text fallback in Advanced settings:

  • For Open app, select an app retrieved from metadata. Turn on Use text fallback for this step to enter the label displayed in the D365 app selector.
  • For Open table, select a table to navigate directly using its logical name. Turn on Use visible navigation label to enter the label displayed in the current app navigation.

Labels must match the text displayed in D365. The GUID and logical-name options are generally more resilient to renamed navigation labels.

When metadata is unavailable, every action that supports text fallback switches to it automatically. Text fallback remains required until metadata is retrieved.

Refresh metadata after apps, tables, columns, or choices change in the target environment. Remember that metadata comes from the active connection, while the case itself belongs to the active project.

If an Open app step shows Saved app is no longer available, its saved reference could not be matched to the apps returned by the active environment. Confirm the correct environment is selected and refresh metadata. Then select the intended app again, or turn on Use text fallback for this step in Advanced settings and enter its visible D365 app label.

To remove an environment's cached model completely, open Manage connections, select its database icon, then select the trash button in Manage metadata and confirm. Metadata selectors become unavailable, and supported steps switch to text fallback until you retrieve the metadata again. Removing cached metadata does not delete the environment, suites, or test cases.

Set expected outcomes

Each step normally expects Success. Set a step to Failed when failure is the intended behaviour, such as confirming that invalid input is rejected.

A negative step passes only when its action fails as expected. If it succeeds unexpectedly, the report records: “Expected this step to fail, but it passed.”

Organise cases

In the left panel:

  • Drag cases within a suite to reorder them.
  • Drag a case onto another suite to move it.
  • Select a case to edit it.
  • Open the case editor's three-dot menu and select Delete case to remove it after confirming its name.

You can also reorder cases in the suite editor's Cases list. Drag a handle and drop above or below another case, or click the handle and choose Move up or Move down. Keyboard users can focus a handle and press Alt+Up or Alt+Down. Order changes save automatically and appear in the left panel. Edits to the suite name and description still use Save.

Save before leaving the editor. Portal runs use the displayed case order and are sequential by default. Administrators or API integrations may configure controlled concurrency where the deployment supports it; the portal does not currently provide a concurrency selector.

Next steps

Case variables

Case variables sits above the action groups in Designer's Action Library. Select + Add variable to open its popup, give it a unique name, choose Text, Number, or Boolean, and select Apply variable. Names start with a letter and contain up to 64 letters, numbers, or underscores; names are case-sensitive. Define up to 100 variables per case. Keep Has initial value selected for a literal starting value (empty text is valid), or clear it when a step will populate the variable. Use the pencil icon to edit a variable in the same popup. Cancel, Escape, or the close button discards popup edits. Save the case to persist the definitions.

Drag a variable from the panel into a supported input, or select the Insert variable braces icon next to that input. The searchable picker lists variables that have a value at that step and fit the input's type. Use Tab and Enter to select an item, or Escape to close the picker. References appear as removable badges and are stored as ${customerName} in the case JSON. Text inputs can mix literal text and variables, for example Automation - ${customerName}. Number and boolean inputs accept a single matching variable without surrounding text. Form choice inputs use text variables containing the exact option label; Dataverse API two-option fields use boolean variables containing true or false. Renaming a variable updates its references in the case; remove its uses before deleting it.

Add Variables → Set variable to assign or change a value at a particular point in the case. Its value can include variables populated by earlier steps. For Read field value, the legacy form read, Read grid cell, Read grid record count, Create Dataverse record, and Read Dataverse record, use Save output to variable to capture the result. A Dataverse read must select exactly one column when capturing; its raw value is saved. A Dataverse Create still needs its existing record reference name and can additionally capture the returned GUID into a text variable.

For example, define customerName with an initial text value, use its badge in Set field value, read Account Number into an initially unset accountNumber, and use ${accountNumber} in a later search or verification.

Variables work in Browser and Background runs. Each case execution starts with its own initial values, including cases running in parallel. Changing a value does not change the saved initial value or another case's values. Missing values, unknown names, and incompatible bindings fail validation before execution; invalid captured values fail their producing step and stop subsequent actions. Variable failures cannot be treated as successful expected failures. Run reports show resolved inputs and variable assignments beside the relevant steps; JSON exports include this evidence and the case snapshot.

This version supports D365 field values, Dataverse Create/Update/Verify field rows, existing-record selectors, simple text targets and values such as record names, search terms and lookup labels, and basic Power Pages text/fill/select steps. Structured portal configuration, custom scripts, access rules, metadata identifiers, and fixed action-choice controls do not accept variables. Initial values are literal; inserted content is never evaluated as code or recursively expanded. Variables are saved with the case and can appear in reports, so use test data suitable for sharing in the workspace, not passwords or tokens. Suite-wide variables, reusable profiles, and unique-value generation remain future work. Automatic Dataverse cleanup is available through the separate case setting below; variables alone do not enable it.

Clean up created records

For D365 cases, Case details → Clean up created Dataverse records opts into cleanup of explicit Create Dataverse record steps and recognised Create requests from model-driven form Save steps. Browser and Background modes are supported. It is off by default. Save the case before running it. Autosave, custom buttons, flows and other indirect creation paths are outside this scope. See automatic cleanup and retries.