For the purposes of QA. Im trying to query my own API and delete strings that match a pattern.
During our QA regression tests, a large number of a certain string are created which all match a pattern similar to "QATest" followed by a random set of numbers.
Before the test runs again, Id like to get all of those strings through the API and delete them.
Can any one set me on the right path to do this and where I would start.
I can currently GET one. But not all. So I suppose I need to loop the GET request somehow. Put them in all in array and delete all in the array that match the pattern. But there might be better ways to do it.
Anyone have any ideas? I use Ruby and the rest-client gem. But Im open to other gems if they are better.
Aucun commentaire:
Enregistrer un commentaire