locked
Creative ideas for testing REST API RRS feed

  • Question

  • User-1973549258 posted
    Hello !
    Now I have an Endpoint that I can retrieve it using Rest request with some mandatory parameters. I have java application that send the requests and I need to do test to this endpoint using my program.
    Example:
    I have a Rest api endpoint which is retrieved using GET request and 4 parameters: name, type ( has defined list) , id, and code .
    So any creative ideas for testing ?

    Thanks in advance !

    Maddy
    Saturday, April 22, 2017 8:38 AM

Answers

  • User765422875 posted

    Sorry, misunderstood.

    So it seems the Rest Service is only for a Get. So you want to test as many permutations as you can of the input parameters including ones that will be wrong. So you want to pass things in that may causes errors or invoke any validation routines you may have.

    You should also consider performance and hit the method with multiple concurrent requests.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 22, 2017 6:57 PM

All replies

  • User765422875 posted

    If you are just talking about testing the API itself (not unit tests) then you can use:

    SoapUI 

    Postman

    Both are good and offer free versions.

    Saturday, April 22, 2017 1:32 PM
  • User-1973549258 posted
    Thanks for your reply.

    But i am asking for creative ideas to wht to test in a rest api endpoint?
    I am already implementing a java code that send REST requests, and I did some tests as changong the letter's casses for the id parameter for example or uae empty parameter.

    So what else i can test for a ResT api endpoint?

    Thanks
    Saturday, April 22, 2017 5:44 PM
  • User765422875 posted

    Sorry, misunderstood.

    So it seems the Rest Service is only for a Get. So you want to test as many permutations as you can of the input parameters including ones that will be wrong. So you want to pass things in that may causes errors or invoke any validation routines you may have.

    You should also consider performance and hit the method with multiple concurrent requests.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 22, 2017 6:57 PM
  • User-1973549258 posted
    Thanks a lot for the info.

    Regarding the concurrent requests, how that can be implemented in Java?

    Thanks
    Saturday, April 22, 2017 8:40 PM
  • User765422875 posted

    Regarding the concurrent requests, how that can be implemented in Java?

    My comment about concurrent requests was in regards to testing the Rest API, not anything regarding implementation.

    Its about simulating a particular load on the api to test performance. Since you asked for creative ideas for testing the api, considering performance is something to think about.

    So you should test the Get method by calling it with multiple simultaneous requests.

    Hopefully this answered your question.

    Saturday, April 22, 2017 9:11 PM
  • User-1973549258 posted
    OK thanks a lot for your help !!
    Sunday, April 23, 2017 12:02 AM
  • User765422875 posted

    Thats good. Please mark the answer accepted if it helped you, so others can benefit from it as well. Thanks

    Sunday, April 23, 2017 12:08 PM