Browser Data Bank -> Output

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in SOAtest
View and save extracted values
I'm running a Web test and at the end of it I extract a value to a Browser Data Bank (Browser Content->Browser Data Bank).
How can I:
1) Inspect the data bank. i.e. view the extracted values
2) Write the extracted values to a file.

Thanks,
Amela
Tagged:

Comments

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

    To view the extractions after you playback the scenario you will need to have the "Console" view made available: Window > Show View > Console.
    Then go to SOAtest > Preferences > Console and set "Output Verbosity level" to "High"
    Then you can run the playback and once it is done, select the "Console" tab and you will see, under the corresponding test at which you have a Browser Data Bank created, a line that says "set [column name]=[extracted value]".


    To save extractions, you can attach an Extension Tool (Right-Click > Add new test) at the END of the recording scenario:
    -So the scenario would look like:
    --Test 1: Navigate
    --Test 2: Click
    --Browser Contents -> Browser Data Bank
    --Test 3: Click
    ...
    ...
    --Test #: Extension Tool

    As long as the Extension tool is a test sometime after you set the extraction, it will be able to grab the value.

    Now as for actually writing to a file, we currently have a forum topic (under Scripting examples) that explains how to do this:

    How to grab a value from a data source and write to a file

    *Notes:
    --This example is written in Python and so inside the Extension Tool, you would set the Language to Python. ( no need to check the two checkboxes above it)
    -- You can also use Javascript or Java and you can refer to the documentation or search the forum for examples.
    --Make sure you set the radio button to "Text"
    --*For future reference: The "Generated Data Source" argument in getValue() is used for data sources column names generated from tools like the Browser Data Bank (your case) or XML Data Bank, if you created your own Data Source, you simply change the argument to that data source name.
    -- The second argument in getValue() is the name of the columnName for that data source (in your case, what ever you named the extraction) but if again if you had your own data source, you would change it to a corresponding column name.
    -- Also, once you are done writing the code, make sure you select the "getPrice" function (or whatever name you use) in the drop down menu at the bottom of the Extension Tool (labeled "Method:"). You do not want to select the "addDataSources" method because this is only a helper for your main method to access the data source and column names.

    I'm running a Web test and at the end of it I extract a value to a Browser Data Bank (Browser Content->Browser Data Bank).
    How can I:
    1) Inspect the data bank. i.e. view the extracted values
    2) Write the extracted values to a file.

    Thanks,
    Amela

Sign In or Register to comment.