SOLUTIONS · API TESTING
Test the API. Not the mock.
A mocked contract can pass while the real endpoint fails. Jetic tests the running API: actual middleware, actual tokens, actual responses, ordered the way a client would call them.
WHAT GETS TESTED
The parts a unit test cannot reach.
Jetic is aimed at the boundary between your code and the client.
Status codes
Each step declares what success looks like, including expected failures.
Response shape
Validate the payload against the contract before moving on.
Auth flow
Use the real token producer and inject it into protected calls.
State changes
Create, read, update, and delete in the order a client would.
Validation errors
Assert the exact failure for bad input and missing fields.
Middleware order
The model records the chain, so the test runs against the same guards.
TEST LAYERS
Different questions, different tools.
Jetic does not replace unit tests. It covers the questions that only exist over HTTP.
| Layer | Question | Jetic |
|---|---|---|
| Unit | Does this function behave? | Out of scope |
| Integration | Do these modules compose? | Partly, through the real server |
| API contract | Does the endpoint keep its promise? | Yes, per step |
| Journey | Does the sequence work with real state? | Yes, with capture and inject |
| Regression | Did this change break a known path? | Yes, on every run |
NEGATIVE PATHS
A passing suite should include the failures.
The most valuable tests often assert that the API says no for the right reason. Jetic treats an expected error as a normal step outcome.
- Assert 401 for a missing token
- Assert 403 for the wrong owner
- Assert 422 for an invalid body
- Continue the journey after an expected failure
HOW A RUN WORKS
Order, state, assertion, evidence.
Order
The workflow fixes the sequence of calls.
State
Capture a value and inject it downstream.
Assert
Declare the expected status for each step.
Trace
Keep the request, response, and timing.
KEEP GOING
Testing is one part of the loop.
API TESTING FAQ
Frequently asked questions
Do I need a running server?
Yes. Simulations send real HTTP requests to the environment you select. Scanning does not need the server.
Can I test error responses?
Yes. Expected status is part of a step, and conditions can assert on captured error codes.
Does Jetic mock external services?
No. It tests your API as it runs. External dependencies need to be available in the target environment.
Can I keep tests next to the code?
Yes. The .jetic folder lives in the repository and can be reviewed with the change that affects it.
Test what runs. Keep what happened.
Write the journey once, run it against the real API, and keep the trace when it fails.
Try a simulation