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.

Writable Data Source Append not Working as Expected

Gambit
Gambit Posts: 28

I have the following test setup:

Table: Customer - Contains 2 customers. All rows are enabled. This will exec a total of 6 tests.

Writable data source config:

Json Data Bank as shown:

Write file only shows the second customer when using "per iteration".

What if I select "per write access" instead? Same result.

This is the work around I'm using, but I don't think this is supposed to work:
Set the writable data source to append only:

This makes the JSON data bank writable data source column unselectable.

Both customers are returned:

Is this a bug?

Tagged:

Comments

  • OmarR
    OmarR Posts: 233 admin

    Is this a bug?

    SOAtest doesn't have bugs ;)

    What version are you currently using?

  • OmarR
    OmarR Posts: 233 admin

    ahhh....i see the tag....I'll check it out on my end!

  • Gambit
    Gambit Posts: 28

    Any update on this?

  • OmarR
    OmarR Posts: 233 admin

    Good morning Gambit,

    I apologize for the delay. The way you have your test set up, the writable datasource will reset itself after each extraction because your GET request is parameterized against the "Customers" table and is writing out to the Writable DataSource in the same suite. Based on documentation, parameterizing tests in a scenario causes all tests to iterate through the datasources as a group (not independently).

    Lets take a look at Documentation:

    Per iteration: Configures the data source to reset each time the test suite in which it lives begins to iterate over a new data source row.

    Per write access: Configures the data source to reset before each new write access (appending data in a single write access only).

    Solution:
    In order for the Writable DataSource to behave the way we expect it, we will need to isolate the GET request by creating another test suite. For example:

    The above configuration should work.
    Now, as for why it works when the writable is set to "set-up" mode, I have no clue. Doc states only set-up tests can write to the data source in this mode, but perhaps this is an undocumented feature? :smile: I will file a ticket.