Information Technology Reference
In-Depth Information
of the Internet has caused software to support a variety of date input formats. For
example, the U.S. date standard is mm/dd/yyyy, whereas the British date standard
is dd/mm/yyyy. Throw in the spelling or abbreviation of the month represented by
mm, and the date input formats become a sizeable format coding challenge.
Date sort sequencing can also be a signifi cant application problem. If the
application wishes to maintain its records in date order (either ascending or
descending), the application must convert the input date to a yyyy/mm/dd sort format
in order for the year to be the primary sort key, the month to be the secondary sort
key, and the day to be the tertiary sort key.
An alternative approach to converting dates back and forth between sort and
report formats is to calculate the number of days elapsed since some “anchor date”
in the past. If the data are really historical, then systems choose a very old anchor
date like October 15, 1582, the advent of the Gregorian calendar and leap year. If the
data just span a century or two, then January 1, 1800 might be an appropriate anchor
date. Then, every date is sorted in two formats, a display format and number of days
elapsed since the anchor date. The number of days elapsed then becomes a much
simpler sort key to manage, just a positive integer. A secondary advantage of this
calculation and storage of days elapsed is that you have the data structure suffi cient
to readily calculate “date
x days” or “date
y days” or day of the week (Monday,
Tuesday, and so forth).
All of these date calculations are possible sources of date processing error or
failure. The tester can plan and execute most of the date testing by collaborating
with the developers to identify and understand where dates and date calculations are
imbedded in the software input/output design, fi le designs, and database designs.
7.5.6.2
Zero Length Anything
There are a number of programming situations that can produce zero data or counts
or process steps. Here is a partial list.
arrays
blank inputs
divide by zero
loops
pointers
record lengths
records (empty fi les)
sorts
As with the dates, many of these zero items can be forced by pressing the “send”
key when you have supplied no data. Also, where calculations are known to exist,
entering blank or zero for some or all of the input values also force these behaviors.
More specifi c testing might require collaboration with the developer to identify other
potential zero-causing areas of the software.
Search WWH ::




Custom Search