02-20-2017 09:22 PM
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
02-21-2017 06:27 AM
Changing the OS clock is about the only thing you can do to speed up such tests. The primary thing you need to keep in mind is that you can only advance the system clock and should never revert it during the tests. If you are done with testing, you should restore the DB to a state taking before the tests so you can safely revert the system clock to the correct time.
02-21-2017 06:27 AM
Changing the OS clock is about the only thing you can do to speed up such tests. The primary thing you need to keep in mind is that you can only advance the system clock and should never revert it during the tests. If you are done with testing, you should restore the DB to a state taking before the tests so you can safely revert the system clock to the correct time.
Explore our Alfresco products with the links below. Use labels to filter content by product module.