Skip to content

Orquesta workflow unit testing UX #27

@guzzijones

Description

@guzzijones

Purpose

Allow unit testing of orquesta workflows.
Workflows with many forks need to be unit tested with fixtures to provide regression testing of functionality after making code changes in the yaml file.

UX new binary

  1. orquesta-test
    https://github.com/StackStorm/orquesta/blob/8035754f474e7872b0efd9e82e307a3121da027d/orquesta/tests/unit/base.py#L242
    that will be refactored into the main orquesta module.

usage:

  1. orquesta-test -f [path to fixture] -l [path to workflow files named in fixture]
    1. run a test against a workflow named in fixture
  2. orquesta-test -d [path to directory containing fixtures] -l [path to workflow files named in fixture]
    1. run an entire directory of fixtures automatically one after the other

fixture spec in JSONobject yaml.

workflow:
  description: filename of workflow
  type: string
  required: true

expected_task_seq:
  description:  list of tasks names in the order expected
  type: array
  items:
    type: string
  required: true

expected_routes:
  description: routes expected in workflow
  type: array
  items:
    type: array
    items:
      type: number
  required false

inputs:
  description: input parameters to workflow
  type: object

mock_statuses:
  description: return status for each task
  type: array
  items:
   type: integer
  required: false

mock_results:
  description: array of results for each task 
  type: array
  required: false

expected_workflow_status:
  description: expected workflow status output
  type: number
  
expected_output:
  type: object
  required: false

expected_term_tasks:
  type: array
  required: false
  items:
    type: string

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions