Testing dialog activities
By testing dialog activities in a test environment, we can ensure that the triggers and actions in the activity flow are producing the result that you expect. If the dialog activity contains targets, we can ensure that the actions reach the target customers. When your testing is successful, we 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 we are testing dialog activities, we 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 beginning
- If your dialog activity trigger is processed when the SendMarketingTriggers scheduled job runs, review the following topics to understand this scheduled job:
- Scheduling the SendMarketingTriggers job
- Changing the daily scheduled time for marketing triggers and lists
- 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.
- Plan ahead how we are testing the triggers, targets, and actions in your activity. Use the following topics for tips:
- Tips for testing triggers and actions in dialog activities
- Tips for testing targets in web and dialog activities (if your dialog activity contains targets)
Procedure
- Log on to the server in the test environment.
- Open the Marketing tool.
- Open the dialog activity 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.
- Make sure that the dialog activity is active.
- Work with the Site Administrator or developer on the following tasks:
- 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.
- If your dialog activity trigger is processed when the SendMarketingTriggers scheduled job runs, decide how we 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 we 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, we can manually control when the trigger is processed; however, if we are running multiple tests, Option 2 requires less effort.
- 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.
- If the dialog activity we are testing contains the Wait trigger, we can run the Wait triggers in test mode so that the time elapses in a matter of minutes, rather than days. To do so, we 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, we can 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.
- If we 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.
- If your dialog activity contains targets, we 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, we might need to register a test customer and place the orders in the test environment before you trigger the activity.
- Trigger the activity and observe the results.
- If necessary, change the dialog activity until we get the result we want.
- When you complete testing, make sure to restore any configurations in the test environment back to their original settings. This way, we can avoid propagating test environment settings to the production environment.
- Restart your test server.
- Deploy the tested dialog activity to the production environment.
Related tasks
Scheduling marketing jobs
Related reference
Tips for testing targets in web and dialog activities
Testing the Display Top Browsed and Display Best Sellers actions in Web activities
Tips for testing triggers and actions in dialog activities