Testing a system with scheduled, event-driven data changes



  • I am testing a software system that forces users to take action on their data every 60 or 180 days. The users get notified when the due date is approaching or if they have missed one. These users can also request an extension to the due date.

    We can't test this in real time because the durations are just too long. Right now I am struggling with how to test this system within a several week test cycle. I can think of two ways to handle this.

    1. Have the system trigger action requests every two or three days instead of 60 or 180.
    2. Become friendly with a system administrator who will change the server clock for me when I need it.

    Are there other approaches to testing this type of scenario? I realize that this isn't a new problem so I want to learn about how others have have handled it.

    Thanks



  • The key challenge is getting control of either:

    1. the thing that triggers action requests.
    2. the clock by which the system determines what time it is.

    The other answers (and your question) have already mentioned the first possibility, so I'll focus on the second.

    When I design systems like this, I try to arrange for the clock to be substitutable. For the production system, I use the system clock. For tests, I allow the tests to supply a clock that they can control.

    Is that a possibility for you? If the system is not designed with a substitutable clock, consider asking for that. This is, admittedly, a huge favor to ask from developers.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2