How to automate a test case which requires an overnight batch job to run?
The test scenario goes like this -
Change a value in config -> A job will execute at midnight -> config change will be update in system -> Verify that new config value is reflected.
Now how to wait for 24 hours for result verification. Any strategy for this kind of test cases
Have the developers provide you with a way of triggering the scheduled task outside of its normal time slot.
Where I currently work this is provided as a webpage that has all of the possible scheduled tasks for a service, with buttons to trigger each one manually.
We use this page during our automated tests, and then observe the result.
We also do a manual check to make sure that the job itself has been scheduled correctly, e.g. it runs at midnight without being manually triggered.