Alex Rivera | Logout

How to test a scheduling program in php

Asked 2013-07-19T12:08:39.700
8

I have a codeigniter app that schedules events for specific dates and times in a mysql DB, sometimes weeks in advance, with another part that will send email reminders and perform other actions when those dates occur. How would one approach time based testing? Is there a testing suite I could use or read about?

Edit
Report

1 Answer

1

Are you using Cron Jobs, PHP live Scripts or JavaScript? There are many ways to achieve a scheduled time application and each way has its own methods of testing.

Evidently, regardless of what solution you are using and as others have mentioned you can simply adjust the time. Change it to 1 minute to confirm your script is carrying out the specified functions correctly.

Once you are confident that your script is working correctly than you can do a final test for a longer time. Also make sure that you are using some sort of log file. This will make life a lot easier down the track when try to spot errors.

Depending what solution you are using, you can also mock test the database as others have also mentioned however this is dependent on how you are achieving your goal.

Hope that helps

answered 2013-07-25T03:05:04.110

Your Answer