![]() Insomnia is a REST Client that I often use for Exploratory testing. Using the JSON Filter in Insomnia Response View todos.length I'll write up a fuller set of learnings on Postman scripting in a later post. I hadn't used the Postman scripting before, so I learned a new set of knowledge when I tried that out. Send Requests/Response through a Proxy and use the Proxy viewer.Paste the JSON into a browser dev console.Script in Tests in a request in Postman.Using the pretty print view in Postman console.Using the JSON filter in Insomnia Response view.How many ways are there to count the values in a JSON array returned from a REST API call? I used this limitation as a Personal Test Improvement Exercise. feature requests for testing can be usefulīut my only option made me realize that I didn't have enough workarounds available in my mind to handle this situation.I wrote some comments to Elisabeth and Thomas, and at the time, the only "workaround" I could think of was to use Insomnia because that can show a filter count in the responses. GET /todos returns a list of to-do's, but if there are a lot of them then it can be hard to know how many are there.Įlisabeth and Thomas were using Postman to test the app, and Postman does not show how many items are returned. One note in the write-up mentioned that it could be useful if the responses described how many items were returned.Į.g. I've been working on Thingifier, which at the moment exposes a REST API for a simple To-Do ManagerĮlisabeth Hocke and Thomas Rinke bravely picked the app to perform some testing on and created a useful write-up. If you identify other ways to count the JSON than I did, then I'd be interested in learning, so send me a message or leave a comment somewhere. I learned some new stuff along the way and remembered some old stuff. I eventually came up with six different ways to count the number in the array before I stopped. I used Thingifier, created a bunch of "to-do's" and then used GET /todos to return an array of "to-do's" how can you identify how many "to-do's" are in the list.find a REST API that returns a JSON array object e.g.How many ways do you have to count the values in a JSON array returned from a REST API call?.You might want to try it yourself before reading the full text of this post.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |