Steno

Slack App testing companion - Record and Replay your HTTP requests, both incoming and outgoing, to generate fixtures for your tests

References:

Guides:

Using Steno with tunnels for development

If you’re developing an app which deals with incoming requests from the Events API, from interactive messages, or from slash commands; you’ll typically use a service such as ngrok to tunnel requests from a public URL into your local development system.

Before we proceed, familiarize yourself with using ngrok to develop locally for Slack. At the end of that tutorial, you’ll have a set up which looks like this:

In the diagram above your app (left) and is running on your local machine and sending its outgoing requests to Slack’s URLs: https://...slack.com/.... Slack (right) is sending its requests to the URLs you set in your app configuration, ngrok’s URLs: https://...ngrok.io/.... You are also running ngrok locally, which tunnels requests from those URLs to the port where your app is listening on, in this case port 5000. This would have been accomplished with the command: ngrok http 5000.

In order to introduce Steno into the mix, we need to place it between your app and ngrok. The diagram below illustrates this setup:

Let’s go over the differences:

Bottom Line

These examples use the default ports for Steno, but here’s a helpful summary using the options expliclty. You can replace the values with your own:

$ steno --replay --app localhost:5000 --out-port 3000 --in-port 3010 # if using --record mode, just omit the --in-port
$ ngrok http 3010