โ€น back home

libdav live test results

2023-04-27 #status-update #vdirsyncer

One of my goals for re-writing vdirsyncer was to write “live tests”. These tests are series of operations against a real CalDav server, failing if the server doesn’t behave as expected (or if it doesn’t support a specific feature).

I’ve had this working for a couple of weeks now, and while it always feels like “it could be better” (the code quality isn’t great, but it’s also not my worst), the reality is that it fulfils its goal and can be improved later as needed. This is, after all, a test tool, and not something end-user facing.

Profiles

Profiles are tiny files which contain all the information run these integration tests with a real server. Here’s the one for baikal as an example:

host = "http://localhost:8002"
username = "baikal"
password = "baikal"

[xfail]
CreateAndDeleteCollection = "https://github.com/sabre-io/Baikal/issues/1182"

The xfail second lists tests that are known to fail with a given server. This helps detect any new regressions, since a couple of tests are known to fail due to servers not implementing some required features.

Results

I’ve tried to make the results as easy to read as possible, since I like to run these tests again when I change something internally to make sure it doesn’t break with any servers.

These are the current results:

๐Ÿ—“๏ธ Running tests for: live_tests/xandikos.profile
- CreateAndDeleteCollection: โœ… passed
- CreateAndForceDeleteCollection: โœ… passed
- SetAndGetDisplayName: โœ… passed
- SetAndGetColour: โœ… passed
- CreateAndDeleteResource: โœ… passed
- CreateAndFetchResource: โœ… passed
- FetchMissingResource: โœ… passed
- CheckAdvertisesSupport: โœ… passed
โœ… Tests 8 completed.

๐Ÿ—“๏ธ Running tests for: live_tests/baikal.profile
- CreateAndDeleteCollection: โš ๏ธ expected failure: https://github.com/sabre-io/Baikal/issues/1182
- CreateAndForceDeleteCollection: โœ… passed
- SetAndGetDisplayName: โœ… passed
- SetAndGetColour: โœ… passed
- CreateAndDeleteResource: โœ… passed
- CreateAndFetchResource: โœ… passed
- FetchMissingResource: โœ… passed
- CheckAdvertisesSupport: โœ… passed
โœ… Tests 8 completed.

๐Ÿ—“๏ธ Running tests for: live_tests/radicale.profile
- CreateAndDeleteCollection: โœ… passed
- CreateAndForceDeleteCollection: โœ… passed
- SetAndGetDisplayName: โœ… passed
- SetAndGetColour: โœ… passed
- CreateAndDeleteResource: โœ… passed
- CreateAndFetchResource: โœ… passed
- FetchMissingResource: โœ… passed
- CheckAdvertisesSupport: โœ… passed
โœ… Tests 8 completed.

๐Ÿ—“๏ธ Running tests for: live_tests/fastmail.profile
- CreateAndDeleteCollection: โš ๏ธ expected failure: precondition failed
- CreateAndForceDeleteCollection: โœ… passed
- SetAndGetDisplayName: โœ… passed
- SetAndGetColour: โš ๏ธ expected failure: https://github.com/cyrusimap/cyrus-imapd/issues/4489
- CreateAndDeleteResource: โœ… passed
- CreateAndFetchResource: โœ… passed
- FetchMissingResource: โœ… passed
- CheckAdvertisesSupport: โš ๏ธ expected failure: server does not adviertise caldav support (unreported)
โœ… Tests 8 completed.

๐Ÿ—“๏ธ Running tests for: live_tests/nextcloud.profile
- CreateAndDeleteCollection: โš ๏ธ expected failure: server does not return etags (unreported)
- CreateAndForceDeleteCollection: โœ… passed
- SetAndGetDisplayName: โœ… passed
- SetAndGetColour: โœ… passed
- CreateAndDeleteResource: โœ… passed
- CreateAndFetchResource: โœ… passed
- FetchMissingResource: โœ… passed
- CheckAdvertisesSupport: โš ๏ธ expected failure: https://github.com/nextcloud/server/issues/37374
โœ… Tests 8 completed.

As you can see, these tests cover all the “primitive” operations. Everything else is built on top of them, so as long as they work, more complex flows should work too. I’ll of course refine as needed if I find any bugs along the way.

The source is available in the vdirsyncer-rs repository.

Have comments or want to discuss this topic?
Send an email to my public inbox: ~whynothugo/public-inbox@lists.sr.ht.
Or feel free to reply privately by email: hugo@whynothugo.nl.

— ยง —