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
Solved! Go to Solution.
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.
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.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.