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
The ProxyServer service supports recording HTTP requests for test mocking and replay. All proxied requests are automatically recorded by the mock server as described in the [Mock Server documentation](https://www.mock-server.com/proxy/record_and_replay.html).
103
+
104
+
```typescript
105
+
// Record all requests
106
+
awaitproxyServer.recordExpectations();
107
+
108
+
// Record requests with matching criteria
109
+
awaitproxyServer.recordExpectations({
110
+
method: 'POST',
111
+
path: '/api/workflows',
112
+
queryStringParameters: {
113
+
'userId': ['123']
114
+
}
115
+
});
116
+
```
117
+
118
+
Recorded expectations are saved as JSON files in the `expectations/` directory with unique names based on the request details. When the ProxyServer fixture initializes, all saved expectations are automatically loaded and mocked for subsequent test runs.
119
+
76
120
## Writing Tests
77
121
For guidelines on writing new tests, see [CONTRIBUTING.md](./CONTRIBUTING.md).
0 commit comments