VSE recorder isn't creating all responses from Open API document
search cancel

VSE recorder isn't creating all responses from Open API document

book

Article ID: 204716

calendar_today

Updated On:

Products

CA Cloud Test Mobile CA Application Test

Issue/Introduction

CA DevTest is not importing all the necessary HTTP transactions from our Swaggers from SwaggerHub (Open API 3.0.0).

After recording the swagger by the VSE recorder, we are only receiving 200/201 HTTP response codes in the responses and not all the error HTTP codes (4xx/5xx).

 

 

Environment

Release : 10.6

Component : CA Service Virtualization

Cause

The transaction which has multiple responses does not have the parameter which "in" is "query" in the .yaml or json file for creating the virtual service.

Resolution

If the transaction has a parameter which "in" is "query" and also has the multiple responses like below:

      - name: aaa
        in: query
        description: sample
        required: false
        schema:
          type: string
        example: filter=name eq test

then parameter which "in" is "query" becomes a request argument and records multiple responses with different argument vales. For example, if the responses have three different HTTP-Response-Code like "200", "500" and "503" then, the transaction includes:

  1. Response which  HTTP-Response-Code is 200
  2. Response which  HTTP-Response-Code is 500
  3. Response which  HTTP-Response-Code is 503

Also if the transaction has the multiple parameters which "in" is "query", then multiple responses can be recorded.

However, if there are not any parameters which which "in" are "query", there are multiple responses with one request(same headers and bodies), the the VSE recorder records only the first response information in the json or yaml file.
Then if the first response has the response code 400, then only response code 400 was recorded like below:

This recording result(if there are not any parameters which "in" are "query") works as designed(or this seems the limitation of the VSE recorder), because VSE is impossible to select the responses from the same request information without date from the header.

Attachments