Do You Test Multi-Step API Flows Manually or in Code?

0
8
Asked By CuriousCoder42 On

When working with APIs, do you typically test multi-step flows like authenticating, creating resources, updating them, verifying changes, and cleaning up through your API client? Or do you move these tests into your codebase and run them as part of your testing suite? I'm curious if you run these steps manually as separate requests or if you utilize tools that allow sequences of requests to be executed together.

5 Answers

Answered By APIWizard52 On

Yeah, it's often referred to as a "multi-step operation." I only test these on the API side because frontends can be unreliable—requests might not get sent or could end up malformed. Testing is definitely key!

Answered By CodeCrafter99 On

You might want to check out a tool called t-req for handling this! It can help organize those workflows nicely. For us, we keep our collections within our codebase, so they can share context and keep everything versions in sync. Just a heads up, I built t-req, so I'm a bit biased, but it’s worth a look!

Answered By DevTester89 On

I usually handle this in my integration tests. I really dislike over-mocking things because it can lead to a false sense of security. End-to-end (E2E) tests for these multi-step operations are super essential since they are often the most complicated.

Answered By LearningLouisa On

I don’t really know much about this topic, but I love how passionate everyone here is! Makes me think I should dive deeper into learning about APIs and testing.

Answered By TechieTrends On

I generally do it all manually, LOL. It's a bit of a hassle, but it works for me!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.