Modify data bank in Method Tool

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in SOAtest
Is there a way to directly modify a data bank (actually many of them) in the method tool (using Jython)? I know I can add a databank as an output tool, but this seems very indirect. I'm looking for something similar to MethodToolContext.getVariable(), which only returns test suite variables. Thanks.
Tagged:

Comments

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Hi Kevin,

    The XML Data Bank only stores values, and once stored these values are not writable. However, you can alter values directly in the XML Data Bank by expanding the Options section at the bottom of the XML Data Bank Editor window, and enable Allow Alteration. Now, you can add an XPath to the Alter tab on the right, and double-click on it to set Alteration options.
    If you want to get the value that an XML Data Bank stores within a Method Too, you can use context.getValue(). For the Data Source name, use "Generated Data Source". This is a special Data Source name, and doesn't need to be specified with addDataSources().
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    the allow alterations option is a neat trick. I think it might come in handy.
Sign In or Register to comment.