How to Test Date Driven Features in GPI have added a new file to the .ini collection – the Keys.ini
This information comes compliments of Alice Newsman from the GP Test Team. Alice explains how to use the file, where to put it and why you NEED to use this file when testing date driven features http://blogs.msdn.com/b/developingfordynamicsgp/archive/2009/12/18/testing-date-driven-features-in-gp.aspx
Download the new file here: http://www.4shared.com/document/Dn7XeHVj/KEYSini_file_settings.html
Several 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.
This setting allows the operating system settings for date, time, and currency formatting to be overridden.
TRUE = Use Dexterity standard formats for date, time, and currency values
FALSE = Use control panel settings for date, time, and currency values
This setting allows control over the year portion of the date values used by StdInternationalInfo
TRUE = Four digits will be used for the year portion of date values
FALSE = Two digits will be used for the year portion of date values
This setting allows control over the date format for SdtInternationalInfo
TRUE = Single-digit day and month values will be prefixed with a 0 (zero)
FALSE = Single-digit day and month values will not be prefixed
The 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.
This command specifies the date value to use for the system date. Note that for this setting the '=' is not included in the switch, it is here just for definition readability. Examples are included to clarify.
'o/s' = Use the operating system date
MM/DD/YY/DOW = Use the date specified, where MM is the month, DD is the date, YY is the year, and DOW is the day of the week
Example: SetEbDateTo date 01/01/1965
This command specifies the time value to use for the system time. Note that for this setting the '=' is not included in the switch, it is here just for definition readability. Examples are included to clarify.
'o/s' = Use the operating system time
time HH:MM:SS = Use the time specified, where HH is the hour (from 0 to 23), MM is the minute, and SS is the second
Example: SetEbTimeTo time 4:15:00
Here is an example of how the switches would look in the Keys.ini file
SetEbDateTo date 01/01/2001
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.