is it possible to save the Writable Data Source

ParasofttoudayaParasofttoudaya Posts: 212 ✭✭

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??



  • benken_parasoftbenken_parasoft Posts: 619 ✭✭✭

    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.

  • ParasofttoudayaParasofttoudaya Posts: 212 ✭✭

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

  • OmarROmarR Posts: 209 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_parasoftbenken_parasoft Posts: 619 ✭✭✭

    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.

  • ParasofttoudayaParasofttoudaya Posts: 212 ✭✭

    Thanks @OmarR and @benken_parasoft

    I am planning to go with your option.

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

  • benken_parasoftbenken_parasoft Posts: 619 ✭✭✭
    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. :)

Sign In or Register to comment.