Answers.Body: <p>Only way I know to test it to create an equivalent flow such as</p>
  
  <ul>
  <li>Set up a new Membership Type - give a contact a membership of that type</li>
  <li>Set up a Scheduled Reminder for above Membership Type</li>
  <li>Set the Membership End Dates so that the Reminder would be scheduled for today</li>
  <li>Run the Scheduled Reminders scheduled job</li>
  <li>To clear and rerun find the entry created by above in the civicrm_action_log, remove that row, rerun cron.</li>
  </ul>
  
  <p>Not pretty but it can help. Hopefully if i missed out any steps you are able to make the mental jumps required ;-)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-07T20:35:51.120Z
Answers.LastActivityDate: 2015-05-08T16:57:43.563Z
Answers.LastEditDate: 2015-05-08T16:57:43.563Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>It might help to differentiate types of testing, e.g.</p>
  
  <ul>
  <li>(<em>User-oriented</em>) Click-to-test/in-app test - This is the type of test supported in the CiviMail UI (which sends an example mailing). As dlobo points out, this type of test was not originally part of the scheduled reminder system, but it would be a great addition.</li>
  <li>(<em>Developer-oriented</em>) Unit testing - For developers who work on the code, there's a series of <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Testing" rel="noreferrer">automated tests</a> in <a href="https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php" rel="noreferrer">ActionScheduleTest</a> which simulate a dozen configurations/schedules.</li>
  <li>(<em>Sysadmin-oriented</em>) Adhoc testing - At the low-end, one might simply create a fake membership record and set the expiration date to today. At the high-end, one might replicate a site in an isolated environment (eg a local virtual machine), redirect email to disk (<a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers" rel="noreferrer">CIVICRM_MAIL_LOG</a>), and manipulate the clock in the virtual machine. (This may require a deep understanding of the system as well as a lot of time/patience/discipline.)</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-07T18:58:52.043Z
Answers.LastActivityDate: 2015-05-07T18:58:52.043Z
Answers.UserDisplayName: Tim Otten
Answers.Body: <p>Unfortunately I don't think testing was built into the scheduled reminder functionality. Seems like that aspect was just skipped.</p>
  
  <p>I do think like contribution and event page registrations, having the ability to:</p>
  
  <p>a. test the functionality and email deliverability of scheduled reminders, sending the emails to staff / tester rather than actual person</p>
  
  <p>b. Figure out how to best approach / deal with the time centric nature of scheduled reminders (i.e. how can we test 1 month out reminders? maybe compress time and/or do a scale conversion of time for testing, (i.e. hours become seconds, days becomes minutes, months become hours)</p>
  
  <p>Definitely a medium sized development project and most of the ideas can be tested out via an extension, but this does seem like core functionality sometime in the future.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-07T18:08:33.027Z
Answers.LastActivityDate: 2015-05-07T18:08:33.027Z
Answers.UserDisplayName: Donald Lobo
Answers.Body: <p>This isn't perfect since it wouldn't have access to all the same tokens, but as a quick test to make sure there was nothing glaringly awful about the email itself, I just copy/pasted my membership renewal email content into a new generic mailing and sent myself a test that way.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-01T21:59:31.017Z
Answers.LastActivityDate: 2018-11-01T21:59:31.017Z
Answers.UserDisplayName: Matt Woodward
Body: <p>I'm looking for a way to test schedule reminders for memberships. We have memberships that expire in a year, and we have setup a renewal reminder which also reminds our back office staff a month before the expiry date. But I need a way to test that the reminder actually works. Is there a way to test this quickly test this...obviously I cannot wait until one month before a particular membership expires to confirm this.</p>
  
Tags: <civimember><scheduled-reminders>
Title: A way to test schedule reminders
ThreadText: # A way to test schedule reminders
  
  (Asked by: username_0 on 2015-05-07)
  
  I'm looking for a way to test schedule reminders for memberships. We have memberships that expire in a year, and we have setup a renewal reminder which also reminds our back office staff a month before the expiry date. But I need a way to test that the reminder actually works. Is there a way to test this quickly test this...obviously I cannot wait until one month before a particular membership expires to confirm this.
  
  **Tags:** civimember, scheduled-reminders
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2015-05-07. Score: 7
  
  Only way I know to test it to create an equivalent flow such as
  
  * Set up a new Membership Type - give a contact a membership of that type
  * Set up a Scheduled Reminder for above Membership Type
  * Set the Membership End Dates so that the Reminder would be scheduled for today
  * Run the Scheduled Reminders scheduled job
  * To clear and rerun find the entry created by above in the civicrm\_action\_log, remove that row, rerun cron.
  
  Not pretty but it can help. Hopefully if i missed out any steps you are able to make the mental jumps required ;-)
  
  
  ---
  
  ### Answer by username_2 on 2015-05-07. Score: 7
  
  It might help to differentiate types of testing, e.g.
  
  * (*User-oriented*) Click-to-test/in-app test - This is the type of test supported in the CiviMail UI (which sends an example mailing). As dlobo points out, this type of test was not originally part of the scheduled reminder system, but it would be a great addition.
  * (*Developer-oriented*) Unit testing - For developers who work on the code, there's a series of [automated tests](http://wiki.civicrm.org/confluence/display/CRMDOC/Testing) in [ActionScheduleTest](https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php) which simulate a dozen configurations/schedules.
  * (*Sysadmin-oriented*) Adhoc testing - At the low-end, one might simply create a fake membership record and set the expiration date to today. At the high-end, one might replicate a site in an isolated environment (eg a local virtual machine), redirect email to disk ([CIVICRM\_MAIL\_LOG](http://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers)), and manipulate the clock in the virtual machine. (This may require a deep understanding of the system as well as a lot of time/patience/discipline.)
  
  
  ---
  
  ### Answer by username_3 on 2015-05-07. Score: 5
  
  Unfortunately I don't think testing was built into the scheduled reminder functionality. Seems like that aspect was just skipped.
  
  I do think like contribution and event page registrations, having the ability to:
  
  a. test the functionality and email deliverability of scheduled reminders, sending the emails to staff / tester rather than actual person
  
  b. Figure out how to best approach / deal with the time centric nature of scheduled reminders (i.e. how can we test 1 month out reminders? maybe compress time and/or do a scale conversion of time for testing, (i.e. hours become seconds, days becomes minutes, months become hours)
  
  Definitely a medium sized development project and most of the ideas can be tested out via an extension, but this does seem like core functionality sometime in the future.
  
  
  ---
  
  ### Answer by username_4 on 2018-11-01. Score: 1
  
  This isn't perfect since it wouldn't have access to all the same tokens, but as a quick test to make sure there was nothing glaringly awful about the email itself, I just copy/pasted my membership renewal email content into a new generic mailing and sent myself a test that way.
  
  
  ---
  
  