From network tab to automated API test with GenAI
summary
Automates generation of API tests from a HAR file by extracting GraphQL queries, saving query, variables and response, then using a PNPM NX TypeScript generator plus OpenAI to produce k6 test scaffolding, compile to JavaScript and run. It produces 10 tests for 10 GraphQL queries, executes them with k6 and reports 273 assertions across scenarios. The generator works end-to-end but requires manual verification of responses and prefers regex scripting for simple file moves while using GenAI for assertion code.
AI-written summary · about
chapters (11)
- 0:00Introduction and speaker intro
- 1:09Challenges in backend API testing
- 3:15Six-layer k6 architecture explained
- 3:35Demo setup and HAR file extraction
- 4:43Generating tests from HAR file
- 6:31Running and validating generated tests
- 7:32Deep dive into a single test scenario
- 9:17Solution breakdown and AI integration
- 10:43AI tools and prompt optimization
- 12:08Balancing AI and manual automation
- 12:48Closing remarks and Q&A
related talks
01h 26mAutomation of the Automation using GenAI
26mAI and the Future of Testing
20mPower of OpenAI in API Testing
47mNext generation of API testing : Unleashing the power of AI
29mBeyond OpenAPI and AsyncAPI: AI agents wrote the spec, code, and tests - now w…
14mIntegrate Postman with Generative AI for Effective API Testing
19mFunctional Testing of GraphQL APIs: Simple Checks That Catch Real Bugs
43mExploratory Testing with AI
