Data Repository - Accessing and updating from script?

ViperViper Posts: 2

Looking for some guidance please as I am new to Parasoft.
I have searched this forum for every search I could think of and googled searches as well.
I have a requirement to increment a counter that will be used in a virtual service. Each time I increment I want to save to new counter value back to the data repository, overwriting the previous value. I have tried using data sources: CSV, Excel, Table, Writable and even though I did manage to write value back to a CSV file, the next time I called the service it reverted back to original number on every run. After researching I discovered that these data sources do an initial load at start of run and although can increment it reverts back to original value in next run.
Hopefully I have understood this correctly, that using a Data Repository as a Global Data Source will enable me to increment a counter and write back to Data Repository and then next run will pick up new value. If someone can confirm this that would be great.
My current dilemma is understanding what the syntax is to read value from Data Repository and then after I have incremented, updating the same counter with new value.

My plan was to call a groovy script from field on response to read Data Repository, increment and write back before returning newly increment value.
Is this possible?

Appreciate any help on this. Thanks

Comments

  • VirtualUserVirtualUser Posts: 11

    hi,
    If you'd like to store and update the data in the data repository you may want to have a look at the Data Repository CRUD Tool.

  • ViperViper Posts: 2

    I have seen this mention in many posts but I can't find the jar for this to load. I am using Parasoft SOAtest & Virtualize 9.10.3.
    Does anyone have a link they can share please?

  • OmarROmarR Posts: 228 admin

    A built-in version of the Data Repository CRUD Tool was introduced in SOAVirt 9.10.7 (2019). There has been several enhancements to the tool since then. The latest version of SOAVirt is 2020.2.0 which was release a few weeks ago. We highly recommend updating to the latest version to take advantage of all the latest features.

Sign In or Register to comment.