alphaville76 / gatling-grpc-maven-demo

An sample project to show how to use Gatling-gRPC with Gatling's Maven Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gatling-gRPC demo in Maven

A demo project showcasing a Gatling test living in the same project as the gRPC server.

Run

Run the server: ./mvnw compile exec:java
Run the load test: ./mvnw gatling:test

Dynamic Payload

This project also demonstrates the integration between Java Protobuf messages with Gatling Expressions.

val message: Expression[Ping] =
  Ping.getDefaultInstance
    // dynamic payload!
    .update(_.setData)($("data"))

_.setData is a method reference of Ping.Builder; and
data is a session attribute containing a number.

See the runtime-generated payload in the TRACE logging!

=========================
gRPC request:
headers=
grpc-accept-encoding: gzip
payload=
data: 18

=========================
gRPC response:
status=
OK
body=
data: 18

<<<<<<<<<<<<<<<<<<<<<<<<<

About

An sample project to show how to use Gatling-gRPC with Gatling's Maven Plugin


Languages

Language:Scala 50.6%Language:Java 49.4%