Lex V2 bot testing with Botium CLI - invalid request

Using Botium CLI, no problems testing V1 bots with the AWS Lex instance provided by my company.

Trying to do the same thing with V2 bots (migrated or new) always generates the same error, even though I know both the bot name and bot alias exist - have tried with numerous different bot and alias combinations.

  "LEX_PROJECT_NAME": "BookTripTestBot",
  "LEX_PROJECT_ALIAS": "TestBotAlias",
  "LEX_VERSION": "V2"

Error: Test Case for: RequestAdviser/RequestAdviser-L4/Line 3: error sending to bot - Lex V2 answered with error: INVALID_REQUEST - Invalid bot name or alias

Some progress. Swapping the first two name strings for ID strings seems to allow Lex to process the Botium request, however I now get this error:

Error: Test Case for: RequestAdviser/RequestAdviser-L5/Line 3: error sending to bot - Lex V2 answered with error: The bot alias and locale in your request point to a version that hasn’t been built successfully. Check the version that your alias and locale point to, and try again.

This happens whichever bot / alias combo I try, including the default Lex ones!

Cracked it with the help of someone who knows a lot more about Lex than I do!

  "LEX_PROJECT_NAME": "GZDEXRJAXQ",
  "LEX_PROJECT_ALIAS": "TSTALIASID",
  "LEX_VERSION": "V2",
  "LEX_LOCALE": "en_GB"

The key addition on top of the ID strings being the LOCALE. I couldn’t find this documented anywhere, at least not here where it probably should be:

1 Like

Thanks for the hint. Updated the docs on Github!

1 Like