You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: grpc-protoscope/README.md
+13-16Lines changed: 13 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -263,18 +263,16 @@ On the next run (test mode), the `rand.Shuffle` may flip the inner field order,
263
263
264
264
### Prerequisites
265
265
266
-
- Go 1.21+
266
+
- Go 1.26+
267
267
- `protoc`compiler (only needed if modifying the `.proto` file)
268
268
269
269
### Run without Keploy
270
270
271
271
```bash
272
272
# Terminal 1 — start the server
273
-
cd /home/anju/grpc-protoscope
274
273
go run ./server/
275
274
276
275
# Terminal 2 — call it (run multiple times to see different field orderings)
277
-
cd /home/anju/grpc-protoscope
278
276
go run ./client/
279
277
go run ./client/
280
278
go run ./client/
@@ -286,26 +284,26 @@ You'll see the facet entries printed in different orders across calls.
286
284
287
285
## 5. Reproducing the Bug with Keploy
288
286
289
-
### Step 1: Build Keploy from source (if needed)
287
+
### Step 1: Install Keploy
288
+
289
+
Install Keploy using the [official installation guide](https://keploy.io/docs/server/installation/), or build from source:
290
290
291
291
```bash
292
-
cd /home/anju/keploy
292
+
git clone https://github.com/keploy/keploy.git && cd keploy
293
293
go build -ldflags="-X main.apiServerURI=https://api.keploy.io" -o keploy
294
+
export PATH=$PWD:$PATH
294
295
```
295
296
296
297
### Step 2: Record a test case
297
298
298
299
```bash
299
-
cd /home/anju/grpc-protoscope
300
-
301
300
# Start recording
302
-
/home/anju/keploy/keploy record -c "go run ./server/"
301
+
keploy record -c "go run ./server/"
303
302
```
304
303
305
304
In another terminal, trigger the gRPC call:
306
305
307
306
```bash
308
-
cd /home/anju/grpc-protoscope
309
307
go run ./client/
310
308
```
311
309
@@ -314,8 +312,7 @@ Then press `Ctrl+C` in the recording terminal. Keploy saves the test case in `ke
314
312
### Step 3: Replay (test mode)
315
313
316
314
```bash
317
-
cd /home/anju/grpc-protoscope
318
-
/home/anju/keploy/keploy test -c "go run ./server/"
315
+
keploy test -c "go run ./server/"
319
316
```
320
317
321
318
**Expected result:** Because `rand.Shuffle` randomizes field ordering each time, ~50% of test runs will produce a different wire order than the recording, triggering:
@@ -336,14 +333,14 @@ If the test passes (same random order happened to match), delete the `keploy/` f
336
333
```
337
334
grpc-protoscope/
338
335
├── README.md ← This file
336
+
├── go.mod
337
+
├── go.sum
339
338
├── proto/search.proto ← Protobuf schema matching the bug report structure
340
339
├── searchpb/ ← Generated Go protobuf/gRPC code
341
340
│ ├── search.pb.go
342
341
│ └── search_grpc.pb.go
343
342
├── server/main.go ← gRPC server with randomized wire field ordering
344
-
├── client/main.go ← gRPC client that calls the Search RPC
345
-
├── go.mod
346
-
├── go.sum
347
-
└── keploy/ ← Keploy test artifacts (created after recording)
348
-
└── test-set-0/tests/test-1.yaml
343
+
└── client/main.go ← gRPC client that calls the Search RPC
349
344
```
345
+
346
+
> **Note:** The `keploy/` directory (test artifacts) is generated at runtime when you run `keploy record` and is not checked into the repository.
0 commit comments