Skip to content

jaffamonkey/python3-test-ibm-watson-chatbot

Repository files navigation

Coverage

  • Get intent examples for workspace
  • Get intent examples for workspace, based on word count
  • Show all intents for workspace
  • Change message string depending on value assigned to changeType
  • Full json reports for each intent, with response data
  • Summary report of correct matching intents
  • Log files for request or Watson API exception errors

input folder contains the imported messages files report folder holds the results file with all response data logs folder hold all data related to errors

Pre-requisistes

brew update
brew install python3
pip3 install -r requirements.txt
cp config.example.conf config.conf

Complete the config.conf file

Before running a script, assign workspace id to the environment variable SPACE_ID

export SPACE_ID=workspace-id

To get current workspace ids:

curl -u "workspace-user-id":"workspace-password" "workspace-url"```

To run

python3 sendallmessages.py

Delete empty log files

find ./logs/ -type f -size 0 -exec rm -f {} \;

Tidy json response files

From the report directory:

find ./ -exec sed -i '' '1s/^{/[&/' {} \;
find ./ -exec sed -i '' '$ s/.$/]/' {} \;

Run analysis on json responses for different scenarios (compared to baseline)

python3 jsoncompare.py file1.json file2.json > output.txt

Extract all 1, 2, and 3 word examples and stores in files.

python3 extractwordsmatchingcount.py

About

Python scripts to perform bulk and single tests against chatbot using IBM Watson

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages