diff --git a/docs/sources/k6/next/get-started/resources.md b/docs/sources/k6/next/get-started/resources.md index 01650f8d4d..ca10a8a61e 100644 --- a/docs/sources/k6/next/get-started/resources.md +++ b/docs/sources/k6/next/get-started/resources.md @@ -31,7 +31,6 @@ These resources help you write and run k6 tests in a safe environment and explor If you need a place to learn k6 and test your scripts, you can use these playground/demo applications: - [test-api.k6.io](https://test-api.k6.io/). A simple REST and WebSocket web application. [grafana/test-api.k6.io](https://github.com/grafana/test-api.k6.io) -- [grpcbin.test.k6.io](https://grpcbin.test.k6.io/). A simple gRPC Request & Response Service. [grafana/k6-grpcbin](https://github.com/grafana/k6-grpcbin) - [grafana/quickpizza](https://github.com/grafana/quickpizza). A simple demo web application. - [grafana/httpbin](https://github.com/grafana/httpbin). A simple HTTP Request & Response Service. diff --git a/docs/sources/k6/next/javascript-api/k6-net-grpc/_index.md b/docs/sources/k6/next/javascript-api/k6-net-grpc/_index.md index 16f9595b3c..add34e82ad 100644 --- a/docs/sources/k6/next/javascript-api/k6-net-grpc/_index.md +++ b/docs/sources/k6/next/javascript-api/k6-net-grpc/_index.md @@ -24,15 +24,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/next/javascript-api/k6-net-grpc/client/_index.md b/docs/sources/k6/next/javascript-api/k6-net-grpc/client/_index.md index 29e3f0734e..3d099b4355 100644 --- a/docs/sources/k6/next/javascript-api/k6-net-grpc/client/_index.md +++ b/docs/sources/k6/next/javascript-api/k6-net-grpc/client/_index.md @@ -26,19 +26,19 @@ aliases: import grpc from 'k6/net/grpc'; const client = new grpc.Client(); -// Download addsvc.proto for https://grpcbin.test.k6.io/, located at: -// https://raw.githubusercontent.com/moul/pb/master/addsvc/addsvc.proto +// Download quickpizza.proto for grpc-quickpizza.grafana.com, located at: +// https://raw.githubusercontent.com/grafana/quickpizza/refs/heads/main/proto/quickpizza.proto // and put it in the same folder as this script. -client.load(null, 'addsvc.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { timeout: '5s' }); + client.connect('grpc-quickpizza.grafana.com:443', { timeout: '5s' }); - const response = client.invoke('addsvc.Add/Sum', { - a: 1, - b: 2, + const response = client.invoke('quickpizza.GRPC/RatePizza', { + ingredients: ['Tomatoes', 'Cheese'], + dough: 'Thin' }); - console.log(response.message.v); // should print 3 + console.log(response.message.starsRating); // should print a number between 1-5 client.close(); }; diff --git a/docs/sources/k6/next/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md b/docs/sources/k6/next/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md index a36ddefd72..ef21f2529c 100644 --- a/docs/sources/k6/next/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md +++ b/docs/sources/k6/next/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md @@ -86,7 +86,7 @@ const grpcArgs = new SharedArray('grpc', () => { // Using SharedArray here so that not every VU gets a copy of every certificate a key return [ { - host: 'foo1.grpcbin.test.k6.io:9001', + host: 'foo1.grpc-quickpizza.grafana.com:443', plaintext: false, params: { tls: { @@ -97,7 +97,7 @@ const grpcArgs = new SharedArray('grpc', () => { }, }, { - host: 'foo2.grpcbin.test.k6.io:9002', + host: 'foo2.grpc-quickpizza.grafana.com:443', params: { plaintext: false, tls: { @@ -111,7 +111,7 @@ const grpcArgs = new SharedArray('grpc', () => { ]; }); -const client = new grpc.Client(); +const client = new grpc.Client(null, 'quickpizza.proto'); export default () => { if (__ITER === 0) { @@ -120,9 +120,7 @@ export default () => { client.connect(grpcArg.host, grpcArg.params); } - const response = client.invoke('hello.HelloService/SayHello', { - greeting: 'Bert', - }); + const response = client.invoke('quickpizza.GRPC/Status'); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/next/javascript-api/k6-net-grpc/constants.md b/docs/sources/k6/next/javascript-api/k6-net-grpc/constants.md index f8af6e8289..2076b19629 100644 --- a/docs/sources/k6/next/javascript-api/k6-net-grpc/constants.md +++ b/docs/sources/k6/next/javascript-api/k6-net-grpc/constants.md @@ -39,15 +39,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/next/javascript-api/k6-net-grpc/response.md b/docs/sources/k6/next/javascript-api/k6-net-grpc/response.md index 09268176e6..96acbb9703 100644 --- a/docs/sources/k6/next/javascript-api/k6-net-grpc/response.md +++ b/docs/sources/k6/next/javascript-api/k6-net-grpc/response.md @@ -26,15 +26,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/next/testing-guides/api-load-testing.md b/docs/sources/k6/next/testing-guides/api-load-testing.md index 7a9b9bce04..91ca308f90 100644 --- a/docs/sources/k6/next/testing-guides/api-load-testing.md +++ b/docs/sources/k6/next/testing-guides/api-load-testing.md @@ -596,13 +596,13 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001'); + client.connect('grpc-quickpizza.grafana.com:443'); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Tomatoes', 'Cheese'], dough: 'Thin' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/next/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md b/docs/sources/k6/next/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md index 8b1a892c0d..060c1b2460 100644 --- a/docs/sources/k6/next/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md +++ b/docs/sources/k6/next/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md @@ -10,7 +10,7 @@ This example shows a way to use the [ServiceDisruptor](https://grafana.com/docs/ The complete [source code](#source-code) is at the end of this document. The next sections examine the code in detail. -The example uses [grpcpbin](https://grpcbin.test.k6.io), a simple request/response application that offers endpoints for testing different gRPC requests. +The example uses [grpcpbin](https://github.com/moul/grpcbin), a simple request/response application that offers endpoints for testing different gRPC requests. The test requires `grpcpbin` to be deployed in a cluster in the namespace `grpcbin` and exposed with an external IP. The IP address is expected in the environment variable `GRPC_HOST`. diff --git a/docs/sources/k6/v0.53.x/get-started/resources.md b/docs/sources/k6/v0.53.x/get-started/resources.md index 01650f8d4d..ca10a8a61e 100644 --- a/docs/sources/k6/v0.53.x/get-started/resources.md +++ b/docs/sources/k6/v0.53.x/get-started/resources.md @@ -31,7 +31,6 @@ These resources help you write and run k6 tests in a safe environment and explor If you need a place to learn k6 and test your scripts, you can use these playground/demo applications: - [test-api.k6.io](https://test-api.k6.io/). A simple REST and WebSocket web application. [grafana/test-api.k6.io](https://github.com/grafana/test-api.k6.io) -- [grpcbin.test.k6.io](https://grpcbin.test.k6.io/). A simple gRPC Request & Response Service. [grafana/k6-grpcbin](https://github.com/grafana/k6-grpcbin) - [grafana/quickpizza](https://github.com/grafana/quickpizza). A simple demo web application. - [grafana/httpbin](https://github.com/grafana/httpbin). A simple HTTP Request & Response Service. diff --git a/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/_index.md b/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/_index.md index 557b4a7e84..577d92253a 100644 --- a/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/_index.md +++ b/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/_index.md @@ -24,15 +24,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/client/_index.md b/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/client/_index.md index 29e3f0734e..3d099b4355 100644 --- a/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/client/_index.md +++ b/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/client/_index.md @@ -26,19 +26,19 @@ aliases: import grpc from 'k6/net/grpc'; const client = new grpc.Client(); -// Download addsvc.proto for https://grpcbin.test.k6.io/, located at: -// https://raw.githubusercontent.com/moul/pb/master/addsvc/addsvc.proto +// Download quickpizza.proto for grpc-quickpizza.grafana.com, located at: +// https://raw.githubusercontent.com/grafana/quickpizza/refs/heads/main/proto/quickpizza.proto // and put it in the same folder as this script. -client.load(null, 'addsvc.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { timeout: '5s' }); + client.connect('grpc-quickpizza.grafana.com:443', { timeout: '5s' }); - const response = client.invoke('addsvc.Add/Sum', { - a: 1, - b: 2, + const response = client.invoke('quickpizza.GRPC/RatePizza', { + ingredients: ['Tomatoes', 'Cheese'], + dough: 'Thin' }); - console.log(response.message.v); // should print 3 + console.log(response.message.starsRating); // should print a number between 1-5 client.close(); }; diff --git a/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md b/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md index a36ddefd72..ef21f2529c 100644 --- a/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md +++ b/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md @@ -86,7 +86,7 @@ const grpcArgs = new SharedArray('grpc', () => { // Using SharedArray here so that not every VU gets a copy of every certificate a key return [ { - host: 'foo1.grpcbin.test.k6.io:9001', + host: 'foo1.grpc-quickpizza.grafana.com:443', plaintext: false, params: { tls: { @@ -97,7 +97,7 @@ const grpcArgs = new SharedArray('grpc', () => { }, }, { - host: 'foo2.grpcbin.test.k6.io:9002', + host: 'foo2.grpc-quickpizza.grafana.com:443', params: { plaintext: false, tls: { @@ -111,7 +111,7 @@ const grpcArgs = new SharedArray('grpc', () => { ]; }); -const client = new grpc.Client(); +const client = new grpc.Client(null, 'quickpizza.proto'); export default () => { if (__ITER === 0) { @@ -120,9 +120,7 @@ export default () => { client.connect(grpcArg.host, grpcArg.params); } - const response = client.invoke('hello.HelloService/SayHello', { - greeting: 'Bert', - }); + const response = client.invoke('quickpizza.GRPC/Status'); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/constants.md b/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/constants.md index f8af6e8289..2076b19629 100644 --- a/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/constants.md +++ b/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/constants.md @@ -39,15 +39,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/response.md b/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/response.md index 09268176e6..96acbb9703 100644 --- a/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/response.md +++ b/docs/sources/k6/v0.53.x/javascript-api/k6-net-grpc/response.md @@ -26,15 +26,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.53.x/testing-guides/api-load-testing.md b/docs/sources/k6/v0.53.x/testing-guides/api-load-testing.md index 7a9b9bce04..91ca308f90 100644 --- a/docs/sources/k6/v0.53.x/testing-guides/api-load-testing.md +++ b/docs/sources/k6/v0.53.x/testing-guides/api-load-testing.md @@ -596,13 +596,13 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001'); + client.connect('grpc-quickpizza.grafana.com:443'); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Tomatoes', 'Cheese'], dough: 'Thin' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.53.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md b/docs/sources/k6/v0.53.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md index 8b1a892c0d..060c1b2460 100644 --- a/docs/sources/k6/v0.53.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md +++ b/docs/sources/k6/v0.53.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md @@ -10,7 +10,7 @@ This example shows a way to use the [ServiceDisruptor](https://grafana.com/docs/ The complete [source code](#source-code) is at the end of this document. The next sections examine the code in detail. -The example uses [grpcpbin](https://grpcbin.test.k6.io), a simple request/response application that offers endpoints for testing different gRPC requests. +The example uses [grpcpbin](https://github.com/moul/grpcbin), a simple request/response application that offers endpoints for testing different gRPC requests. The test requires `grpcpbin` to be deployed in a cluster in the namespace `grpcbin` and exposed with an external IP. The IP address is expected in the environment variable `GRPC_HOST`. diff --git a/docs/sources/k6/v0.54.x/get-started/resources.md b/docs/sources/k6/v0.54.x/get-started/resources.md index 01650f8d4d..ca10a8a61e 100644 --- a/docs/sources/k6/v0.54.x/get-started/resources.md +++ b/docs/sources/k6/v0.54.x/get-started/resources.md @@ -31,7 +31,6 @@ These resources help you write and run k6 tests in a safe environment and explor If you need a place to learn k6 and test your scripts, you can use these playground/demo applications: - [test-api.k6.io](https://test-api.k6.io/). A simple REST and WebSocket web application. [grafana/test-api.k6.io](https://github.com/grafana/test-api.k6.io) -- [grpcbin.test.k6.io](https://grpcbin.test.k6.io/). A simple gRPC Request & Response Service. [grafana/k6-grpcbin](https://github.com/grafana/k6-grpcbin) - [grafana/quickpizza](https://github.com/grafana/quickpizza). A simple demo web application. - [grafana/httpbin](https://github.com/grafana/httpbin). A simple HTTP Request & Response Service. diff --git a/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/_index.md b/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/_index.md index 16f9595b3c..add34e82ad 100644 --- a/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/_index.md +++ b/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/_index.md @@ -24,15 +24,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/client/_index.md b/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/client/_index.md index 29e3f0734e..3d099b4355 100644 --- a/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/client/_index.md +++ b/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/client/_index.md @@ -26,19 +26,19 @@ aliases: import grpc from 'k6/net/grpc'; const client = new grpc.Client(); -// Download addsvc.proto for https://grpcbin.test.k6.io/, located at: -// https://raw.githubusercontent.com/moul/pb/master/addsvc/addsvc.proto +// Download quickpizza.proto for grpc-quickpizza.grafana.com, located at: +// https://raw.githubusercontent.com/grafana/quickpizza/refs/heads/main/proto/quickpizza.proto // and put it in the same folder as this script. -client.load(null, 'addsvc.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { timeout: '5s' }); + client.connect('grpc-quickpizza.grafana.com:443', { timeout: '5s' }); - const response = client.invoke('addsvc.Add/Sum', { - a: 1, - b: 2, + const response = client.invoke('quickpizza.GRPC/RatePizza', { + ingredients: ['Tomatoes', 'Cheese'], + dough: 'Thin' }); - console.log(response.message.v); // should print 3 + console.log(response.message.starsRating); // should print a number between 1-5 client.close(); }; diff --git a/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md b/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md index a36ddefd72..ef21f2529c 100644 --- a/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md +++ b/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md @@ -86,7 +86,7 @@ const grpcArgs = new SharedArray('grpc', () => { // Using SharedArray here so that not every VU gets a copy of every certificate a key return [ { - host: 'foo1.grpcbin.test.k6.io:9001', + host: 'foo1.grpc-quickpizza.grafana.com:443', plaintext: false, params: { tls: { @@ -97,7 +97,7 @@ const grpcArgs = new SharedArray('grpc', () => { }, }, { - host: 'foo2.grpcbin.test.k6.io:9002', + host: 'foo2.grpc-quickpizza.grafana.com:443', params: { plaintext: false, tls: { @@ -111,7 +111,7 @@ const grpcArgs = new SharedArray('grpc', () => { ]; }); -const client = new grpc.Client(); +const client = new grpc.Client(null, 'quickpizza.proto'); export default () => { if (__ITER === 0) { @@ -120,9 +120,7 @@ export default () => { client.connect(grpcArg.host, grpcArg.params); } - const response = client.invoke('hello.HelloService/SayHello', { - greeting: 'Bert', - }); + const response = client.invoke('quickpizza.GRPC/Status'); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/constants.md b/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/constants.md index f8af6e8289..2076b19629 100644 --- a/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/constants.md +++ b/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/constants.md @@ -39,15 +39,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/response.md b/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/response.md index 09268176e6..96acbb9703 100644 --- a/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/response.md +++ b/docs/sources/k6/v0.54.x/javascript-api/k6-net-grpc/response.md @@ -26,15 +26,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.54.x/testing-guides/api-load-testing.md b/docs/sources/k6/v0.54.x/testing-guides/api-load-testing.md index 7a9b9bce04..91ca308f90 100644 --- a/docs/sources/k6/v0.54.x/testing-guides/api-load-testing.md +++ b/docs/sources/k6/v0.54.x/testing-guides/api-load-testing.md @@ -596,13 +596,13 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001'); + client.connect('grpc-quickpizza.grafana.com:443'); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Tomatoes', 'Cheese'], dough: 'Thin' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.54.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md b/docs/sources/k6/v0.54.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md index 8b1a892c0d..060c1b2460 100644 --- a/docs/sources/k6/v0.54.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md +++ b/docs/sources/k6/v0.54.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md @@ -10,7 +10,7 @@ This example shows a way to use the [ServiceDisruptor](https://grafana.com/docs/ The complete [source code](#source-code) is at the end of this document. The next sections examine the code in detail. -The example uses [grpcpbin](https://grpcbin.test.k6.io), a simple request/response application that offers endpoints for testing different gRPC requests. +The example uses [grpcpbin](https://github.com/moul/grpcbin), a simple request/response application that offers endpoints for testing different gRPC requests. The test requires `grpcpbin` to be deployed in a cluster in the namespace `grpcbin` and exposed with an external IP. The IP address is expected in the environment variable `GRPC_HOST`. diff --git a/docs/sources/k6/v0.55.x/get-started/resources.md b/docs/sources/k6/v0.55.x/get-started/resources.md index 01650f8d4d..ca10a8a61e 100644 --- a/docs/sources/k6/v0.55.x/get-started/resources.md +++ b/docs/sources/k6/v0.55.x/get-started/resources.md @@ -31,7 +31,6 @@ These resources help you write and run k6 tests in a safe environment and explor If you need a place to learn k6 and test your scripts, you can use these playground/demo applications: - [test-api.k6.io](https://test-api.k6.io/). A simple REST and WebSocket web application. [grafana/test-api.k6.io](https://github.com/grafana/test-api.k6.io) -- [grpcbin.test.k6.io](https://grpcbin.test.k6.io/). A simple gRPC Request & Response Service. [grafana/k6-grpcbin](https://github.com/grafana/k6-grpcbin) - [grafana/quickpizza](https://github.com/grafana/quickpizza). A simple demo web application. - [grafana/httpbin](https://github.com/grafana/httpbin). A simple HTTP Request & Response Service. diff --git a/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/_index.md b/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/_index.md index 16f9595b3c..add34e82ad 100644 --- a/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/_index.md +++ b/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/_index.md @@ -24,15 +24,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/client/_index.md b/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/client/_index.md index 29e3f0734e..3d099b4355 100644 --- a/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/client/_index.md +++ b/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/client/_index.md @@ -26,19 +26,19 @@ aliases: import grpc from 'k6/net/grpc'; const client = new grpc.Client(); -// Download addsvc.proto for https://grpcbin.test.k6.io/, located at: -// https://raw.githubusercontent.com/moul/pb/master/addsvc/addsvc.proto +// Download quickpizza.proto for grpc-quickpizza.grafana.com, located at: +// https://raw.githubusercontent.com/grafana/quickpizza/refs/heads/main/proto/quickpizza.proto // and put it in the same folder as this script. -client.load(null, 'addsvc.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { timeout: '5s' }); + client.connect('grpc-quickpizza.grafana.com:443', { timeout: '5s' }); - const response = client.invoke('addsvc.Add/Sum', { - a: 1, - b: 2, + const response = client.invoke('quickpizza.GRPC/RatePizza', { + ingredients: ['Tomatoes', 'Cheese'], + dough: 'Thin' }); - console.log(response.message.v); // should print 3 + console.log(response.message.starsRating); // should print a number between 1-5 client.close(); }; diff --git a/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md b/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md index a36ddefd72..ef21f2529c 100644 --- a/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md +++ b/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/client/client-connect-connect-address-params.md @@ -86,7 +86,7 @@ const grpcArgs = new SharedArray('grpc', () => { // Using SharedArray here so that not every VU gets a copy of every certificate a key return [ { - host: 'foo1.grpcbin.test.k6.io:9001', + host: 'foo1.grpc-quickpizza.grafana.com:443', plaintext: false, params: { tls: { @@ -97,7 +97,7 @@ const grpcArgs = new SharedArray('grpc', () => { }, }, { - host: 'foo2.grpcbin.test.k6.io:9002', + host: 'foo2.grpc-quickpizza.grafana.com:443', params: { plaintext: false, tls: { @@ -111,7 +111,7 @@ const grpcArgs = new SharedArray('grpc', () => { ]; }); -const client = new grpc.Client(); +const client = new grpc.Client(null, 'quickpizza.proto'); export default () => { if (__ITER === 0) { @@ -120,9 +120,7 @@ export default () => { client.connect(grpcArg.host, grpcArg.params); } - const response = client.invoke('hello.HelloService/SayHello', { - greeting: 'Bert', - }); + const response = client.invoke('quickpizza.GRPC/Status'); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/constants.md b/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/constants.md index f8af6e8289..2076b19629 100644 --- a/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/constants.md +++ b/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/constants.md @@ -39,15 +39,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/response.md b/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/response.md index 09268176e6..96acbb9703 100644 --- a/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/response.md +++ b/docs/sources/k6/v0.55.x/javascript-api/k6-net-grpc/response.md @@ -26,15 +26,15 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001', { + client.connect('grpc-quickpizza.grafana.com:443', { // plaintext: false }); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Cheese'], dough: 'Thick' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.55.x/testing-guides/api-load-testing.md b/docs/sources/k6/v0.55.x/testing-guides/api-load-testing.md index 7a9b9bce04..91ca308f90 100644 --- a/docs/sources/k6/v0.55.x/testing-guides/api-load-testing.md +++ b/docs/sources/k6/v0.55.x/testing-guides/api-load-testing.md @@ -596,13 +596,13 @@ import grpc from 'k6/net/grpc'; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['definitions'], 'hello.proto'); +client.load(null, 'quickpizza.proto'); export default () => { - client.connect('grpcbin.test.k6.io:9001'); + client.connect('grpc-quickpizza.grafana.com:443'); - const data = { greeting: 'Bert' }; - const response = client.invoke('hello.HelloService/SayHello', data); + const data = { ingredients: ['Tomatoes', 'Cheese'], dough: 'Thin' }; + const response = client.invoke('quickpizza.GRPC/RatePizza', data); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/docs/sources/k6/v0.55.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md b/docs/sources/k6/v0.55.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md index 8b1a892c0d..060c1b2460 100644 --- a/docs/sources/k6/v0.55.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md +++ b/docs/sources/k6/v0.55.x/testing-guides/injecting-faults-with-xk6-disruptor/examples/inject-grpc-faults-into-service.md @@ -10,7 +10,7 @@ This example shows a way to use the [ServiceDisruptor](https://grafana.com/docs/ The complete [source code](#source-code) is at the end of this document. The next sections examine the code in detail. -The example uses [grpcpbin](https://grpcbin.test.k6.io), a simple request/response application that offers endpoints for testing different gRPC requests. +The example uses [grpcpbin](https://github.com/moul/grpcbin), a simple request/response application that offers endpoints for testing different gRPC requests. The test requires `grpcpbin` to be deployed in a cluster in the namespace `grpcbin` and exposed with an external IP. The IP address is expected in the environment variable `GRPC_HOST`.