TestGuild Automation Podcast

API Testing 3 ways: Postman, Playwright, and Jest Compared with Stephen Kilbourn

Sep 15, 2024
Stephen Kilbourn, an experienced automation tester and Automation Guild member, dives into the world of API testing tools: Postman, Playwright, and Jest. He explains the significance of API-level testing and shares practical tips for each tool. Discover how Postman allows schema validation and its pros and cons, while Playwright offers a unique request context for API tests but comes with adoption challenges. Lastly, Stephen demonstrates using Jest with Axios, showcasing different approaches and helping listeners choose the best tool for their needs.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

API Tests Catch Regressions Faster

  • Testing APIs in isolation speeds up finding regressions and simplifies debugging compared to UI end-to-end tests.
  • API-level tests let you catch issues before they reach end users and make failures easier to investigate.
ADVICE

Use Postman + Newman For Quick API Runs

  • Use Postman to craft requests and write JavaScript tests, then export collections for automated runs with Newman.
  • Store environment secrets separately and never commit API keys to the repo.
ADVICE

Validate Response Schema, Not Exact Values

  • Validate response shapes with AJV schemas in Postman to assert required keys and types without checking exact dynamic values.
  • Keep assertions flexible for changing fields like local time or live weather data.
Get the Snipd Podcast app to discover more snips from this episode
Get the app