geary/test
Michael Gratton 8dcab7f306 Geary.SpecialFolderType: Rename class and related properties, signals
The `SpecialFolderType` was somewhat mis-named, since the special use
does not (in most cases) confer any special type, rather it's simply
defines what a particular folder is used /for/.

As such, rename the enum to to `Geary.Folder.SpecialUse`, moving it in
to the `Folder` class, since it relates specifically to folders, also
rename `Folder::special_folder_type` and
`Folder::special_folder_type_changed` reflect the above and not
duplicate the type name, and similarly rename
`Account::folders_special_type`.

Update the many call sites.
2020-03-31 16:15:57 +11:00
..
client Util.Avatar::extract_initials_from_name: Don't strip diacritics 2020-03-17 22:43:50 +11:00
data Added a few tests for RFC822.Message 2019-11-17 16:40:13 +11:00
engine Geary.SpecialFolderType: Rename class and related properties, signals 2020-03-31 16:15:57 +11:00
integration Simply Geary.Imap.ClientService selected mailbox handling 2020-03-27 08:29:14 +11:00
js Revert "Merge branch 'mjog/558-webkit-shared-process' into 'mainline'" 2020-02-13 12:56:52 +11:00
meson.build Add unit test for Geary.Imap.ClientSession 2020-03-27 08:29:14 +11:00
mock-object.vala Add support for uint args in expected calls in MockObject 2019-06-13 16:31:26 +10:00
README.md Add initial integration test famework and IMAP client session tests 2019-03-31 02:05:14 +11:00
test-case.vala Add TestCase.assert_double 2020-03-27 08:29:14 +11:00
test-client.vala Revert "Merge branch 'mjog/558-webkit-shared-process' into 'mainline'" 2020-02-13 12:56:52 +11:00
test-engine.vala Add unit test for Geary.Imap.ClientSession 2020-03-27 08:29:14 +11:00
test-integration.vala Switch to using GLib structured logging 2019-06-30 16:15:03 +10:00
test-server.vala Add a simple mock server for testing network code 2020-03-27 08:29:14 +11: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.