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
> **Note: if you are using `arm_64` as runner use below to download keploy binary**
54
47
55
-
`curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp`
48
+
```
56
49
57
50
### Example
58
51
59
-
Now that we have Keploy installed, and all ready, we need switch to path where `keploy` folder is present in our application and install all the application related dependencies. Since we are using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application, steps in our `script` would look like below:-
52
+
Now that we have Keploy installed, and all ready, we need switch to path where `keploy` folder is present in our application and install all the application related dependencies. Since we are using [gin-mongo](https://github.com/keploy/samples-go/tree/main/gin-mongo) sample-application, steps in our `script` would look like below:-
sudo mount -t debugfs nodev /sys/kernel/debug || true
86
+
sudo mount -t tracefs nodev /sys/kernel/tracing || true
87
+
'''
88
+
}
89
+
}
90
+
stage('Run Keploy Tests') {
91
+
steps {
92
+
sh '''
93
+
cd gin-mongo
94
+
sudo -E keploy test -c "go run main.go handler.go" --disableANSI
95
+
'''
85
96
}
86
97
}
87
98
}
88
99
}
100
+
89
101
```
90
102
103
+
### 📝 Note
104
+
105
+
Did you notice some weird stuff in the pipeline? Like `kmod`, `linux-headers`, `/sys/kernel/debug`...and thought, _"Wait, am I hacking the kernel or something?"_ 😅
106
+
107
+
Don’t worry — these are just there because **Keploy uses eBPF** (a cool Linux feature) to trace your app’s behavior.
108
+
109
+
So we install `kmod`, `linux-headers-generic`, and `bpfcc-tools` to make that tracing possible.
110
+
111
+
Some CI systems don’t have `/sys/kernel/debug` and `/sys/kernel/tracing` by default, so we create them and mount `debugfs` and `tracefs` — it’s like giving Keploy the **backstage pass** it needs to watch your app in action.
112
+
113
+
No black magic. Just some low-level Linux stuff helping your tests run like magic! 🪄✨
114
+
91
115
We would output something like below:-
92
116
93
117
```sh
94
118
Started by `user admin`
95
119
96
120
...
97
121
98
-
+ sudo -E keploy test -c npm run start --disableANSI
122
+
sudo -E keploy test -c go run main.go handler.go --disableANSI
99
123
100
124
▓██▓▄
101
125
▓▓▓▓██▓█▓▄
@@ -107,43 +131,39 @@ Started by `user admin`
107
131
▓▌ ▐█▌ █▌
108
132
▓
109
133
110
-
version: 2.1.0-alpha23
111
-
112
-
🐰 Keploy: 2024-06-05T14:50:12+05:30 INFO config file not found; proceeding with flags only
113
-
🐰 Keploy: 2024-06-05T14:50:12+05:30 WARN Delay is set to 5 seconds, incase your app takes more time to start use --delay to set custom delay
114
-
🐰 Keploy: 2024-06-05T14:50:12+05:30 INFO Example usage: keploy test -c "/path/to/user/app" --delay 6
🐰 Keploy: 2024-06-05T14:50:13+05:30 INFO keploy initialized and probes added to the kernel.
117
-
🐰 Keploy: 2024-06-05T14:50:13+05:30 INFO Java detected and CA already exists {"path": "/usr/lib/jvm/java-17-openjdk-arm64/lib/security/cacerts"}
118
-
🐰 Keploy: 2024-06-05T14:50:13+05:30 INFO Java detected and CA already exists {"path": "/usr/lib/jvm/java-17-openjdk-arm64/lib/security/cacerts"}
119
-
🐰 Keploy: 2024-06-05T14:50:14+05:30 INFO Keploy has taken control of the DNS resolution mechanism, your application may misbehave if you have provided wrong domain name in your application code.
120
-
🐰 Keploy: 2024-06-05T14:50:14+05:30 INFO Proxy started at port:16789
121
-
🐰 Keploy: 2024-06-05T14:50:14+05:30 INFO running {"test-set": "test-set-0"}
122
-
🐰 Keploy: 2024-06-05T14:50:14+05:30 INFO starting TCP DNS server at addr :26789
123
-
🐰 Keploy: 2024-06-05T14:50:14+05:30 INFO starting UDP DNS server at addr :26789
0 commit comments