Dynamically sending data through request or sessionAttributes for Lex chatbot


I am trying to achieve the following:

Create a document of failed tests, which for a given test includes the Expected/Actual Intent hit, as well as all of the metadata for that request i.e. consideredIntents, nluConfidence and so on.

The issue is that the jest botium doesn’t seem to return the payload/meta data back that Lex provides, when we run the tests.

My idea… Can we send a unique ID per convo file for each test to the Lex Chatbot, perhaps stored as a session or requestAttribute? Then when I see tests fail, I can see this ID and use it to find the event payload which is produced in my CloudWatch logs.

I’ve seen I can configure botium.json with LEX_REQUEST_ATTRIBUTES, but these apply for every test and are not unique per convo file.


Sure, you can use the UPDATE_CUSTOM command to set request or session attributes, see Github repo docs

I would like to order some flowers
1 Like