Virtual REST API's

callie97callie97 Posts: 12

We have an application that has both SOAP API's and REST API's. The SOAP Api's are all accessible and I have used them to create test cases. The REST API's are virtual and so we don't see them in the file system. According to software documentation: "When a request is sent to the REST API, the URL is inspected and compared to a mapping that is maintained internally. If it finds that the URL matches a pattern that is mapped, it routs the request to the appropriate handler." How would you set up a Test Suite for these REST API's? They are just starting to use REST and eventually all API's will be set up this way.

Comments

  • Ireneusz SzmigielIreneusz Szmigiel Posts: 135 ✭✭

    callie97,

    first question: Do you have any WADL, Swagger, or RAML definition which can be used to create project automatically?
    second question: do you know sequences of REST APi calls for your project?
    I would recommend to take a look into section "Testing RESTful Services" in SOAtest User Manual/Help system, first.
    It's hard to recommend how you should set up Test Suite without knowing what do you want to achieve in the future.

  • callie97callie97 Posts: 12

    There aren't any WADL, Swagger or RAML definitions in any physical location. What I'm wanting to do is to set up the calls to the API's like I did with the WSDL to then create the test cases for the various functions we need to automate. Without any definitions, I can't use the create test suite function to add all the test stubs for the positive and negative test scripts. There are some of the Virtual REST API's that contain the URI of the next API that you should call. I'm fairly new to using SOATest so I hope I'm using the correct terms.

  • jakubiakjakubiak Posts: 272 ✭✭✭

    You are correct - if you don't have a WADL, Swagger, or RAML you will not be able to create the test cases in bulk like you can for WSDL. However, creation of the tests should still be simple if you know the REST API parameters; you can paste in the URL and payload (if relevant) directly into a REST Client.

Sign In or Register to comment.