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.

is it possible to save the Writable Data Source

Parasofttoudaya
Parasofttoudaya Posts: 232 ✭✭

Hi Team,

is it possible to save the writable Data source to specific Path.
We are having set of test case, where each test case will write data to writable data source dynamically.

When we run the parameterized test case, we are loosing the extracted data. is there any way to achieve this??

Thanks
Udaya

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    Writable data sources are intended to be written and used in the context of a single iteration of a scenario. This way, each iteration can populate the data needed for that iteration before it is cleared again in preparation for the next iteration.

    Writable data sources aren't intended to persist data, like for reporting or something. Like other kinds of data sources they are used to parameterize test cases. The advantage here is that you can clear it out, populate it, have some child scenario iterate over the rows in the writable, then repeat the process again for the next iteration of the scenario.

  • Parasofttoudaya
    Parasofttoudaya Posts: 232 ✭✭

    I understand, situation requires that what data is retrieved back for the iteration.
    Any other workaround to save it external.

  • OmarR
    OmarR Posts: 233 admin

    Good morning,

    A solution would be to parameterize your writable-dataSource values in a messaging client with the transport set to none. You would then chain a Write File tool (as a request traffic output) to the client to write the dataSource values into a file. Give this a shot and let us know if you have any trouble.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    I never recommend using external file as a way to pass data between test cases in a scenario. I understand that in some cases it might be simpler but using file system this way is inherently not thread safe and is inefficient. For example, if you did this then it would not make sense or would not necessarily work to re-use such a tst as part of a load/performance test (using Parasoft Load Test). Of course, I am not saying you can't do this. You just have to weigh your options, considering trade offs.

    There are different options in the Writable Data Source that affect when data is cleared, as well as the overwrite/append behavior which is somewhat related. The options are not very intuitive so I would check the docs and play with them a little bit. You may also try moving your writable to a higher level in the test suite in case this helps in the data source not getting cleared too early.

  • Parasofttoudaya
    Parasofttoudaya Posts: 232 ✭✭

    Thanks @OmarR and @benken_parasoft

    @OmarR
    I am planning to go with your option.

    @benken_parasoft
    There is a situation i need to track the information that coming as response.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited October 2017

    There is a situation i need to track the information that coming as response

    I don't understand your full requirements, what you mean by "track the information". Otherwise I might be able to make a suggestion for you. Regardless, you've been warned. :)