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 get input for Assertion Step

Parasofttoudaya
Parasofttoudaya Posts: 232 ✭✭

Hi Team,

Below is the scenario.
Test1 : callGetNames
Test2: CallDatabase
Test3: AssertDBAgainstNamesResponse

How do i get the Test1 response in Test3

Regards
Udaya

Comments

  • Ireneusz Szmigiel
    Ireneusz Szmigiel Posts: 227 ✭✭✭

    Hi Parasofttoudaya

    use DataBank tool.
    Depending on the type of response from Test 1 you can use XML DataBank, Text DataBank, or JSON DataBank.
    Right-click on Test 1 and add output to get of the list of available tools

  • Parasofttoudaya
    Parasofttoudaya Posts: 232 ✭✭
    edited September 2017

    Hi Irene,

    Using databank you will be able to extract the response. How do you pass that response as input to my 3rd Test, which is assertion tool.

  • Parasofttoudaya
    Parasofttoudaya Posts: 232 ✭✭

    Any update on this??

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited September 2017

    Tool configuration fields usually have a combo box that lets you chose a Fixed value or a Parameterized value. Next to the field you want to configure, you would chose Parameterized in the first combo box and then the name of the column from the second combo box. You can also reference columns directly in any Fixed fields as ${column_name}

    If you need to get a column value from a scripted field or Extension tool, then you can call com.parasoft.api.ScriptingContext.getValue(String dataSourceName, String columnName). For data bank columns, pass "Generated Data Source" for the dataSourceName argument.