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.

Iterate through the Database Data Source

Lostwords
Lostwords Posts: 2

Hi,

I am current attempting to use a Database Data source to verify result returning from the web service. I've created a simple test suite that included a Database Data Source (DDS) and a simple test. This test would include a XML Transformer and XML Assertor. The DDS contains a simple SQL that return 1 column with 3 rows of data. Below is a sample returned XML and the value I am interested in verifying is RECORD_ID.:

Below is the DDS which should return 3 rows of data:

I've verified using SQL developer that the sql is correct and the database does contains the data that are needed

Below is the XML Assertor that I've created:

Unfortunately right now it does not seem to iterate through the Database Data source(DDS). The test fails because it continuously use the first row of value that returned from the DDS. right now, the test run and the first test pass as it verified 200613 matched but it would fail the other two tests as it would fail:****

Error Message:
DataSource: DB - Test 2 (2007-01-01, 1, 2006) (row 1): RECORD_IDs: For element "../RECORD_ID",
expected: 200613 but was: 200646

Error Message:
DataSource: DB - Test 2 (2007-01-01, 1, 2006) (row 1): RECORD_IDs: For element "../RECORD_ID",

expected: 200613 but was: 200642

Is there a way for me to see the returned values from the Database Data source (to ensure that it is actually contain 3 rows of data)?

Any advises or suggestions are much appreciated

Comments