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)
  1. using gedcomdump, parse EVERY_TAGS.GED in a new file
  2. 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

Requirement ID
Requirement text
Tests
REQ_LIBGEDCOMPARSER_1 libgedcomparser shall provide a data structure to handle genealogical data TEST1
REQ_LIBGEDCOMPARSER_2 libgedcomparser shall provide services to upload a GEDCOM 5.5 file into its data structure TEST1
REQ_LIBGEDCOMPARSER_3 libgedcomparser shall provide services to dump its data structure into a GEDCOM 5.5 file TEST3
REQ_LIBGEDCOMPARSER_4 The 'gedcomcheck' utility included in libgedcomparser shall be able to parse GEDCOM 5.5 files TEST1
REQ_LIBGEDCOMPARSER_5 The 'gedcomcheck' utility shall exit with status '0' if an error occurs during GEDCOM 5.5 parsing (bad file format, file not found) TEST2
TEST4
TEST5
REQ_LIBGEDCOMPARSER_6 The 'gedcomcheck' utility shall display metrics about GEDCOM 5.5 data input : number of individual records, number of family records ; those metrics shall be provided on user request TEST6
TEST7
REQ_LIBGEDCOMPARSER_7 The 'gedcomcheck' utility shall report the execution trace of the GEDCOM 5.5 parsing process ; this execution trace report shall be provided on user request. TEST8
TEST9
REQ_LIBGEDCOMPARSER_8 The 'gedcomcheck' utility shall be sensitive to the following standards GNU options :
-v or --version : give the version of libgedcomparser associated to gedcomcheck
-h or --help : give the available options of gedcomcheck
TEST10
TEST11
TEST12
TEST13
REQ_LIBGEDCOMPARSER_9 All libgedcomparser messages outputs shall support internationalization ; at least English and French languages shall be available TEST14
TEST15
TEST16
TEST17
TEST18
TEST19
TEST20
TEST21
REQ_LIBGEDCOMPARSER_10 libgedcomparser shall provide services to modify genealogical data. Advanced services, assuring data integrity, shall be provided for the following operations:
  • add an individual record
  • add a family record linked to an individual record, in which the individual record is spouse
  • add a family record linked to an individual record, in which the individual record is child
  • define the first name and the last name of an individual record
  • define the date and place for birth and death event of an individual record
  • define the date and place for marriage event of a family record