Skip to the page

Test automation

Walks the copy you edit once, now, for one address. Its emails are really sent, with "[Test]" before the subject. Waits are skipped, a wait for an event takes its no path, and steps that change contacts or call webhooks are skipped. Nothing is counted.

opensend automations test <id> [flags]
Needs the scopeautomations:write
Reaches outside the workspace

Flags

  • <id>stringRequired

    The id of the item. Up to 64 characters.

  • --emailstringRequired

    Where the emails of the test go. Up to 120 characters.

  • --dataRecord<string, unknown>

    Data to run it with, as an event would carry.

Returns

The command prints the answer: as JSON when its output goes to a file or another program, and as a table or a list of fields in a terminal. When the API refuses, the error goes to the error stream and the command ends with a code that names the failure. Output and scripts lists the codes.

  • object"automation_run"

    Always automation_run.

  • idstring

    The id of the run.

  • automationIdstring

    The id of the automation.

  • versioninteger

    The version of the automation the run follows.

  • emailstring

    The address of the person.

  • contactIdstring | null

    The id of their contact, or null for a bare address.

  • statusstring

    Where the run stands: running, waiting, completed, exited, failed or canceled.

    One ofrunningwaitingcompletedexitedfailedcanceled

  • stepIdstring | null

    The id of the step it is at, or null once it has ended.

  • sourcestring

    What started it: the name of the event, or schedule, date, manual or test.

  • testboolean

    true for a test run.

  • reasonstring | null

    Why it ended before the end of its path, or null.

    One ofexit_stepgoalunsubscribedcontact_deletedautomation_deletedautomation_stoppedmissing_variablesend_refusedstep_failedcanceled

  • detailstring

    More about how it ended. Empty while it is going on.

  • wakeAtstring | null

    When a waiting run goes on, or null.

  • startedAtstring

    When the run started.

  • finishedAtstring | null

    When it ended, or null.

  • dataRecord<string, unknown>

    The data of what started it.

  • stepsobject[]

    What each step did, oldest first.

  • steps[].idstring

    The id of the step.

  • steps[].kindstring

    What the step does.

    One ofsend_emaildelaywait_untilwait_for_eventconditionbranchsplitupdate_contactdelete_contactadd_to_audienceremove_from_audiencewebhooksend_eventexit

  • steps[].namestring

    The name of the step.

  • steps[].outcomestring

    What happened: sent, done, waiting, waited, yes, no, skipped or failed.

    One ofsentdonewaitingwaitedyesnoskippedfailed

  • steps[].detailstring

    More about it, such as why it failed. Often empty.

  • steps[].emailIdstring | null

    The id of the email it sent, or null.

  • steps[].atstring

    When it happened.