Legacy Documentation
You're viewing legacy documentation for API Fortress (deployed via an on-premises container). To view documentation for the new SaaS version of API Fortress — now known as Sauce Labs API Testing and Monitoring (with Sauce Connect tunnels) — see API Testing on the Sauce Labs Cloud.

Assertions for Metrics / Performance

We have a more detailed guide on working with the HTTP response, but wanted to provide specifics on creating assertions against performance metrics. Here is an example using the CODE VIEW of the code. Please note that overall refers to fetch and latency combined.
<assert-less expression="payload_response.metrics.latency" value="200" type="integer"/>

<assert-less expression="payload_response.metrics.fetch" value="350" type="integer"/>

<assert-less expression="payload_response.metrics.overall" value="450" type="integer"/>