SSB Testing Guide

This can be found on git-ssb ssb://%0h4DOgNbTfEufWGKW8RbbhCXa76U0AglQSbn/cD4Pjc=.sha256

hermit crab shells

This is the start of a collection of patterns we've found useful for doing testing in the Scuttlebutt ecosystem

Areas it will hopefully cover (over time):

  • message schemas/ validations
  • writing and reading from the database:
    • callback style
    • streaming style
  • flume indexes
  • UI components
  • ...

Tools it these will help you get familiar with:

Exercises

Exercise 1

Get acquainted with testing with the tape module

Exercise 2

Learn the basics of working with ssb-server and how it can easily be tested with tape

Exercise 3

Publish a message to a secure-scuttlebut sigchain. Retrieve the message from the database using pull-stream methods.

Three exercises focused on flumeview-reduce, a view layer on top of the secure-scuttlebutt database. Begin with a simple example in exercise one and iterate in lessons two and three.

Exercise 1

Working with flumeview-level! Create a secure-scuttlebutt plugin that will build a customized view of the messages in the database.

Tests include many examples of useful pull-stream methods.

Exercise 2

Working with bytewise queries and be sure to review the tests for some good examples of live streaming messages.

TODO