296
edits
Changes
→Possible improvements: Automated regression tests for our GUI
=Currently used tests and frameworks=
== testing of reports ==
=== test/RunAllTests.py ===
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/.
Bugs tagged as [http://www.gramps-project.org/bugs/search.php?tag_string=found-by-RunAllTests.py found-by-RunAllTests.py]
{| {{prettytable}}
! File
|bgcolor="#80ff80"| OK
|3 tests
|-
|gramps/cli/test/user_test.py
|bgcolor="#80ff80"| OK
|8 tests (6 require mocking to run)
|-
|gramps/gen/test/config_test.py
|bgcolor="#80ff80"| OK
|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
|bgcolor="#80ff80"| OK
|6 tests
|-
|gramps/gen/db/test/reference_map_test.py
|bgcolor="#80ff80"| OK
|5 tests
|-
|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/merge_test.py
|bgcolor="#80ff80ff8080"| OKFAIL|201 tests, 2 failed skipped {{bug|7027}}
|-
|gramps/gen/merge/test/merge_ref_test.py
|bgcolor="#80ff80"| OK|53 tests
|-
|gramps/gen/utils/test/callback_test.py
|bgcolor="#80ff80"| OK
|4 tests
|-
|gramps/gen/utils/test/place_test.py
|bgcolor="#ff8080"| FAIL
|28 tests, 4 failures (bug #{{bug|7044}})
|-
|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
|bgcolor="#80ff80"| OK
|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
|}
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]].is also semi-interactive testing via __main__ in some code:
== Manual test plan ==
=Possible improvements=
* unify running all the tests, in- or out- tree
** Try switching the feature tests and non-automated unit tests in test/ from our runners runner scripts to [http://docs.python.org/2/library/unittest.html#test-based discovery python native unittest discovery mechanism]. ** Integrate with "python we have a stale gramps/test/regrtest.py runner, notable for logging init. - should we revive that, or maybe integrate into setup.py"test runner? (need to split interactive vs non-interactive first to allow fully automated runs)
* 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?)
* Automated regression tests for our GUI. The following links look interesting:
** http://unpythonic.blogspot.co.il/2007/03/unit-testing-pygtk.html
** http://ldtp.freedesktop.org/wiki/
=See also=
* [[Unit Test Quickstart]] (obsolete? need to revive the in-tree unit tests, now that runtest.sh and RunAllTests.py run again!)
[[Category:Developers/Reference]]
[[Category:Developers/Quality Assurance]]