geary/test
2019-06-13 16:31:26 +10:00
..
client Fix misspellings 2019-05-22 20:47:08 +00:00
data TNEF (winmail.dat) parsing support via libytnef 2019-04-11 12:24:52 +03:00
engine Remove existing contact harvesting mechanism 2019-06-13 16:28:59 +10:00
integration Add simple SMTP integration test 2019-04-24 17:18:03 +10:00
js Make sure we match the whole link text as URL and not only some part. Add some symbols to be invalid in domains. Add 3 tests. 2019-04-27 11:52:51 +02:00
meson.build ContactStoreImpl unit tests 2019-06-13 16:28:55 +10: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.async_complete_full method to avoid requiring a lambda 2019-03-31 01:29:52 +11:00
test-client.vala Add unit tests for app path accessors 2019-04-21 11:13:01 +10:00
test-engine.vala ContactStoreImpl unit tests 2019-06-13 16:28:55 +10:00
test-integration.vala Add simple SMTP integration test 2019-04-24 17:18:03 +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.