Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

root elements not populated when generating data

Options

I pulled down the google api yaml for books from this location, to practice working with data repositories and am running into some issues. This is the first.

google api yaml - https://api.apis.guru/v2/specs/googleapis.com/books/v1/swagger.yaml
api endpoint used - /users/{userId}/bookshelves/{shelf}/volumes - GET

When I generate data for an endpoint, under "Form Input", I have to save and save twice before I can actually use the payload further, without issue. after this second save, the root elements that are not arrays, or not checked, while every other element in the payload response is.

Are these multiple saves intentional or a result of an issue?
Why do the root elements that are not arrays, not get populated like all other elements?

Comments

  • williammccusker
    williammccusker Posts: 643 ✭✭✭
    Options

    Hi,
    I am not sure I understand the second part. No it should not require multiple saves. For the elements you mention root and not array and not checked. I am not sure I quite understand what your were expecting and what you saw instead. Which element specifically did not get populated?

  • goofy78270
    goofy78270 Posts: 133
    edited September 2019
    Options

    As shown in the first screen shot, kind and totalItems are not checked. The second screen shot was to show that levels in are all checked...

  • OmarR
    OmarR Posts: 235 admin
    Options

    Good afternoon,

    What version of the tool are you using? 9.10.6? 9.10.7?

    The multiple saves doesn't sound normal or intentional. I couldn't reproduced in 9.10.8, but I'll check the older builds.

    Also, what type of data generation are you doing? CSV or Data Repository?

    The reason that the two root elements are not parameterized is because they are not enabled in the Form JSON view. Notice the field "items" is enabled, therefore, it is the only one set to parameterized.

    This is an interesting case where we may still want to parameterize the field even if the field is disabled since we are setting the value in the repository as [exclude] which would be equivalent.

  • goofy78270
    goofy78270 Posts: 133
    Options

    I am using 9.10.7.

    My first step is to populate the yaml, so I select Form Input, and populate. This requires me to save and close. When I reopen the responder, the tab shows a * for dirty work environment (pending changes), so I save and close again.

    Upon reopening, I see that the 2 root level fields that are not arrays are not populated, but every other field in the payload is. The same appears in you screen shot as well.

    These unchecked fields have to be manually checked in order to populate in the data repo, which is the next step.

    NOTE: This is before selecting to generate the data repo.