Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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

share|improve this question
1  
I think the correct way to test this would be to have those 60 or 180 days set by configurable parameters. In test environment, you can set it to something small 5 minute or even 30 seconds if your tests are fast enough. –  Suchit Parikh Aug 7 '13 at 16:29

2 Answers 2

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.

share|improve this answer
1  
Dale is absolutely correct. The "right" way for this to be handled is that the developer should make the code testable by having the ability to substitute the trigger with something other than system clock. Past that, the next best bet is to ask the system administrator to change the system clock. –  Daniel Aug 7 '13 at 19:17

Most systems in test mode can be configured extensively.

Try to find a way to configure this system-under-test to trigger the action requests on demand (and thus under your control).

Failing that, configure the system to trigger action requests on a short duration of your choosing (1 hour? 1 day?).

Is this system under your control for testing purposes?

share|improve this answer
    
No, unfortunately the system is not under my team's control. We are thinking about asking the developers to use shorter durations during our test cycle. –  Mark Brennan Aug 7 '13 at 21:18
    
This approach would allow us to test the scheduled actions as well as the other system events that happen relative to the schedules ones –  Mark Brennan Aug 7 '13 at 21:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.