Build the feature while the API takes shape.
Build the client against the HTTP responses and state changes you expect while the upstream service is still taking shape. Use Gostly to exercise those cases locally, then check your assumptions when the real API is ready.
Build a workspace invitation flow before the upstream is ready
Settings / People
Members
Manage who can access Engineering.
Pending invitation retained after reopening
Request sequence
POST /invitations201Invited qa@example.testGET /members200Same invite returned as pending
When to use it
The application is ready for work. Its dependency is not.
Use a local HTTP case when request formatting, response parsing or state across calls affects the feature. A local stub is usually enough for an isolated branch in your own code.
What to check
- Starting state
- The workspace has no pending invitation for the address.
- Dependency behavior
- The invite succeeds, and a later list request includes the new pending invitation.
- Application check
- The pending row remains visible after reopening the members view.
How to approach it
Develop against APIs locally
4 steps
- Gostly MOCK mode
- curl
- Gostly Record & Replay
Agree on what a successful invite looks like
Write down the invitation request, the response and what the next list call should show. Include a meaningful second case, such as an address that already has a pending invitation. Mark assumptions the upstream team still needs to confirm.
Prepare the smallest useful dependency
Author examples from the agreed contract or retain an approved exchange if one already exists. Model changing state when the list needs to reflect a prior write. Keep the baseline small so you can repeat the invite and duplicate paths independently.
Route the real client and verify the response
Point the SDK or HTTP client at the prepared service through Gostly. Confirm the returned status, body and source with a known request. Exercise the invitation in the application, reopen the list and check that the right record appears once.
Compare with the implemented API
When the service is available, verify the assumed behavior using approved requests. Pay particular attention to authorization, duplicate handling and side effects. Update either the client or the fixtures based on what you observe.
What this gets you
Keep the client moving while the service changes
The team can develop the invitation flow, see the pending invite on a later read and review the cases it will verify against the implemented service.
What the check tells you
An authored case checks the client against the contract you supplied. Authentication, fields outside the case and real write effects need a separate check against the actual dependency.
Where Gostly fits
Gostly supplies the API behavior you prepare for development. Keep application state and full integration checks in your team’s own environment.
Put it into practice
More worked examples
Compare sample API conditions with the checks your application can run.
Build against an API that isn’t finished
Authored worked example · synthetic data
Build an inventory screen before its API ships
A synthetic inventory example contains an in-stock item. A separate reviewed example covers an empty result. The client can use both cases while the team keeps the API contract under review.
| Your action | API condition | Your test checks |
|---|---|---|
| Import the definition or collection | The importer creates library entries from supported content | Read warnings and inspect the selected example responses |
| Call the populated case | A reviewed synthetic item is returned | Assert the client renders its name, availability and expected fields |
| Select the empty case | The reviewed example contains no inventory items | Assert a useful empty state rather than a broken screen |
| Record the implemented API | Real responses replace or complement the authored assumptions | Review contract differences and update the client tests |
An imported specification or collection does not reproduce the full server implementation. Business rules, side effects and state transitions need explicit examples or supported scenario configuration.
Seeding setupYour next change