geary/test
Michael Gratton 4fe0d92147 engine: Convert from SQLite FTS3/4 to FTS5 for full-text-search
Add SQL migration that drops the old FTS4 MessageSearchTable table,
re-create as a FTS5 table, clean up the column names a bit, and adds a
flags column so unread/starred queries can be made fast.

Define a SQLite FTS5 extension function `geary_matches()` to replace
the FTS3 `offsets()` function which no longer exists in FTS5, based on
Tracker's implementation.

Update code to FTS5 conventions (docid -> rowid, etc), use new column
names, populate and update the flags column as the email's flags
change, and use new match function for getting matching tokens.

Advanced searches are probably currently broken, these will be fixed
by subsequent commits.
2021-01-19 20:48:17 +11:00
..
client Util.JS: Remove now-unused code 2020-10-13 00:02:09 +11:00
data build: Reduce verbosity of meson vars by removing geary_ prefixes 2020-08-13 19:51:33 +10:00
engine engine: Convert from SQLite FTS3/4 to FTS5 for full-text-search 2021-01-19 20:48:17 +11:00
integration Geary.Imap.ClientSession: Treat logout as disconnect 2020-09-27 17:38:10 +10:00
js ComposerPageState: Use CSS for managing focus with composer body parts 2020-10-13 00:02:09 +11:00
mock Geary.Account: Add {de}register_local_folder methods 2020-08-18 16:32:26 +10:00
meson.build Merge branch 'mjog/558-webkit-shared-process-redux' into 'mainline' 2020-10-13 08:27:01 +00:00
README.md Add initial integration test famework and IMAP client session tests 2019-03-31 02:05:14 +11:00
test-case.vala Update existing tests to work with ValaUnit 2020-06-30 17:31:07 +10:00
test-client.vala Revert "Revert "Merge branch 'mjog/558-webkit-shared-process' into 'mainline'"" 2020-10-13 00:02:02 +11:00
test-engine.vala Geary.Imap: Add quirk for Envelope address structure placeholders 2020-08-18 16:34:24 +10:00
test-integration.vala Update existing tests to work with ValaUnit 2020-06-30 17:31:07 +10:00
test-server.vala test/test-server.vala: Fix build warning 2020-05-06 14:58:56 +10:00

Automated Test Infrastructure

Geary currently supports three types of automated tests:

  • Engine unit tests
  • Client (GTK and JavaScript) unit tests
  • Server integration tests

Unit tests

Unit tests test individual functions, in general avoid doing any I/O so they are fast, and can be run automatically.

The engine and client unit tests are hooked up to the Meson build, so you can use Meson's test infrastructure to build and run them. These are run automatically as part of the Gitlab CI process and if you use the development Makefile, you can execute them locally by simply calling:

make test

The engine tests can be run headless (i.e. without an X11 or Wayland session), but the client tests require a functioning display since they execute GTK code.

Integration tests

Integration tests run Geary's network code against actual servers, to ensure that the code also works in the real world.

The integration tests are built by default, but not currently hooked up to Meson and are not automatically run by Gitlab CI, since they require multiple working servers, network connection to the servers, and login credentials.

You can run them manually however against any server you have a test account on, using the following form:

build/test/test-integration PROTOCOL PROVIDER [HOSTNAME] LOGIN PASSWORD

For example, to test against GMail's IMAP service:

build/test/test-integration imap gmail test@gmail.com p455w04d

If PROVIDER is other, then HOSTNAME is required.

The easiest way to test against a number of different servers at the moment is to create a test account for each, then write a shell script or similar to execute the tests against each in turn.