2019/Online/posttypetest

From IndieWeb

Post Type Testing was a session at IndieWebcamp Online 2019.

Notes archived from https://etherpad.indieweb.org/posttypetest


IndieWebCamp Online 2019
Session: Post Type Testing
When: 2019-03-09 19:00 UTC

Participants

Notes

  • Other purposes:
    • Examples of how to mark up post types
    • Testing micropub endpoint
    • Testing what microsub servers can accept
    • Testing mf2 markup on a post

I imagine there being a few parts to this: 1. A list of example posts in some format that can be converted ( http://examples.tpxl.io/ ) 2. A micropub "client" that can automatically create these posts from the list of posts - this would probably be for people making sites / themes. Also very similar to micropub.rocks but more aimed at testing UI? Would also be very useful if it could easily be run locally for development sites 3. Feeds that can be followed to test a reader. ( h-feed: http://examples.tpxl.io/feeds/hfeed/ ) 4. Doug also mentioned he would like to test that his mf2 markup is correct for a post type with best practices (e.g. His podcast must have an audio file, but would be recommendable to have a name, description and photo)

Jonathan LaCour has created a schema tester that checks if a complete (parsed) microformats2 object seems to contain the expected properties: https://github.com/cleverdevil/microformats2

Mastodon tests mf2 automatically

Different levels of validation (errors, warnings, improvements / notes).

Potentially can run tests automatically in the future to check that nothing has broken

Static Site generators are a thing as well. They might create the post, but there might be a delay and need confirmation that the site has rebuilt before the site tries to test for the existence of the posts (potentially using a button when it's available).

Ryan Barrett and David Shanske have built some unit tests into the Webmention plugin for WordPress. It's not a full test suite, but does catch some common errors.

  • Examples of some errors often seen:
    • Mixing up u- and p- prefixes on properties,
    • Nested h-* objects that end up putting their property name on the same object, actually putting it in a property on its parent
    • Missing u-url in h-* objects that are within an h-feed.
    • u-url (or other, but typically) properties leaking from h-cards all over the page
    • smell: information duplicated a few times

https://indieweb.org/posts - collection of posts and also somewhat ordered by use. Editor draft of PTD: http://ptd.spec.indieweb.org/ - https://indieweb.org/post-type-discovery


See also