No Data Source column named ... Error

draven23draven23 Posts: 5

I have a test where I am using the DBTool to fetch an ID from the database. I then pass this ID via Data Bank to a REST service. It actually works fine, but everytime I run the REST test, I get the error:

Error Message:
No Data Source column named correlationId

Additional Details:
This error often occurs when a column in the data source is renamed or removed. This error can also occur when a column that is extracted via various Data Bank tools (e.g., XML Data Bank, Browser Data Bank) is renamed or removed. Please verify whether the column still exists in the data source or the Data Bank tool. When there are multiple data sources in the test suite, verify the data source specified in the Data Source drop down box in the upper right hand corner of the UI. If the column has been renamed or removed, please select a new column in the UI.

If the column is extracted via a Data Bank tool, also verify whether the Data Bank tool was executed and whether the Data Bank tool received the input that it expected.

Checking the Traffic Viewer confirms that the test is getting the ID value and making a successful call to the service. But this error causes the test to fail just about every time. Is this a known issue?

Thanks!

Comments

  • OmarROmarR Posts: 205 admin

    Good afternoon,

    Have you tried updating your test execution to run your tests as a group? This will allow the dataSource to be iterated once per group. The option can be found in your top level test suite >Test Execution > Test Relationship.

  • benken_parasoftbenken_parasoft Posts: 519 ✭✭✭
    edited October 2017

    The error message explains what is wrong:
    If the column is extracted via a Data Bank tool, also verify whether the Data Bank tool was executed and whether the Data Bank tool received the input that it expected.

    In other words, the Data Bank must actually be executed and the XPath used for the extraction must actually matched something. For example, if you open up your tst and run the REST Client then it will guarantee to fail. You should run the scenario containing both tools. When a data bank is present, the suite should automatically be configured for "Tests run as group". Even so, for convenience, the UI will let you manually run the tests one at a time (individually) but the Data Bank column won't be found unless you first run it before any other tests that depend on it. Double check your XPath to make sure it is actually matching on what you expect.

  • draven23draven23 Posts: 5

    Hello. Thanks for your responses.

    Yes, I have the test configured to Run as Group. And I am running the DBTool first to populate the Data Bank. Like I said, the test is successfully getting the Id from the DBTool and hitting the service with it. In this case, the error message is wrong. There is a correlationId in the Data Bank. The test should pass, but due to this error, it is failing.

  • benken_parasoftbenken_parasoft Posts: 519 ✭✭✭
    edited October 2017

    The data bank will be found if the the XPath for your "correlationId" column actually matched. Checking the traffic viewer is not sufficient to know whether the XPath is matching or not. One way to check this is to run the Data Bank once, open the Data Bank editor then select the extraction and click Modify, then click the Evaluate XPath button. Doing so will displays the result of applying the XPath expression against the expected XML, letting you know if it is matching or not.

    If you are still seeing unexpected behavior then you may want to contact Parasoft support. The Data Bank and REST Client are definitely not broken in any way like this. Not sure what else you might be missing.

Sign In or Register to comment.