Cicada

Cicada

  • Docs
  • Guides
  • API
  • Runners
  • Help

›API

Introduction

  • Quickstart
  • Tests
  • State
  • Actions and Asserts
  • Runners
  • Reports

Guides

  • REST API Guide
  • Async App Guide
  • gRPC Server Guide
  • Kubernetes Guide

API

  • Test
  • Action
  • Assert
  • Config
  • Test Engine
  • Verification

Runners

  • REST Runner
  • SQL Runner
  • Kafka Runner
  • S3 Runner
  • gRPC Runner

Assert


asserts:
  - type: string (required)
    executionsPerCycle string
    name: string
    template: string
    storeVersions: bool
    params: Map
    keepIfPassed: bool
    passed: bool
    actual: string
    expected: string
    description: string
    negate: bool
    assertOptions: string

Returns

{
    "passed": bool
    "description": str,
    "expected": str,
    "actual": str
}

Assert Params

Type

REQUIRED Type of assert (See runner's supported assert types)

NullAssert

If type is set to NullAssert, the assert results will be populated with the provided values for passed, actual, expected, and description

Executions Per Cycle

Number of times to execute the assert on a single runner in one cycle. Defaults to 1.

Name

Name of assert. If not specified, it will be inferred from the runner's type.

Template

Template string to be rendered into assert using the state container

Store Versions

Store all results of an assert in the state container. If false, will overwrite the last result and store assert results as a single value instead of a list.

Defaults to true

Params

Parameters to provide to assert (See runner's supported action params)

Keep if Passed

Test will continue running with this assert even if it has passed if set to false.

Defaults to true

Actual

Sets assert result's actual value to the one provided is using a NullAssert

Expected

Sets assert result's expected value to the one provided is using a NullAssert

Passed

Sets assert result's passed value to the one provided is using a NullAssert

Description

Sets assert result's description value to the one provided is using a NullAssert

Negate

If true, inverts original value for passed. This allows the assert to pass if the test fails or vise-versa

Defaults to false

Assert Options

Flags passed as keyword arguments to call assert logic with for an Assert inside of an Action


assertOptions:
  match: bool
  all_required: bool
  ordered: bool

Match

If true, allows strings to match a regex instead of an exact string

All Required

If true, expects all elements in an expected dictionary to be present in the actual dictionary

Ordered

If true, requires elements in an expected sequence to be in the same order as the actual sequence.

← ActionConfig →
  • Assert Params
    • Type
    • NullAssert
    • Executions Per Cycle
    • Name
    • Template
    • Store Versions
    • Params
    • Keep if Passed
    • Actual
    • Expected
    • Passed
    • Description
    • Negate
  • Assert Options
    • Match
    • All Required
    • Ordered
Cicada
Docs
Getting StartedAPI Reference
More
GitHubStar
Copyright © 2021 Cicada