artillery-engine-grpc

0.0.9 • Public • Published

artillery-engine-grpc

npm version Publish Node.js Package

Load test gRPC application with Artillery.io

Documentation

For users:

For developers:

Usage

Install the plugin

# if `artillery` is installed globally
npm install -g artillery-engine-grpc

Define your scenario

.proto file

syntax = "proto3";

package backend.services.v1;

service HelloService {
    rpc Hello (HelloRequest) returns (HelloResponse) {
    }
}

message HelloRequest {
    int32 id = 1;
    string name = 2;
}

message HelloResponse {
    string message = 1;
}

scenario file

config:
  target: 127.0.0.1:8080
  phases:
    - duration: 10
      arrivalRate: 10
      pause: 15
  engines:
    grpc:
      channelOpts:
        grpc.client_idle_timeout_ms: 1000
      protobufDefinition:
        filepath: protobuf-definitions/backend/services/v1/hello.proto
        package: backend.services.v1
        service: HelloService
      protoLoaderConfig:
        keepCase: true
        longs: String
        enums: String
        bytes: Buffer
        defaults: false
        arrays: false
        objects: false
        oneofs: true
        includeDirs: []
      metadata:
        "user-id": u123

scenarios:
  - name: test backend-service running at http://localhost:8000
    engine: grpc
    flow:
    # list RPC names with its arguments
    - Hello:
        id: 1
        name: Alice
    - Hello:
        id: 2
        name: Bob
    - Hello:
        id: 3
        name: Chris

Run the scenario

artillery run my-scenario.yml

License

MPL-2.0

Readme

Keywords

Package Sidebar

Install

npm i artillery-engine-grpc

Weekly Downloads

21

Version

0.0.9

License

MPL-2.0

Unpacked Size

25.2 kB

Total Files

4

Last publish

Collaborators

  • kenju