API steps
API steps in end-to-end tests
Beta This capability is in beta. It is available on the plans listed below and may change.
A step can call an HTTP endpoint and assert on the response, mixed with UI steps in the same test.
A step can call an HTTP endpoint and check the response, in the same test as UI steps. The api: step takes get, post, put or delete with a path, an optional body, and an expect block with the status and dot-path checks on the body.
1steps:2 - Click "Place order"3 - assert: The order confirmation page shows an order number4 - api:5 get: /api/orders/latest6 expect:7 status: 2008 body.status: confirmedWhen it applies
- A UI flow ends in a state that is easier to confirm through the API, such as an order status.
- A test needs to check the backend result of a UI action.
Related integrations
Questions
API testing vs UI testing: which do I need?
Usually both. UI steps check what a user sees; API steps check what the backend recorded. The platform lets one test do both in order.
Which HTTP methods are supported?
get, post, put and delete.
Is this a load testing tool?
No. API steps check responses; they do not replace load testing.
Request early access
Early access: prices are the planned list prices. Billing starts when the platform enters beta; early-access use is not charged. We reply within 24 hours on business days.