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: docs/cookbook/src/crates/rustapi_testing.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,15 @@
7
7
1.**In-process API testing**: Testing your endpoints without binding to a real TCP port.
8
8
2.**External service mocking**: Mocking downstream services (like payment gateways or auth providers) that your API calls.
9
9
10
+
## Installation
11
+
12
+
Add the crate to your `dev-dependencies`:
13
+
14
+
```toml
15
+
[dev-dependencies]
16
+
rustapi-testing = { version = "0.1.300" }
17
+
```
18
+
10
19
## The `TestClient`
11
20
12
21
Integration testing is often slow and painful because it involves spinning up a server, waiting for ports, and managing child processes. `TestClient` solves this by wrapping your `RustApi` application and executing requests directly against the service layer.
0 commit comments