K6 test using custom client libraries

Hello folks, I am newbie to k6 and come from Jmeter background.

I am part of a team that is building GRPC based .NET and Java client libraries. We have decided to only give out client libraries for our application. I would like to stress test the server application using the client libraries and k6 (and k6 operator) sounded promising.

However I don’t see that there is a way to call up Java or .NET code directly.

Can you share some ideas how you would use k6 with .net and java code.

I have glanced at GitHub - grafana/xk6-docker: k6 extension for interacting with Docker containers and images from a test script. and GitHub - grafana/xk6-exec: A k6 extension for running external commands. and wondering if that is the right way to approach this (i.e create a binary or docker images of my application and then call those)

Is there any consideration to metrics collection that you would like to share?



Hi @geoaxis

Welcome to the community forum :wave:

I would use k6 to test the GRPC server applications and skip the client .NET and Java clients. If that is the goal.

I would recommend you have a look at how to use GRPC with k6:

k6 also supports unary gRPC requests to the k6/net/grpc built-in module and the experimental one.

Your answer about how to run k6 depends on where you need to run it.

  • If it’s locally, you can directly install and run k6, or you can run it with docker just buy using the docker image directly. The docs I linked have examples of that.

  • If you need to integrate into your CI/CD, we usually resort to the same docker images that are released as well, and you can have a look at Integrations & Tools | Grafana k6 documentation for the different options.

For reports & metrics collection, it will depend on your needs.

Those are also good reads to get you started:

I hope this helps :bowing_woman:


thank you for the tips. They are indeed helpful in my journey to learn GRPC

The main issue I have is that the product I am working with has taken a very strategic decision of only using packaged Java and .NET clients. . This means that there is a lot of logic that is part of the client libraries. Technically it is possible for me to create programs that are called by exec scripts to create a load test and implement some sort of end of test summary.

1 Like