by bengo aka @bengo@mastodon.social
Testing ActivityPub is a daunting task. There are dozens of implementations that don't always work together. The spec has three Conformance Specification Profiles and 50+ requirements refering to 3+ other specifications. Many requirements lack clear testable assertions or otherwise seem complicated to test. It's not always clear where to even begin.
Focus on the 'easy to test' ActivityPub server requirements and improve their testability.
Rationale
In this paper, we categorize the "Difficulty of Server Testing" of an ActivityPub Server Requirement based on the diversity and cardinality of ActivityPub Server Resources that are used in the requirement and/or a complete verification of the requirement. Generally these resources are either served by the ActivityPub Server test target or managed by the testing environment.
By ActivityPub Server Resources, I mean the various resources that an ActivityPub Server might serve. Often a single server hosts all these resources for an Actor, but it is also possible to consider servers that serve only one or a few of them, and there are some requirements that only describe some of these resources in order to test for conformance.
For example, a requirement that tests ActivityPub Server to Server Interactions may involve an ActivityPub Outbox served by the test target as well as an ActivityPub Actor and ActivityPub Inbox managed by the test environment.
These ActivityPub Server Resources are all parts of an ActivityPub Server:
There may be more resources worth describing, but these are the examples required for this illustration.
In order to bucket requirements in a way that, however crude, enables focusing on the 'easy to test' ones, we will use the following categories for "Ease of Server Testing" along with criteria sufficient to add a requirement to that category.
ActivityPub Object
ActivityPub Actor
inbox
- cc3f730a-37a9-4af9-948f-7c8a0b7f6c41 - actor objects must have a valid inbox propertyoutbox
- b8647b47-defb-483c-b468-8602d1124169 - actor object must have a valid outbox propertyActivityPub Outbox
ActivityPub Inbox
ActivityPub Actor Collections
followers
- abef3a0a-d3c4-4dee-a320-b28837d0bcd8 - The followers collection must be either an OrderedCollection or a Collectionfollowing
- a4876ff4-7751-4bc6-91e0-9275382d4a85 - The following collection must be either an OrderedCollection or a Collectionliked
- d2db8da3-25d4-4dd9-9c9c-b2793fd899cf - when actor has a liked
collection, it MUST be Collection or OrderedCollectionActivityPub Object Collections
likes
- f965e989-4084-4f9d-9119-6a7ea13bcb64 - object's likes collection must be either an OrderedCollection or a Collectionshares
- 937ae4e2-dd33-40c7-be1d-3ecac7f9fad5 - The shares collection MUST be either an OrderedCollection or a CollectionThis will be added to over time to record categorization decisions, but has been omitted for now in order to focus on requirements that are easy to test.
This will be added to over time to record categorization decisions, but has been omitted for now in order to focus on requirements that are easy to test.
In this post, I've proposed:
Focus on the 'easy to test' ActivityPub server requirements and improve their testability.
I then proposed a method of categorizing the "Difficulty of Server Testing" for ActivityPub requirements by considering the ActivityPub Server Resources described by the requirement and needed in order to test the requirement in a Test Environment.
I applied this method and the result is a list of 11 requirements with Easy Difficulty of Server Testing (out of 50 total ActivityPub Requirements).
Some next steps for me are:
Some calls to action for you: