i automate a RESTApi with Postman/Newman, and that was a lot of fun for the last months. But I come close to the point where i have to overthink my strategy.
Right now, i have a lot of endpoints who needs input to run, and their response will give me input to get the next endpoint working. I also haven´t thought that we will develop so many new ones during the last weeks so now i am on the point where i have a LOT of endpoints chained together in a way, they all run on our CI/Build, but when one breaks, the whole chain brakes. I know which one caused the problem, but it´s not satisfying. And i have to make a lot of compromises to create that (meanwhile) very long chain.
As i see it, there are 2 ways with their pros and cons:
Keep the weird monsterchain alive
+I test EVERY endpoint we have
+I dont have to put in more work, as that is the point where I am right now
-The compromises i have to agree on starts to bug me. I have to do weird moves and slowly have to accept redundancy in the collections, to get every endpoint into my execution chain.
-I dont feel that´s the right/professional approach anymore (with that number of endpoints, we got now. As i started, we had way less)
Build a Collection of Use cases where i chain up max 3-5 Endpoints as small testscenario
+I feel thats more professional right now
+I dont have to go uncommon ways, i work the common Use cases the user would also take. A lot of bad compromises are gone
-The rebuilding would take A LOT OF TIME
-ENORMOUS Redundancy of endpoints, if one changes, i have to edit a whole lot of endpoints, and every other problem that comes with a lot of redundancy (as in postman, there is no thing as inheritance as in programming languages with endpoints, afaik)
-I wouldn´t test EVERY endpoint in our ecosystem
-A whole lot of time i used the last months would be useless (when we dont count the large experience i made with apiTesting in that time)
-A lot of inputData would be “hardcoded”, instead of getting data in the large chain. Sure that way i can precise my assertions way more but i feel something could slip away from me (bugs)
I think with that approach I could miss more bugs/failing-or-not-working-anymore-endpoints then with the 100% solution (the weird superchain) on top.
What do you think? Maybe there is a way better 3rd option I just don´t see right now. I would be very thankful for every tip.
I have to add: we don´t have a isolated testenvironment yet, which is very bad. We are working on that and something will come in the next months, but right now my superchain “spams” our DevEnvironment. That would also happen with the Use-Cases-approach in my point of view.