Giter Site home page Giter Site logo

chatbot's Introduction

Chatbot is an automated regression testing framework suitable for testing chatbot applications. Chatbot is based on pytest open source framework and uses python for writing tests and supporting libraries.

Chatbot can be run as a docker container or from a local repository.

Chatbot Framework

  • To display help

    • By running the command from ROOT level (chatbot):
      1. cp scripts/run_master.py . && chmod +x run_master.py
      2. ./run_master.py -h
  • Running Chatbot

    • It accepts either a test file(s) or test lists.
      • Test files (start with test_) group related tests into test classes. One test file might have more than one test class. If a feature has multiple sub-features, then one test file would be named test_task_1, test_task_2, etc. Currently it has only one test file with one test class.
      • Inside the test file (sub-features) tests can be grouped based on sub-sub-features into corresponding test classes, e.g. TestTaskSub1 class, TestTaskSub2 class, etc. In order to pass a single test file use --tests <path to a test file>
      • If there is a need to run multiple test files at once, for example, having one test run to test featureA, where testing of featureA is organized into multiple test files. All of the tests lists could be found under chatbot/tests_lists directory. In order to pass a list of tests to be executed, use --tests-lists <path to a test list file>
      • A log file will be created in the result directory named chatbot.log. it could be configured in pytest.ini file along with file log level and log format values. In the future, log file will be created for each test file (TODO).
  • Writing tests

    • TBD
  • How to run Litmus from a docker container locally

    • To build a chatbot image locally, run docket build -f Dockerfile -t <chatbot:tag>

    Running One Test

    • docker run --net host --rm -e URL=ws://localhost -e PORT=4444
      -e ONE_TEST=src/tests/test_websocket.py
      -v </path to/>/chatbot/result:/Chatbot/result chatbot:

    Running Test List

    • docker run --net host --rm -e URL=ws://localhost -e PORT=4444
      -e TEST_LIST=tests_list/test_all.list
      -v </path to/>/chatbot/result:/Chatbot/result chatbot:

  • How to run Chatbot from local repository

    • Prerequisites for running test(s) from local repo:
      • You need to be in chabot dir.
      • Copy run_master.py script from chatbot/scripts directory to chatbot directory.
      • Test(s) must be run from chatbot directory.

    Running One Test

    • ./run_master.py --url ws://localhost --port 4444
      --tests src/tests/pods_resources/test_pods.py

    Running List Of Tests

    • ./run_master.py --url ws://localhost --port 4444
      --tests-list tests_list/test_all.list

NOTE:

  • Not all the scenarios are covered by the tests in the test_websocket.py

chatbot's People

Contributors

gshif avatar gershonshif-alation avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.