Testing Examples

The sample Apex SDK for Slack app contains an example implementation of the test harness.

The follow sections show examples from the sample app.

This example creates an account record and views it in a modal. It runs a test for the ViewRecordCommandDispatcher.cls Apex action in the sample app.

This example creates a user session, opens the app's home tab, and asserts the content rendered by the view definition. It runs a test for the AppHomeOpened.cls Apex action in the sample app.

This example creates a user session and test several events: channel_rename, group_rename, reaction_added, and reaction_removed. It runs a test for the EventDispatcherEventExample.cls Apex action in the sample app.