Views:

Overview

Follow the steps in this article to set up a Data Shield Test to check that the Dynamics Subject organizational structure has not changed.

Prerequisites

Ensure that you have a Subject organizational structure in your system - go to Go to Settings > Business Management. Select Subjects. You can also get there by going to Settings > Service Management > Subjects. If there is not a structure in your system you can define one for the purposes of this completing the steps in this article.

Create the Test

Initial Set up

  • Open the North52 Decision Suite app
  • Navigate to TestShield > Tests
  • Click New
  • On the Register tab
    • For Test Plan enter Training
    • For Test Suite enter Data Shield Test
    • For Test Case enter Subjects
    • For Test Type select Data Shield
    • For Sync or Async select Sync
  • Click Save

Assemble

On the Assemble sheet we describe the specific scenario of a feature that will be tested and outline the steps of the test using Gherkin-style syntax.

  • On the Assemble sheet, edit cell B1 to describe the Feature being tested. Enter the text: Subjects
  • Double-click cell B2
    • For the Scenario, describe what is being tested - we like to use a User Story. Enter the text:
      As the CRM administrator
      I want to ensure the the Subjects in the system are not changed
      So that the data in the system remains consistently categorized
  • Click Save

Arrange

There is no test data to set up for this test as we analyzing existing data.

Act

There are no actions to specifiy for the Act sheet.

Assert

For a Data Shield test we usually just checking existing data so we want to take a 'snapshot' of records in the system that we then use as a reference to check for changes when the test runs.

  • Select the Assert sheet
  • Select the Explore tab
  • Expand Explore System Data
  • Select Subject from the list of available entitites
  • Check the Records node to select all record nodes
  • Click the lightning bolt button to add the data to the Assert sheet
  • Select cell A1
    • Press F2
    • Select AssertAreEqual from the list of available options
  • Click Save
  • Your Arrange sheet should now look like:

Run the Test

The Test is now ready to be run. For this exercise we will run the Test manually.

  • Click the Execute Test button - represented by the lightning button in the top right of the Test editor canvas
  • Click the Execute button on the fly-out pane
  • After a few seconds the Test result record will be created (a message Result: Operation Completed will be shown)
  • From the Source tab, expand Test Run Results
    • You will see a node with with the time of your test and the Pass/Fail results, expand this node
    • Expand Assert
    • Expand Row-0004
    • Expand A - title
      • You will see the Actual and Expected values​, and the Assert Type:

Change one of the Subject records and run the test again. You will see a failure for the record you made the change to.