This sample capsule demonstrates how to add "mock data" to your capsule stories for testing purposes. Your capsule might need to work with data that isn't readily available to it within Stories, such as configuration values, or OAuth server responses.
Because you cannot submit a capsule with the
example namespace, in order to test a sample capsule on a device, you must change the
id in the
capsule.bxb file from
example to your organization's namespace before making a private submission.
For example, if your namespace is
To see the capsule in action, open the Simulator and give one of the following utterances, or run one of the provided stories.
config&secretStory, the values from the Developer Console will be overwritten with the mocked values from the story's
config-and-secret-mocks.jsonfile, provided the key names are the same.
oauthStory, this uses the mocked token value from the story's
oauth-mocks.jsonfile without prompting the user.
You can modify the mocked values by editing the appropriate JSON files within the appropriate story folders. The stories are located within