Dynamics CRM QA Automation
Run Dynamics CRM test scenarios using the Crank BDD framework.
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.
Field | Install-Time Environment Variable | Description |
---|---|---|
resource * | CRANK_AUTOMATONINC_DYNAMICS__RESOURCE | Resource URL |
clientId * | CRANK_AUTOMATONINC_DYNAMICS__CLIENTID | Client Id |
clientSecret * | CRANK_AUTOMATONINC_DYNAMICS__CLIENTSECRET | Client 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
ID | Type | Description |
---|---|---|
lead * | Map/Object | A map of field names to field values |
Token | Type | Description |
---|---|---|
{{dynamics.lead.leadid}} | Number | Lead's Dynamics ID |
{{dynamics.lead.emailaddress1}} | Email Address | Lead's Email Address |
{{dynamics.lead.createdon}} | ISO 8601 Datetime | The date/time the Lead was created |
{{dynamics.lead.modifiedon}} | ISO 8601 Datetime | The 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
ID | Type | Description |
---|---|---|
email * | Email Address | Lead'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}}
ID | Type | Description |
---|---|---|
email * | Email Address | Lead's email address |
field * | String | Field name to check |
operator | String | Check 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 Scalar | Expected field value |
Token | Type | Description |
---|---|---|
{{dynamics.lead.leadid}} | Number | Lead's Dynamics ID |
{{dynamics.lead.emailaddress1}} | Email Address | Lead's Email Address |
{{dynamics.lead.createdon}} | ISO 8601 Datetime | The date/time the Lead was created |
{{dynamics.lead.modifiedon}} | ISO 8601 Datetime | The 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