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.

+

+

'''[http://sourceforge.net/p/gramps/source/ci/master/tree/test/runtest.sh test/runtest.sh]''' - Report test for GRAMPS: Generate every report in every format. 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.

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.

+

'''[http://sourceforge.net/p/gramps/source/ci/master/tree/test/RunAllTests.py test/RunAllTests.py]''' - Testing framework for performing a variety of unttests for GRAMPS. 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.

+

+

Starting with gramps40 branch, these tests include non-automated unit tests only. The automated unit tests are all under gramps/.

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)...

+

GtkHandler testing code pops 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 {{bug|6940}}.

+

=== unit tests in the main tree ===

=== unit tests in the main tree ===

+

python setup.py test

+

+

See [[Unit Test Quickstart]] for detailed running instructions.

+

{| {{prettytable}}

{| {{prettytable}}

! File

! File

Line 44:

Line 47:

|bgcolor="#80ff80"| OK

|bgcolor="#80ff80"| OK

|3 tests

|3 tests

+

|-

+

|gramps/cli/test/user_test.py

+

|bgcolor="#80ff80"| OK

+

|8 tests (6 require mocking to run)

|-

|-

|gramps/gen/test/config_test.py

|gramps/gen/test/config_test.py

|bgcolor="#80ff80"| OK

|bgcolor="#80ff80"| OK

|1 test

|1 test

+

|-

+

|gramps/gen/test/constfunc_test.py

+

|bgcolor="#80ff80"| OK

+

|1 test (linux only, skipped elsewhere)

+

|-

+

|gramps/gen/test/user_test.py

+

|bgcolor="#80ff80"| OK

+

|1 test. See #{{bug|7013}} for context

+

|-

+

|gramps/gen/datehandler/test/datehandler_test.py

+

|bgcolor="#80ff80"| OK

+

|9 tests

+

|-

+

|gramps/gen/db/test/cursor_test.py

+

|bgcolor="#80ff80"| OK

+

|4 tests, 2 skipped

|-

|-

|gramps/gen/db/test/db_test.py

|gramps/gen/db/test/db_test.py

−

|

+

|bgcolor="#80ff80"| OK

−

|Doesn't use unittest module

+

|6 tests

+

|-

+

|gramps/gen/db/test/reference_map_test.py

+

|bgcolor="#80ff80"| OK

+

|5 tests

|-

|-

|gramps/gen/lib/test/date_test.py

|gramps/gen/lib/test/date_test.py

−

|

+

|bgcolor="#80ff80"| OK

−

|

+

|8 tests (locale-based, OK for en, fails for some other locales)

|-

|-

|gramps/gen/lib/test/grampstype_test.py

|gramps/gen/lib/test/grampstype_test.py

Line 62:

Line 89:

|-

|-

|gramps/gen/lib/test/merge_test.py

|gramps/gen/lib/test/merge_test.py

−

|bgcolor="#80ff80"| OK

+

|bgcolor="#ff8080"| FAIL

−

|201 tests

+

|201 tests, 2 failed skipped ({{bug|7027}}- Bug shows resolved)

|-

|-

|gramps/gen/merge/test/merge_ref_test.py

|gramps/gen/merge/test/merge_ref_test.py

−

|

+

|bgcolor="#80ff80"| OK

−

|

+

|53 tests

|-

|-

|gramps/gen/utils/test/callback_test.py

|gramps/gen/utils/test/callback_test.py

Line 76:

Line 103:

|bgcolor="#80ff80"| OK

|bgcolor="#80ff80"| OK

|4 tests

|4 tests

+

|-

+

|gramps/gen/utils/test/place_test.py

+

|bgcolor="#ff8080"| FAIL

+

|28 tests, 4 failures (bug #{{bug|7044}} - Bug shows resolved)

+

|-

+

|gramps/gui/logger/test/rotate_handler_test.py

+

|bgcolor="#80ff80"| OK

+

|2 tests

+

|-

+

|gramps/gui/test/user_test.py

+

|bgcolor="#80ff80"| OK

+

|1 test (requires mocking to run)

|-

|-

|gramps/plugins/export/test/exportvcard_test.py

|gramps/plugins/export/test/exportvcard_test.py

Line 84:

Line 123:

|bgcolor="#80ff80"| OK

|bgcolor="#80ff80"| OK

|66 tests

|66 tests

+

|-

+

|gramps/plugins/importer/test/importxml_test.py

+

|bgcolor="#80ff80"| OK

+

|4 tests

+

|-

+

|gramps/plugins/importer/test/importgeneweb_test.py

+

|bgcolor="#80ff80"| OK

+

|2 tests

|-

|-

|gramps/test/test/gedread_util_test.py

|gramps/test/test/gedread_util_test.py

Line 98:

Line 145:

|-

|-

|}

|}

−

−

There used to be a way to run unit tests from within the main tree (src/ before gramps40, now gramps/). These seem currently broken; they're described at [[Unit Test Quickstart]].

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

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

−

* Relationship calculator testing

+

−

* more!..

+

{| {{prettytable}}

+

! File

+

! Status

+

! Comments

+

|-

+

|gramps/gen/relationship.py

+

|bgcolor="#ff8080"| To Do

+

|Relationship calculator

+

|-

+

|gramps/gen/db/bsddbtxn.py

+

|bgcolor="#ff8080"| To Do

+

|

+

|-

+

|gramps/gen/db/txn.py

+

|bgcolor="#ff8080"| To Do

+

|

+

|-

+

|gramps/gen/db/undoredo.py

+

|bgcolor="#ff8080"| To Do

+

|

+

|-

+

|gramps/gen/db/write.py

+

|bgcolor="#ff8080"| To Do

+

|

+

|-

+

|gramps/gen/db/txn.py

+

|bgcolor="#ff8080"| To Do

+

|

+

|-

+

|gramps/gen/lib/styledtext.py

+

|bgcolor="#ff8080"| To Do

+

|

+

|-

+

|gramps/gen/utils/place.py

+

|bgcolor="#80ff80"| OK

+

|Done

+

|-

+

|gramps/gen/utils/docgen/odstab.py

+

|bgcolor="#ff8080"| To Do

+

|

+

|-

+

|gramps/gen/utils/docgen/csvtab.py

+

|bgcolor="#ff8080"| To Do

+

|

+

|-

+

|gramps/gui/ddtargets.py

+

|bgcolor="#ff8080"| To Do

+

|Not worth running?

+

|-

+

|gramps/gui/widgets/undoablebuffer.py

+

|bgcolor="#ff8080"| To Do

+

|Not worth running?

+

|-

+

|gramps/gui/dialog.py

+

|bgcolor="#ff8080"| To Do

+

|Interactive

+

|-

+

|gramps/gui/widgets/validatedmaskedentry.py

+

|bgcolor="#ff8080"| To Do

+

|Interactive

+

|-

+

|gramps/gui/widgets/progressdialog.py

+

|bgcolor="#ff8080"| To Do

+

|Interactive

+

|-

+

|gramps/gui/widgets/statusbar.py

+

|bgcolor="#ff8080"| To Do

+

|Interactive

+

|-

+

|gramps/plugins/lib/libsubstkeyword.py

+

|bgcolor="#ff8080"| To Do

+

|

+

|-

+

|gramps/plugins/rel/rel_*.py

+

|bgcolor="#ff8080"| To Do

+

|Relationship calculator plugins

+

|-

+

|gramps/plugins/tool/phpgedviewconnector.py

+

|bgcolor="#ff8080"| To Do

+

|

+

|-

+

|}

== Manual test plan ==

== Manual test plan ==

−

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

+

See [http://sourceforge.net/p/gramps/source/ci/master/tree/TestPlan.txt TestPlan.txt] in gramps toplevel. (I believe this is only done at a major release (like 4.0.0)).

Currently used tests and frameworks

testing of reports

test/runtest.sh

test/runtest.sh - Report test for GRAMPS: Generate every report in every format. 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.

Unit testing

test/RunAllTests.py

test/RunAllTests.py - Testing framework for performing a variety of unttests for GRAMPS. 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.

Starting with gramps40 branch, these tests include non-automated unit tests only. The automated unit tests are all under gramps/.

GtkHandler testing code pops 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)...

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. :-(