AnsweredAssumed Answered

How to "simulate" days passing, for audit test purposes? Temper with OS date?

Question asked by nicolasraoul on Feb 21, 2017
Latest reply on Feb 21, 2017 by afaust

I must write tests for an Alfresco auditing application (based on Alfresco audit) that lets administrators search for audit data per day. For instance, an administrator can ask for today's audit records, or yesterday's audit records.

 

So, a naive test for the "yesterday" feature would be: "Perform action X. Come back the next day and check whether it appears in yesterday's audit records."

Unfortunately, all tests must be performed in a single day on the customer's test environment.

 

Question: How can I "simulate" activity for yesterday? Or make Alfresco believe that we are tomorrow already?

 

I have thought about tempering with the operating system date, but would that make Alfresco behave unpredictably, thus making the test results worthless?

 

Thanks a lot!

Nicolas Raoul

Outcomes