@ovotech/genesys-web-messaging-tester-cli v3.0.2
Genesys Web Messaging Tester
This tool automatically tests Genesys' Web Messenger Deployments against scenarios in a YAML file. This makes testing:
- Fast - spot problems with your flow sooner than manually testing
- Repeatable - scenarios in test scripts are run exactly as defined. Any response that deviates is flagged
- Customer focused - expected behaviour can be defined as test-script scenarios before development commences
- Automatic - being a CLI tool means it can be integrated into your CI/CD pipeline, or run on a scheduled basis e.g. to monitor production
The above test is using the test-script:
config:
deploymentId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
region: xxxx.pure.cloud
scenarios:
"Accept Survey":
- say: hi
- waitForReplyContaining: Can we ask you some questions about your experience today?
- say: Yes
- waitForReplyMatching: Thank you! Now for the next question[\.]+
"Decline Survey":
- say: hi
- waitForReplyContaining: Can we ask you some questions about your experience today?
- say: No
- waitForReplyContaining: Maybe next time. Goodbye
"Provide Incorrect Answer to Survey Question":
- say: hi
- waitForReplyContaining: Can we ask you some questions about your experience today?
- say: Not sure
- waitForReplyContaining: Sorry I didn't understand you. Please answer with either 'yes' or 'no'
- waitForReplyContaining: Can we ask you some questions about your experience today?
How it works
The tool uses Web Messenger's guest API to simulate a customer talking to a Web Messenger Deployment. Once the tool starts an interaction it follows instructions defined in a file called a 'test-script', which tells it what to say and what it should expect in response. If the response deviates from the test-script then the tool flags the test as a failure, otherwise the test passes.
Quick Start
Prepare your system by installing node
Install the CLI tool using npm
:
npm install -g @ovotech/genesys-web-messaging-tester-cli
Write a test-script containing all the scenarios you wish to run along with the ID and region of your Web Messenger Deployment.
config:
deploymentId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
region: xxxx.pure.cloud
scenarios:
"Accept Survey":
- say: hi
- waitForReplyContaining: Can we ask you some questions about your experience today?
- say: Yes
- waitForReplyMatching: Thank you! Now for the next question[\.]+
"Decline Survey":
- say: hi
- waitForReplyContaining: Can we ask you some questions about your experience today?
- say: No
- waitForReplyContaining: Maybe next time. Goodbye
"Provide Incorrect Answer to Survey Question":
- say: hi
- waitForReplyContaining: Can we ask you some questions about your experience today?
- say: Not sure
- waitForReplyContaining: Sorry I didn't understand you. Please answer with either 'yes' or 'no'
- waitForReplyContaining: Can we ask you some questions about your experience today?
Then run the test by pointing to the test-script in the terminal:
web-messaging-tester tests/example.yml
Examples
$ web-messaging-tester --help
Usage: web-messaging-tester [options] <filePath>
Arguments:
filePath Path of the YAML test-script file
Options:
-id, --deployment-id <deploymentId> Web Messenger Deployment's ID
-r, --region <region> Region of Genesys instance that hosts the Web Messenger Deployment
-o, --origin <origin> Origin domain used for restricting Web Messenger Deployment
-p, --parallel <number> Maximum scenarios to run in parallel (default: 1)
-a, --associate-id Associate tests their conversation ID.
This requires the following environment variables to be set for an OAuth client
with the role conversation:webmessaging:view:
GENESYS_REGION
GENESYSCLOUD_OAUTHCLIENT_ID
GENESYSCLOUD_OAUTHCLIENT_SECRET (default: false)
-fo, --failures-only Only output failures (default: false)
-h, --help display help for command
Override Deployment ID and Region in test-script file:
web-messaging-tester test-script.yaml -id 00000000-0000-0000-0000-000000000000 -r xxxx.pure.cloud
Run 10 scenarios in parallel:
web-messaging-tester test-script.yaml --parallel 10
Development
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
5 months ago
6 months ago
6 months ago
9 months ago
10 months ago
10 months ago
10 months ago
9 months ago
8 months ago
10 months ago
9 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago