Test inputs
BINARY_FILE.GED:
a binary file
EVERY_TAGS.GED:
a GEDCOM 5.5 file containing every TAG defined in the GEDCOM 5.5
standard,
including every date formats, every events
HEADER.GED:
a GEDCOM 5.5 file containing only a header structure
NOT_GEDCOM_COMPLIANT.GED:
a text file not compliant with GEDCOM 5.5 standard
ONE_FAMILY.GED:
a GEDCOM 5.5 file containing 3 individuals 'father' 'mother' and
'child',
in which those 3 records are linked into a family
Tests scripts and programs
gedcomdump: parse the GEDCOM file given as first parameter,
and
dump the genealogical data into the output file given as second
parameter
gedcom_printevents:
parse the GEDCOM file given as first parameter, and output all the
events
found (event type and event date) ;
gedcom_printevents shall
support
internationalization
gedcom_print_parents:
parse the GEDCOM file given as first parameter, and for each individual
record found in the transmission, output the parents
Regression tests automation
When a test is passed, its expected output can be recorded in order to
re-execute
the test in case of modification of the global software.
Note: during this re-execution, if the test fails, it has to be
re-executed
manually for further analysis (the output may be modified by the
modification,
in such case the behavior may still be correct but differences between
effective
output and previously recorded output may occur).
Implementation:
make check
make
check-i18n #works only in the tests/req-based directory
Tests procedures
Each test procedure shall be implemented through a
<test id>.sh
script.
The
<test id>.sh
script shall not need any parameter, and print all messages on the
standard
output.
TEST1
Operation: use
gedcomcheck
to parse
EVERY_TAGS.GED
Expected result: parsing successful
TEST2
Operation: use
gedcomcheck
with an invalid filename (a file which does not exist)
Expected result: parsing unsuccessful
TEST3
Operation: (using
gedcomdump)
- using gedcomdump, parse EVERY_TAGS.GED in a new
file
- using gedcomcheck, parse the
resulting
GEDCOM 5.5 file
Expected result: parsing successful
TEST4
Operation: use
gedcomcheck
to parse
BINARY_FILE.GED
Expected result: parsing unsuccessful
TEST5
Operation: use
gedcomcheck
to parse
NOT_GEDCOM_COMPLIANT.GED
Expected result: parsing unsuccessful
TEST6
Operation: use
gedcomcheck
with the metrics option, to parse
HEADER.GED
Expected result: parsing successful ; metrics displayed : 0
individual,
0 family record
TEST7
Operation: use
gedcomcheck
with the metrics option, to parse
ONE_FAMILY.GED
Expected result: parsing successful ; metrics displayed : 3
individuals,
1 family record
TEST8
Operation: use
gedcomcheck
with the trace option, to parse
ONE_FAMILY.GED
Expected result: parsing successful ; trace execution displayed
TEST9
Operation: use
gedcomcheck
with the trace option, to parse
NOT_GEDCOM_COMPLIANT.GED
Expected result: parsing unsuccessful ; trace execution
displayed until
error occurs
TEST10
Operation: execute
gedcomcheck
-v
Expected result: gedcomcheck
return success ; version of the
libgedcomparser package
displayed
TEST11
Operation: execute
gedcomcheck
--version
Expected result: gedcomcheck
return success ; version of the
libgedcomparser package
displayed
TEST12
Operation: execute
gedcomcheck
-h
Expected result: gedcomcheck
return success ;
gedcomcheck
available options displayed
TEST13
Operation: execute
gedcomcheck
--help
Expected result: gedcomcheck
return success ;
gedcomcheck
available options displayed
TEST14
Operation:
set
LANG=fr
execute
gedcomcheck --help
Expected result: the output message (help) shall be in French
TEST15
Operation:
set
LANG=fr
execute
gedcomcheck
--version
Expected result: the output message (version) shall be in French
TEST16
Operation:
set
LANG=fr
execute
gedcomcheck
ONE_FAMILY.GED
Expected result: the output message (parsing successful) shall
be in
French
TEST17
Operation:
set
LANG=fr
execute
gedcomcheck
NOT_GEDCOM_COMPLIANT.GED
Expected result: the output message (parsing unsuccessful) shall
be
in French
TEST18
Operation:
set
LANG=fr
execute
gedcomcheck
--metrics
ONE_FAMILY.GED
Expected result: the output message (metrics) shall be in French
TEST19
Operation:
set
LANG=fr
execute
gedcomcheck
--verbose
ONE_FAMILY.GED
Expected result: the output message (trace execution) shall be
in French
TEST20
Operation:
set
LANG=fr
using
gedcom_printevents, parse EVERY_TAGS.GED
Expected result: output message (event type and date) shall be
in French
TEST21
Operation:
set
LANG=en
execute
gedcomcheck --help
Expected result: the output message (help) shall be in English
TEST22
Operation:
set
LANG=en
execute
gedcomcheck
--version
Expected result: the output message (version) shall be in
English
TEST23
Operation:
set
LANG=en
execute
gedcomcheck
ONE_FAMILY.GED
Expected result: the output message (parsing successful) shall
be in
English
TEST24
Operation:
set
LANG=en
execute
gedcomcheck
NOT_GEDCOM_COMPLIANT.GED
Expected result: the output message (parsing unsuccessful) shall
be
in English
TEST25
Operation:
set
LANG=en
execute
gedcomcheck
--metrics
ONE_FAMILY.GED
Expected result: the output message (metrics) shall be in
English
TEST26
Operation:
set
LANG=en
execute
gedcomcheck
--verbose
ONE_FAMILY.GED
Expected result: the output message (trace execution) shall be
in English
TEST27
Operation:
set
LANG=en
using
gedcom_printevents,
parse
EVERY_TAGS.GED
Expected result: output message (event type and date) shall be
in English
TEST28
Operation:
using
gedcom_printparents,
parse
ONE_FAMILY.GED
Expected result: for the child, print his parents; for the
father and the mother, no parents shall be found
Traceability