Have you ever had a piece of functionality that is date driven that you wanted to automate a test for but couldn’t figure out the best way to control the dates in the system? Then this post will be very helpful for you! A common area I receive questions on when talking with partners and customers is around automating features such as MRP which is extremely date driven. This post is going to cover settings in the Dex.ini and Keys.ini files that will help you set the system to specific dates and times.
Dex.ini SettingsSeveral settings in the Dex.ini file control the application and enable more consistency to be driven into tests. The below settings will allow you to specify whether you want to use the Control Panel settings for date, time and currency values as well as allowing you to set the preferred format.
Keys.ini SettingsThe Keys.ini file contains commands that are run at startup to configure various system behaviors. The commands in the Keys.ini are run only if the file is included in the command to launch Microsoft Dynamics GP. You create this file using a text editor such as Notepad. The Keys.ini file is typically stored in the Data folder of the Microsoft Dynamics GP installation. To work properly, the Keys.ini file must also have a blank line as the last item in the file. The following commands allow the user to set a static system date and time.
SetEbDateTo
Example: SetEbDateTo date 01/01/1965/3
SetEbTimeTo
Example: SetEbTimeTo time 4:15:00
Here is an example of a Keys.ini file: SetEbDateTo date 01/01/2001/3 SetEbTimeTo 'o/s'
Once the above settings have been specified you will then be able to setup your starting data including specific dates for orders, items, etc to create in-depth testing for date driven features.
Have a great day!AliceGP Test Team
Posting from DynamicAccounting.net
http://msdynamicsgp.blogspot.com/2009/12/development-testing-date-driven.html
PLEASE READ BEFORE POSTING
Please only post comments relating to the topic of this page.
If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.