Testing dialog activities

By testing dialog activities in a test environment, you can ensure that the triggers and actions in the activity flow are producing the result that you expect. If the dialog activity contains targets, you can ensure that the actions reach the target customers. When your testing is successful, you can deploy the dialog activity to the production environment.

This procedure and its supporting examples are designed for use in a testing environment. It is not recommended that you test dialog activities directly in a production environment.

To save time when you are testing dialog activities, you can set up the test environment to minimize the waiting period for triggers and actions to occur. Depending on the dialog activity, this set up might require temporary changes to configuration files and database table data. For this reason, testing certain dialog activities requires support from a Site Administrator or developer.

Before you begin

  1. If your dialog activity trigger is processed when the SendMarketingTriggers scheduled job runs, review the following topics to understand this scheduled job:
  2. If your dialog activity contains the Wait trigger, you should also understand how to run the Wait trigger in test mode by changing a property in the marketing component configuration file.
  3. Plan ahead how you are testing the triggers, targets, and actions in your activity. Use the following topics for tips:

Procedure

  1. Log on to the server in the test environment.
  2. Open the Marketing tool.
  3. Open the dialog activity that you want to test and take note of details that are relevant to testing. For instance, the triggers and actions, and the target criteria (if the activity includes targets).
    Tip: Consider taking a screen snapshot of the dialog activity to refer to during testing.
  4. Make sure that the dialog activity is active.
  5. Work with the Site Administrator or developer on the following tasks:
    1. Prepare your test environment so that it supports the dialog activity requirements.
      For example, if your dialog activity uses the Send Message action to send a marketing email, your test environment must have an email server configured with e-mail accounts.
    2. If your dialog activity trigger is processed when the SendMarketingTriggers scheduled job runs, decide how you want to control when the trigger is processed in the test environment. By default, the SendMarketingTriggers scheduled job processes dialog activity triggers every 30 minutes. You have three options:
      Option Description
      Option 1: Wait for the SendMarketingTriggers scheduled job to run according to its current schedule. This option requires no extra steps. However, during testing you must wait up to 30 minutes (or whatever the current schedule interval is) for the trigger to be processed.
      Option 2: Change the schedule interval of the SendMarketingTriggers scheduled job in the Administration Console so that it runs more frequently than every 30 minutes. This option requires you to temporarily change the schedule interval, for example, to 5 minutes instead of 30 minutes, to reduce the waiting period during testing.
      Option 3: Trigger the activity manually by opening the SendMarketingTriggers scheduled job in the Administration Console, and then clicking OK, which forces the job to run immediately. With this option, you can manually control when the trigger is processed; however, if you are running multiple tests, Option 2 requires less effort.
    3. If you chose Option 2, change the schedule interval for the SendMarketingTriggers scheduled job in the Administration Console to a shorter interval. See Scheduling the SendMarketingTriggers job.
    4. If the dialog activity you are testing contains the Wait trigger, you can run the Wait triggers in test mode so that the time elapses in a matter of minutes, rather than days. To do so, you must create a customized marketing component configuration file and change the values of the following two properties:
      Property in marketing component configuration file (wc-admin-component.xml) What to change
      <_config:property name="timedEventTest" value="false"/> Change the value false to true. This parameter forces the Wait trigger to run in test mode and to use the interval value that is specified in the following timedEventTestInterval property.
      <_config:property name="timedEventTestInterval" value="1"/> Optionally, change the value 1 (for 1 minute) to any number that represents the number of minutes for the Wait trigger to use in test mode. If your activity has multiple paths that follow a Branch element, you might want to set the interval longer than 1 minute.

      Do not push the changed file out to the production environment with the Wait trigger in test mode.

    5. If you did not restart your server previously, restart your test server. This restart ensures that the changes that you made to the test environment take effect.
  6. If your dialog activity contains targets, you might need to register a test customer who meets the target criteria before you trigger the activity.
    For example, if the dialog activity contains a Purchase History target that requires customers to place at least three orders, you might need to register a test customer and place the orders in the test environment before you trigger the activity.
  7. Trigger the activity and observe the results.
  8. If necessary, change the dialog activity until you get the result you want.
  9. When you complete testing, make sure to restore any configurations in the test environment back to their original settings. This way, you can avoid propagating test environment settings to the production environment.
  10. Restart your test server.
  11. Deploy the tested dialog activity to the production environment.