---
id: testcase.json
"$schema": "http://json-schema.org/draft-04/schema"
title: Testcase
description: "A single test case"
type: object
properties:
  # mandatory
  name:
    type: string
    description: 'Name of this testcase/scenario'
  assertion:
    type: string
    description: 'Description of what this testcase asserts'
  inputs:
    description: 'The inputs send to the fixture input ports, or a sequence of such inputs'
    oneOf:
      - # inputsdata
        type: object
      - # sequence of inputsdata
        type: array
        items:
          type: object
  expect:
    description: |
      Expected data on fixture output ports.
      Can either be an object, or a sequence of such objects.
    oneOf:
      - "$ref": "outputdata.json"
      - # sequence of expectdata
        type: array
        items:
          - "$ref": "outputdata.json"

  # optional
  timeout:
    type: number
    description: 'Timeout (in milliseconds). Overrides that set in the suite'
    default: 2000
  skip:
    type: string
    description: |
      Flag to skip testcase.
      Should be a description of the reason for skipping.

required: [name, assertion, inputs, expect]
