This is a mirror of the official repository at https://gitlab.com/openlp/openlp_api_tester
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tim Bentley a324e3c87c Merge branch 'updates' into 'master' 8 months ago
scripts Add Active tag and zeroconv handler. 8 months ago
test_api Add Active tag and zeroconv handler. 8 months ago
.flake8 Queues 2 years ago
.gitignore Queues 2 years ago
.gitlab-ci.yml Jan2021 1 year ago
LICENSE Initial Commit 2 years ago
README.md Jan2021 1 year ago
api_test.py More Updates and year change 2 years ago
openlp-apitest.code-workspace Jan2021 1 year ago
requirements.txt Merge branch 'updates' of gitlab.com:trb143/openlp_api_tester into updates 8 months ago
setup.cfg Fixes2 2 years ago

README.md

OpenLP API tester.

A command line utility to access a running OpenLP instance via it's API's and test all functionality.

This harness will find a running OpenLP instance on the network via ZeroConf and then using the API's build and run a service. After each command the results are tested to make sure the WebSockets have changed.

The API's need to be configured as insecure as this is not being tested.

Tests are mastered in JSON files and run using the framework.

The bible test framework is random so some bible references will not be correct and therefore will not load! The chapter and verse numbers are random numbers!!

Sample Test Structure

process_name: test process
step1:
  max: 1
  min: 1
  name: clear_live_controller
step2:
  delay: 1
  name: clear_preview_controller
step3:
  max: 1
  min: 1
  name: new_service
step4:
  delay: 1
  name: search_and_add
  payload:
    plugin: songs
step6:
  name: load_service_sequential 
  • process_name

    A unique name for the run

  • step 1

    The step number, needs to be unique and in order!

    • delay (optional)

      How long to wait after a call has been made. Default is 0.3 seconds for all calls.

    • max (optional)

      Max number of fields which will change on the Web Sockets interface.

    • min (optional)

      Max number of fields which will change on the Web Sockets interface.

    • payload

      Json to support addition information to the call.

    • name

      The step name (function name) to be called to run the step.

Commands and Payloads

Rule Name Payload
trigger_alert text:
search_and_add plugin:
search_and_live plugin:
service_item_show item: item_id
play_live_item ?????
controller_item_next ?????
controller_item_previous ???????

Adding API's and Internals

API's and their handers are defining in the callback.py file. This should be the only file that needs to change when adding new API's

The test scripts are in the scripts directory and are a pre defined set of tests.