Skip to content

TestBot

ear-dev edited this page Sep 2, 2022 · 10 revisions

This wiki describes how to configure your local RC server during development to run our cypress test suite against the testbot and salesforce emulator.

  • The testbot and sf_emulator are designed to test most of the features in Rocketchat, Dialogflow.app, and Salesforce.app that are required for our end to end production environment. i.e. timer_payloads, escalations, UI issues like agent icons, survey link, close chat behavior, etc...
  • We use this as a regression test, and when we add new features we add new tests to verify that the features work as designed.
  • It is a good idea to run these tests especially after catchup merges, refactors, etc..

NOTE: Currently we always run these tests before deploying any new versions to prod

Requirements

  • A test RC server running on localhost
    • A user on the server: test-bot with username: test-bot with permsissions: bot and livechat-agent.
    • A user on the server: Viasat Virtual Assistant with username: liveagent with permissions: bot and livechat-agent.
    • An Omnichannel Department confgured named test-bot that uses the agent named test-bot
    • An Omnichannel Department configured named 'Viasat Customer Support' that uses the agent with username liveagent.
  • Dialogflow.app and Salesforce.app instal led on the RC server
    • The DF.app configured to talk to the testbot
      • Eric can provide the config.json offline, and it will be configured with Agent Name == test-bot
    • The SF.app configured to talk to the salesforce emulator
      • Eric can provide the configs offline
  • The WideChat/Rocket.Chat.IntegrationTests repo synced on your local machine

Running Cypress

You will be running cypress from within the WideChat/Rocket.Chat.IntegrationTests/cypress directory. The tests are configured to run against a prepositioned test widget in AWS that is pointing at a Rocketchat instance running on http://localhost:3000 and set to use the test-bot omnichannel department.

NOTE: The WideChat/Rocket.Chat.IntegrationTests repo is just a manually ported copy of the Viasat hosted repo we use in production. Any test development happens against the Viasat hosted repo. If we want to start developing tests here we will need to track new tests and port them back to Viasat.

Run against your RC instance

  • Follow the README to start cypress on your local machine
  • In the search bar search test_bot and it will display only the testbot test cases
  • Select 'Run integration tests' and your tests will commence
Clone this wiki locally