Skip to main content

A scenario runner written in python

Project description

Scenario Runner (sr)

You could use a shell script, it's more advanced or you could use scenario runner.

Install with pip install scenario-runner

Create a file named 'sr.yml' in a directory where you want it to run.

scenarios:
  run_my_tests:
    description: 'Run all my tests'
    actions:
      - docker-compose:
          compose_files:
            - 'docker/docker-compose.yml'
            - 'docker/test.docker-compose.yml'
          cmd: up
          args: 
            - '--force-recreate'
            - '-d'
            - '--abort-on-container-exit'
            - '--exit-code-from'
            - 'test'

Then you run the scenario with sr run_my_tests

Structure of sr.yml

key: value

scenarios:    # all the scenarios with name as key
  scenario_name:
    description: 'Describe the scenario. This can be viewed by running sr --help
    actions:     # all the actions in the scenario as a list
      - action_type:
          ...

Action types

docker-compose

key description
compose_files All compose files used when running docker-compose. Can be specified in action, scenario or globally
cmd docker-compose [cmd] to run. See docker-compose --help for available commands
args Arguments for docker-compose after cmd. Can be a list of strings or string

shell

key description
cmd cmd to run
args args for cmd. Can be a list of strings or string

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scenario-runner-0.0.4.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scenario_runner-0.0.4-py2.py3-none-any.whl (5.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file scenario-runner-0.0.4.tar.gz.

File metadata

  • Download URL: scenario-runner-0.0.4.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

File hashes

Hashes for scenario-runner-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c4793ffaca8030359c0acdeea9c7382eb09fc1ec0fccd607310faafb3261a5f7
MD5 80f60db8c995ba48b05accae0106a29b
BLAKE2b-256 8323140ba1657f9c30aba5aafb0cd10526bd26ace53d3c5ed85664513b3081a4

See more details on using hashes here.

File details

Details for the file scenario_runner-0.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: scenario_runner-0.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

File hashes

Hashes for scenario_runner-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cfe3600904f8c1b9e89f964b43113e7011e279a5b79228f544437dabf420b74a
MD5 9c08e5c10ca156a2ba888eae801c7540
BLAKE2b-256 2e1835a6775c1a8b91c798ac6b11935cc3f7f754f661cbbef80fb3d7013d9bf2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page