Pardot QA Automation

Run Pardot test scenarios using the Crank BDD framework.

Pardot 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/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.

Expected Authentication Details
FieldInstall-Time Environment VariableDescription
email *CRANK_AUTOMATONINC_PARDOT__EMAILEmail address
password *CRANK_AUTOMATONINC_PARDOT__PASSWORDPassword
userKey *CRANK_AUTOMATONINC_PARDOT__USERKEYUser key

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

$ crank cog:auth automatoninc/pardot
Further Auth Details Here

Pardot 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
Expected Step Input
IDTypeDescription
prospect *Map/ObjectA map of field names to field values
Exposed Dynamic Tokens
TokenTypeDescription
{{pardot.prospect.id}}NumberProspect's Pardot ID
{{pardot.prospect.email}}Email AddressProspect's Email Address
{{pardot.prospect.created_at}}ISO 8601 DatetimeThe date/time the Prospect was created
{{pardot.prospect.updated_at}}ISO 8601 DatetimeThe 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
Expected Step Input
IDTypeDescription
email *Email AddressEmail 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}}
Expected Step Input
IDTypeDescription
email *Email AddressProspect'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
{{pardot.prospect.id}}NumberProspect's Pardot ID
{{pardot.prospect.email}}Email AddressProspect's Email Address
{{pardot.prospect.created_at}}ISO 8601 DatetimeThe date/time the Prospect was created
{{pardot.prospect.updated_at}}ISO 8601 DatetimeThe 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}}
Expected Step Input
IDTypeDescription
email *Email AddressThe Email Address of the Prospect
optInOut *StringOne of "be opted in to", "be opted out of", or "not be a member of"
listId *NumberThe ID of the Pardot List
Exposed Dynamic Tokens
TokenTypeDescription
{{pardot.listMembership.id}}NumberList Membership's Pardot ID
{{pardot.listMembership.list_id}}NumberList's Pardot ID
{{pardot.listMembership.prospect_id}}NumberProspect's Pardot ID
{{pardot.listMembership.opted_out}}BooleanOpted Out
{{pardot.listMembership.created_at}}ISO 8601 DatetimeThe date created
{{pardot.listMembership.updated_at}}ISO 8601 DatetimeThe date updated
{{pardot.prospect.id}}NumberProspect's Pardot ID
{{pardot.prospect.email}}Email AddressProspect's Email Address
{{pardot.prospect.created_at}}ISO 8601 DatetimeThe date/time the Prospect was created
{{pardot.prospect.updated_at}}ISO 8601 DatetimeThe 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