codeforequity-at / codeforequity-at/botium-core
Botium CLI Fails to Recognize Convos and Utterances in JSON Format
- Dominant language
- JavaScript
- Stars
- 251
- Forks
- 70
- Avg merge
- 3h 37m
- Merged PRs (30d)
- 7
Description
I am facing an issue where Botium fails to recognize utterances defined in a JSON file. Despite following the documentation and ensuring that the project structure, configurations, and file contents are correctly set up, the CLI doesn't seem to detect the utterances.
**To Reproduce**
Steps to reproduce the behavior.
**Expected behavior**
.
├── botium.json
├── convos
│ └── example.convo.json
├── utterances
│ └── utterances.json
└── credentials
└── dialogflow-key.json
**botium.json Configuration:**
json
Copy code
{
"botium": {
"Capabilities": {
"PROJECTNAME": "dialogflow-sample",
"CONTAINERMODE": "dialogflow",
"DIALOGFLOW_PROJECT_ID": "botium-443212",
"DIALOGFLOW_CLIENT_EMAIL": "botium-chat-test@botium-443212.iam.gserviceaccount.com",
"DIALOGFLOW_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\n\n-----END PRIVATE KEY-----",
"CONVOFILES": ["./convos/*.json"],
"UTTERANCES": "./utterances/utterances.json",
"SCRIPTING_UTTEXPANSION_MODE": "all",
"SCRIPTING_MATCHING_MODE": "wildcardIgnoreCase"
}
}
}
Contents of example.convo.json:
json
Copy code
[
{
"name": "Example Conversation",
"steps": [
{ "sender": "me", "messageText": "hi" },
{ "sender": "bot", "messageText": "BOT_GREETING_UTT" }
]
}
]
{
"BOT_GREETING_UTT": [
"Hi! How are you doing?",
"Good day! What can I do for you today?",
"Greetings! How can I assist?",
"Hello! How can I help you?"
]
}
**Botium Flavour:**
- Botium CLI
**Botium Version**
Botium Core: 1.11.15
Botium CLI: 1.11.15
**Additional context**
Botium should process the example.convo.json file and match the bot's response to the utterances defined in utterances.json. It should execute the test cases successfully.
Screenshots and Log files
**Output log from running botium-cli run --verbose:**
scss
Copy code
botium-cli Using Botium configuration file ./botium.json +0ms
botium-core-ScriptingProvider ReadConvosFromDirectory(.) found convos:
botium-core-ScriptingProvider none +10ms
botium-core-ScriptingProvider ReadConvosFromDirectory(.) found utterances:
botium-core-ScriptingProvider none +0ms
botium-core-ScriptingProvider ReadConvosFromDirectory(.) found partial convos:
botium-core-ScriptingProvider none +0ms
Botium Version
Botium Core: 1.11.15
Botium CLI: 1.11.15
Contributor guide
Assessment
This issue has not been assessed yet.