Dynamics CRM QA Automation

Run Dynamics CRM test scenarios using the Crank BDD framework.

Dynamics CRM Logo

Installing and Authenticating this Cog

Once you've successfully installed Crank you can install this Cog by running the following:

$ crank cog:install automatoninc/dynamics

You will be asked for the following authentication details on installation. To avoid prompts in a CI/CD context, you can provide the same details as environment variables.

Expected Authentication Details
FieldInstall-Time Environment VariableDescription
resource *CRANK_AUTOMATONINC_DYNAMICS__RESOURCEResource URL
clientId *CRANK_AUTOMATONINC_DYNAMICS__CLIENTIDClient Id
clientSecret *CRANK_AUTOMATONINC_DYNAMICS__CLIENTSECRETClient Secret

You can always re-authenticate by running the following command.

$ crank cog:auth automatoninc/dynamics

Dynamics CRM Test Steps

Create a Dynamics CRM Lead Action

Use this step in a Scenario file like this:

- step: When I create a dynamics crm lead
  data:
    lead:
      field: value
Expected Step Input
IDTypeDescription
lead *Map/ObjectA map of field names to field values
Exposed Dynamic Tokens
TokenTypeDescription
{{dynamics.lead.leadid}}NumberLead's Dynamics ID
{{dynamics.lead.emailaddress1}}Email AddressLead's Email Address
{{dynamics.lead.createdon}}ISO 8601 DatetimeThe date/time the Lead was created
{{dynamics.lead.modifiedon}}ISO 8601 DatetimeThe date/time the Lead was updated
{{dynamics.lead.*}}*This step may expose additional dynamic tokens representing values on the lead, depending on how you've configured the underlying system.

Delete a Dynamics CRM Lead Action

Use this step in a Scenario file like this:

- step: Finally, delete the {{email}} dynamics crm lead
Expected Step Input
IDTypeDescription
email *Email AddressLead's email address

Check a field on a Dynamics CRM Lead Assertion

Use this step in a Scenario file like this:

- step: Then the {{field}} field on dynamics crm lead {{email}} should {{operator}} {{expectedValue}}
Expected Step Input
IDTypeDescription
email *Email AddressLead's email address
field *StringField name to check
operator StringCheck Logic (be, not be, contain, not contain, be greater than, be less than, be set, not be set, be one of, or not be one of)
expectedValue Any ScalarExpected field value
Exposed Dynamic Tokens
TokenTypeDescription
{{dynamics.lead.leadid}}NumberLead's Dynamics ID
{{dynamics.lead.emailaddress1}}Email AddressLead's Email Address
{{dynamics.lead.createdon}}ISO 8601 DatetimeThe date/time the Lead was created
{{dynamics.lead.modifiedon}}ISO 8601 DatetimeThe date/time the Lead was updated
{{dynamics.lead.*}}*This step may expose additional dynamic tokens representing values on the lead, depending on how you've configured the underlying system.

Missing a Step You Need?

This Cog is open source! Your contributions are welcome and encouraged.

Contribute on GitHubJoin the Crank Spectrum Community