In this video, we explore how to use Pre-request and Post-response scripts in Requestly API Client to automate API workflows and generate powerful validation tests using the AI Test Authoring Agent.
Learn how to:
Write Pre-request scripts to dynamically update environment variables
Add custom headers using packages like uuid and moment
Use Post-response scripts to validate API responses
Generate automated test cases using AI prompts
Perform JSON schema validation and advanced response checks
Enhance scripts with built-in utilities like lodash
This tutorial demonstrates a real example using the StackExchange public API to show dynamic pagination, header injection, and automated response validation.
The AI Test Authoring Agent converts natural language prompts into executable API tests, making it easier to build reliable API validations faster.
Related videos:
Import cURL: • Import cURL Command (3 Easy Methods) | API...
Working with Collections: • Understanding API Collections
Explore Requestly API Client and streamline your API development and testing workflow.
Essential Links:
→ Website: https://requestly.com/?utm_source=req...
→ Download Requestly here: https://requestly.io/downloads
→ Chrome Store: https://rqst.ly/chrome-store
→ Documentation: https://docs.requestly.com/
→ GitHub: https://github.com/requestly/requestly/
Timestamps
00:00 - Intro
00:28 - Setting up API request
00:39 - Variable configuration
00:59 - Building dynamic pre-request script
01:26 - Executing request with pre-request logic
01:32 - Post-response scripting with AI tests
01:43 - Generating automated test from prompt
02:23 - Recap of scripting and AI capability
02:46 - Outro
Follow Us
→ Twitter: https://x.com/requestlyio
→ Reddit: / requestly
→ LinkedIn: / requestly
#Requestly #APITesting #APIClient #AutomationTesting #APIAutomation
#PreRequestScript #PostResponseScript #AITestGenerator #JavaScriptTesting #JSONSchema #StackExchangeAPI #QAEngineering
#DeveloperTools #APIValidation #SoftwareTesting