Task recorder

Completed

The Task recorder helps users write test cases that represent a business process task or business process. It focuses on high-responsiveness, a flexible extensibility application programming interface (API), and seamless integrations with consumers of business process recordings.

The Task recorder is integrated with the Lifecycle Services business process modeler (BPM) tool so that users can produce business process diagrams from recordings to design their applications. Additionally, the Task recorder can auto-generate application verification tests and play back previously-recorded processes.

The Task recorder records the user actions including button selections, value entry, and navigation.

To see how to create and consume a Task recording as a developer for testing, watch this video.

To create a task recording, follow these steps:

  1. We recommend that you refresh the browser before each new recording to create a new user session. Refreshing your browser will restart the Task recorder if you already have it open. This will provide the most stable recording experience and prevent unwanted changes to an existing task recording.
  2. Select Settings > Task recorder.
  3. Select Create recording.
  4. Enter a name of the recording and select Start. The Task recorder immediately enters Recording mode. The pane will display information and controls that are related to the process of recording.
  5. Run through a process. As you go through forms, select buttons, and enter data, steps are added to the task recording.
  6. Select Stop.

You can download and save a task recording in different ways:

  • Task recording package - This can be used to play a task guide, maintain the recording, or edit the recording's annotation.
  • Raw recording file - This is used for developer scenarios, such as test code generation.
  • BPM file - This creates a Word document with the recorded steps, as well as any screenshots that were captured.
  • Save the recording to the Lifecycle Services library - If the Lifecycle Services library is set as a Help library, you will be able to find the task guide by searching the Help menu.

The Task recorder can automatically run steps of an existing recording. You can also use Maintenance mode to update an existing recording with additional or adjusted steps. When Maintenance mode is complete, a new recording is produced that contains the original steps and the new steps. Keep in mind that any steps that are not run during maintenance are not included in the new recording.

To maintain a recording that you have saved locally as a file with the ".axtr" extension, follow these steps:

  1. Open the Task recorder pane.
  2. Select Maintain a recording.
  3. Select It is in a file I can upload to load the Task recorder package (.axtr).
  4. Select Start. The Task recorder begins recording in Maintenance mode.

While in Maintenance mode, you can choose from several controls to maintain a task recording:

  • Step - Run the next step. Any open lookups, drop dialogs, or Action Pane tabs might be dismissed when you use Step. In situations where open lookups, drop dialogs, or Action Pane tabs are being used, choose the Play option instead.
  • Play - Run the remaining steps sequentially until playback is paused. While you are playing the recording, the Play button will become a Pause button to pause the playback. If a step cannot be performed, it will be skipped and automatically paused.
  • Play until - This works like the Play option, but you can select the step that the playback will stop at.

Additional features are available for you to edit the recording that simplifies the maintenance process. If you open Settings > Task Recorder > Edit recording, you can insert steps without re-recording the entire file, move steps without re-recording the entire file, and collapse the recording name and description fields to view more steps.

To edit a recording, use the following procedures.

Insert step

  1. Select the step after which you want the new step to be inserted.
  2. Go to the page that you need to record, and the Insert step option will appear.
  3. Select Insert Step. The Task recorder will switch to Record mode.
  4. Perform the step.
  5. Select Stop. You can repeat this step as needed.
  6. Select Done editing.
  7. Save or publish the task recording.

Move steps under a sub task

  1. Select the step after which you want to move.
  2. Select Move step after.
  3. Select the step or sub-task step that you want to move the step or sub-task step after.
  4. Select Done editing and save the task or publish the task guide when you are done.

Import a Task Recorder recording into Visual Studio

You can import a Task Recorder recording into Visual Studio to generate test code. The task recording will be imported as an XML file, and the test code is generated from it by using FormAdaptors.

To import a task recording into Visual Studio, follow these steps:

  1. Record a scenario by using Task Recorder.
  2. In Visual Studio, select the Dynamics 365 menu.
  3. Select Add-ins > Import Task Recording.
  4. Select the module that you want to import the task recording to.
  5. Select the XML file for the recording.
  6. Test code will be generated based on the SysTestAdapter and FormAdaptor. (This code can be viewed in the Visual Studio IDE.)
  7. Set up Visual Studio options for test discovery and implementation.
  8. From the menu options, select Test > Windows > Test Explorer. Tests from test code will be available for you to select from.
  9. Select the test and select Run > Execute selected.

The Task recorder feature includes additional advanced recording options. One option is the advance grid row selection. To ensure that the correct grid row is selected during test playback, the filter criteria needs to be explicitly defined. While you are recording, after you have opened a form that contains a grid and have selected a record, the Task recorder grid row selection dialog will appear. The dialog will have a filter pane pre-populated with the Task recorder's best guess. You can manually define the filter or use the best guess and apply the filter to the recording.

The Task recorder's Rollback changes to business data option can revert business data that is created during recording when recording is complete. This option can be used primarily to create task recordings for tests. The rollback option only affects records that are created during the recording session. This is only available on non-production environments where the Test tools have been installed.

You can play the task guide On-rails. Users can play the task guide to be prompted about what step to complete next. When the step is completed, the task guide will automatically progress to the next step. These rails prevent the user from selecting elements other than the element that is identified in the task guide.

Additionally, if the task guide finds that a necessary element for the step is not visible or not on the form on the user interface, an error state occurs. A message will prompt describing the issue. The user can then find the element and continue with the task guide. If you use the Next step and Previous step options to move through the task guide, you can sometimes prompt an error state if the previous or next step refers to an element that is not on the current form. You can also use the See more button to expand the task guide to see additional information, such as an example value or a note.