The Text Data Bank tool extracts values from any text content, including plain text, HTML, XML, etc., and makes the values available as parameters in other tools and configurations.
The Text Data Bank can extract values from any text content (including plain text, HTML, XML, etc.). You can specify left- and right-hand boundaries that mark the beginning and end of the extracted text. Characters between the values specified in the left- and right-hand fields will be extracted. It is useful when you want to extract plain text (e.g., for use in another tool or configuration panel), and cannot use other extraction tools such as the Browser Data Bank, XML Data Bank, JSON Data Bank, and so forth. The Text Data Bank tool is typically configured as an output of another tool (most commonly, a Browser Playback or Message Responder tool) that delivers text output. In this case, the Text Data Bank’s Text Content area will be populated with the text output of the chained tool after tool execution completes. Alternatively, you can create a "standalone" tool using the Text Data Bank tool, then specify a file that contains the desired text content (for instance, a log file or other file that is dynamically updated or created during every tool run).
You can extract any value that appears between specified text boundaries. This allows you to extract values that vary from tool run to tool run. For example, assume you want to extract a session ID, which changes from session to session, and this session ID always appears between "leftboundary" and "rightboundary". You can configure a Text Data Bank tool to extract whatever value appears between "leftboundary" and "rightboundary". Every time this tool is run, the value that appears in the specified location between the given boundaries will be extracted. This way, if the session ID between those boundaries changes from session to session, the value extracted will also change from session to session.
Extracted values are added to the column you specify, and can be used in any tool configuration fields that allow parameterized values.
If the specified boundaries change (as a result of application changes), the configured extractions need to be updated to specify the new boundary values.
The Text Data Bank operates only on content considered to have a text MIME Type. A MIME Type is based on the specified ContentType or by the file extension. You can control which MIME Types are considered to be "text" by opening Parasoft> Preferences> MIME Types and and selecting the "Text" option for the appropriate MIME Types.
The data bank will be attached to the test or added to the suite. See Configuring the Text Data Bank Tool for next steps.
If you added the tool as an output of an existing tool, configure the fields under Tool Settings to extract text data. Standalone instances of the tool will have an Input tab for specifying the source from which you to extract content, as well as a Tool Settings tab for configuring extractions.
The data bank can be used as is, but more complex scenarios may require additional configuration. The value may change during subsequent tool runs, for example, so the specific value may not always be extracted. See Configuring Extractions for additional configuration information.
Enable the Remove tabs and newline characters before processing option to normalize whitespace in extracted text. This option is enabled by default.