Pardot QA Automation
Run Pardot 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/pardot
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 |
---|---|---|
email * | CRANK_AUTOMATONINC_PARDOT__EMAIL | Email address |
password * | CRANK_AUTOMATONINC_PARDOT__PASSWORD | Password |
userKey * | CRANK_AUTOMATONINC_PARDOT__USERKEY | User key |
You can always re-authenticate by running the following command.
$ crank cog:auth automatoninc/pardot
Further Auth Details HerePardot Test Steps
Create a Pardot Prospect Action
Use this step in a Scenario file like this:
- step: When I create a pardot prospect
data:
prospect:
field: value
ID | Type | Description |
---|---|---|
prospect * | Map/Object | A map of field names to field values |
Token | Type | Description |
---|---|---|
{{pardot.prospect.id}} | Number | Prospect's Pardot ID |
{{pardot.prospect.email}} | Email Address | Prospect's Email Address |
{{pardot.prospect.created_at}} | ISO 8601 Datetime | The date/time the Prospect was created |
{{pardot.prospect.updated_at}} | ISO 8601 Datetime | The date/time the Prospect was updated |
{{pardot.prospect.*}} | * | This step may expose additional dynamic tokens representing values on the prospect, depending on how you've configured the underlying system. |
Delete a Pardot Prospect Action
Use this step in a Scenario file like this:
- step: Finally, delete the {{email}} pardot prospect
ID | Type | Description |
---|---|---|
email * | Email Address | Email address |
Check a field on a Pardot Prospect Assertion
Use this step in a Scenario file like this:
- step: Then the {{field}} field on pardot prospect {{email}} should {{operator}} {{expectedValue}}
ID | Type | Description |
---|---|---|
email * | Email Address | Prospect'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 |
---|---|---|
{{pardot.prospect.id}} | Number | Prospect's Pardot ID |
{{pardot.prospect.email}} | Email Address | Prospect's Email Address |
{{pardot.prospect.created_at}} | ISO 8601 Datetime | The date/time the Prospect was created |
{{pardot.prospect.updated_at}} | ISO 8601 Datetime | The date/time the Prospect was updated |
{{pardot.prospect.*}} | * | This step may expose additional dynamic tokens representing values on the prospect, depending on how you've configured the underlying system. |
Check Pardot List Membership Assertion
Use this step in a Scenario file like this:
- step: Then the {{email}} pardot prospect should {{optInOut}} list {{listId}}
ID | Type | Description |
---|---|---|
email * | Email Address | The Email Address of the Prospect |
optInOut * | String | One of "be opted in to", "be opted out of", or "not be a member of" |
listId * | Number | The ID of the Pardot List |
Token | Type | Description |
---|---|---|
{{pardot.listMembership.id}} | Number | List Membership's Pardot ID |
{{pardot.listMembership.list_id}} | Number | List's Pardot ID |
{{pardot.listMembership.prospect_id}} | Number | Prospect's Pardot ID |
{{pardot.listMembership.opted_out}} | Boolean | Opted Out |
{{pardot.listMembership.created_at}} | ISO 8601 Datetime | The date created |
{{pardot.listMembership.updated_at}} | ISO 8601 Datetime | The date updated |
{{pardot.prospect.id}} | Number | Prospect's Pardot ID |
{{pardot.prospect.email}} | Email Address | Prospect's Email Address |
{{pardot.prospect.created_at}} | ISO 8601 Datetime | The date/time the Prospect was created |
{{pardot.prospect.updated_at}} | ISO 8601 Datetime | The date/time the Prospect was updated |
{{pardot.prospect.*}} | * | This step may expose additional dynamic tokens representing values on the prospect, 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