Cicada

Cicada

  • Docs
  • Guides
  • API
  • Runners
  • Help

›Runners

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

gRPC Runner

The gRPC runner is used to connect to gRPC services given a proto file to dynamically create requests with

Config

The gRPC runner requires protos to be mounted to the /incoming_protos folder inside the runner:

volumes:
  - source: /path/to/local/protos
    destination: /incoming_protos

Actions


type: string
params:
  proto: string
  service: string
  serviceAddress: string
  message: dict
  messages: List[dict]
  metadata: List[Metadata]
  compression: string
  method: string
  requestType: string

Returns


{
    response: Union[dict, List[dict]]
    metadata: [Dict[str, str]]
    error: ResponseError
}

Response

Dict or list of dicts received from service on successful response

Response Error

Details about error if encountered and error code received from server

{
    ...
    "error": {
        "details": string,
        "code": string
    }
}

Supported Action Types

  • Unary: Send one request and receive one response from server
  • ClientStreaming: Sends multiple messages to server and receives one response
  • ServerStreaming: Sends one message and receives list of responses from server
  • BidirectionalStreaming: Sends and receives sequences of messages

Proto

Name of protobuf to use. For example, if the proto is named app.proto, the proto field should be set to app

Service

Name of the gRPC service to use, such as Greeter in the hello world gRPC example

Service Address

URL of gRPC server

Message

Map to be converted into protobuf message. Note, bytes type values should be converted into base64 strings. For example:

base64.b64encode("my value".encode("utf-8")).decode("utf-8")

Messages

List of message body protobufs

Metadata

List of key value pairs to be sent as metadata for each message in the request:

metadata:
  - key: foo
    value: bar

In a response body, the metadata is compressed to a simple dict:

{
    ...
    "metadata": {
        "foo": "bar"
    }
}

Compression

Compression scheme to apply to messages sent/received in the request. Valid values:

  • deflate
  • gzip

Method

Function to call service with, such as SayHello

Request Type

Protobuf structure to marshal messages into, such as HelloRequest

Asserts


type: string
params:
  actionType: string
  actionParams: ActionParams
  expected: Expected
  assertOptions: dict

Supported Assert Types

  • ResponseAssert: Checks the received message body/bodies
  • MetadataAssert: Checks the metadata
  • ErrorAssert: Check the error body

Expected

The expected message body(s), metadata, or error

Assert Options

Keyword arguments to call assert with. See assert options

← S3 Runner
  • Config
  • Actions
    • Response
    • Response Error
    • Supported Action Types
    • Proto
    • Service
    • Service Address
    • Message
    • Messages
    • Metadata
    • Compression
    • Method
    • Request Type
  • Asserts
    • Supported Assert Types
    • Expected
    • Assert Options
Cicada
Docs
Getting StartedAPI Reference
More
GitHubStar
Copyright © 2021 Cicada