mercredi 15 mars 2017

Is it possible to speed up time for unit testing?

Is there any reasonable way you can speed up (or fake) the passage of time for unit testing? If for instance you want to test signalling in threads, or that some code correctly handles day/month/year date changes in long-running code?

I know you can test things like day/year change in isolated tests but moving towards an integration test it can be nice to be able to run a solid week's time passing without waiting a week... if you have something happening hourly then being able to drive that in some kind of fast-forward mechanism.

Aucun commentaire:

Enregistrer un commentaire