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.

How to achieve TextDatabank data storing in Custom Writable Databank ??

Options
Teja
Teja Posts: 10
edited January 2 in SOAtest

Hi Team ,

Can any one tell me how to store the Textdatabank data into our Writable Datasource so that i can use it in below Custom Assertion method calling
String Datasource = context.getvalue("DataSource name",Column name");

Answers

  • Teja
    Teja Posts: 10
    Options

    Note : I have given the Writable Databank Column name in TextDatabank DataSource Column still its not storing in the Writable Datasource.

  • benken_parasoft
    benken_parasoft Posts: 1,235 ✭✭✭
    edited January 3
    Options

    Writable Data Sources are intended for XML/JSON Data Banks. If a XML/JSON extraction matches multiple values then those values can be written down a column of a Writable Data Source. This allows you to have a second test suite loop over the extracted values, row-by-row.

    In contrast, a Text Data Bank will just extract a single value. You can reference Data Bank columns from a script using context.getValue("Generated Data Source", "columnName"); The data source name "Generated Data Source" is special, reserved for getting data bank values. The second argument is the name of the data bank column.

    Please be aware that if the extraction in a Data Bank doesn't match anything then nothing will be written to that column. So, if you are not able to get the value then it is possible your extraction is not matching anything.