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**
@@ -56,46 +53,77 @@ pipeline {
56
53
57
54
### Example
58
55
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:-
56
+
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
90
+
sudo mount -t tracefs nodev /sys/kernel/tracing || true
91
+
'''
92
+
}
93
+
}
94
+
stage('Run Keploy Tests') {
95
+
steps {
96
+
sh '''
97
+
cd gin-mongo
98
+
sudo -E keploy test -c "go run main.go handler.go" --disableANSI
99
+
'''
85
100
}
86
101
}
87
102
}
88
103
}
104
+
89
105
```
90
106
107
+
### 📝 Note
108
+
109
+
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?"_ 😅
110
+
111
+
Don’t worry — these are just there because **Keploy uses eBPF** (a cool Linux feature) to trace your app’s behavior.
112
+
113
+
So we install `kmod`, `linux-headers-generic`, and `bpfcc-tools` to make that tracing possible.
114
+
115
+
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.
116
+
117
+
No black magic. Just some low-level Linux stuff helping your tests run like magic! 🪄✨
118
+
91
119
We would output something like below:-
92
120
93
121
```sh
94
122
Started by `user admin`
95
123
96
124
...
97
125
98
-
+ sudo -E keploy test -c npm run start --disableANSI
126
+
sudo -E keploy test -c go run main.go handler.go --disableANSI
99
127
100
128
▓██▓▄
101
129
▓▓▓▓██▓█▓▄
@@ -107,43 +135,39 @@ Started by `user admin`
107
135
▓▌ ▐█▌ █▌
108
136
▓
109
137
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