Difference between revisions of "Testing Gramps"

From Gramps
Jump to: navigation, search
(unit tests in the main tree)
m (unit tests in the main tree: bug hlink)
Line 77: Line 77:
|bgcolor="#80ff80"| OK
|bgcolor="#80ff80"| OK
|53 tests, 2 failures (bug #6960)
|53 tests, 2 failures (bug #{{bug|6960}})

Revision as of 10:34, 30 July 2013


Please update or expand this section.

Currently used tests and frameworks

testing of reports


Runs all possible reports using the report cli interface, based on the example.gramps database. This test is not fully self-contained, in that it depends on various environment settings, such as your locale, your preferred name display formats, and your report options. Last, but not the least, the verification of the resulting reports is entirely manual.

Bugs tagged as found-by-runtest.sh

other report testing

See more specialized scripts in test/, status unknown.


Import/export test for GRAMPS.

From the file header:

  • Import example XML data and create internal Gramps DB
  • Open produced Gramps DB, then
    • check data for integrity
    • output in all formats
  • Check resulting XML for well-formedness and validate it against DTD and RelaxNG schema.
  • Import every exported file produced if the format is also supported for import, and run a text summary report.
  • Diff each report with the summary of the produced example DB.

Bugs tagged as found-by-impex.sh

Unit testing


Runs out-of-tree (not in gramps/) testing code, by looking for any test/*_Test.py files and executing the test suites therein. See the current code in test/*_Test.py for example and python standard unittest docs.

Bugs tagged as found-by-RunAllTests.py

Two tests in GtkHandler testing code pop up the GRAMPS error dialog, but this is actually for testing the error reporting itself. Don't be scared by the dialog, it's expected. Your manual work is required to close the dialogs with the "Cancel" button. The relevant tests still pass (unless there's another bug there)...

One test currently fails, see 6940.

unit tests in the main tree

See Unit Test Quickstart for running instructions.

File Status Comments
gramps/cli/test/cli_test.py OK 3 tests
gramps/gen/test/config_test.py OK 1 test
gramps/gen/db/test/cursor_test.py OK 4 tests
gramps/gen/db/test/db_test.py OK 6 tests
gramps/gen/db/test/reference_map_test.py OK 5 tests
gramps/gen/lib/test/grampstype_test.py OK 3 tests
gramps/gen/lib/test/merge_test.py OK 201 tests
gramps/gen/merge/test/merge_ref_test.py OK 53 tests, 2 failures (bug #6960)
gramps/gen/utils/test/callback_test.py OK 10 tests
gramps/gen/utils/test/keyword_test.py OK 4 tests
gramps/plugins/export/test/exportvcard_test.py OK 28 tests
gramps/plugins/importer/test/importvcard_test.py OK 66 tests
gramps/test/test/gedread_util_test.py No longer required?
gramps/test/test/test_util_test.py No longer required?

There is also semi-interactive testing via __main__ in some code:

  • Relationship calculator testing
  • more!..

Manual test plan

See TestPlan.txt in gramps toplevel. I believe this is only done at a major release (like 4.0.0).

Test status

We currently don't have a record of tests executed, the platforms and environments they were run upon, and what code they covered. The only indirect evidence is available in open bugs, when people care to fill in these details. :-(

Possible improvements

  • revive the in-tree tests
  • unify running all the tests, in- or out- tree
  • coverage analysis
  • (needs server capacity to be hosted online) continous test status report, coverage, automatic deployment into win/mac/linux VMs (I can dream, can't I?)

See also