DB Validation at Row Level
Hi Team,
I am reading DB with a query and the results I am storing in an XML data bank. Each Row will have 6 columns and one of which is a status column. I need to check for all rows if status column is a fixed value( say., 'S'). I created tests as enclosed. When i am trying to assert, the assertion doesn't shows the failure results at row level and it shows only at distinct Status fields. Please let me know how to get the assertion results at row level.
Answers
-
the assertion doesn't shows the failure results at row level
If the configured XPath matches all "CASHR_RQST_STAT_CD" elements then you should see a violation for each element that didn't match the expected value.
it shows only at distinct Status fields
By default, only distinct violations are reported. You can change this from Parasoft > Preferences > Misc > Duplicate Errors > Report each duplicate error.
0 -
Hi Benken, I didn't understand the XPath response you have given. Since the DB Query may result in a result set which will not be having same number of rows, I extracted the ROWS element and kept "All Child Nodes" Extract Content Only option. Could you help to explain bit more elaborately?
0 -
0
-
You were asking about the violations reported by your XML Assertor, correct? The "Selected Element" configuration in your XML Assertor contains an XPath that is used to match the nodes from your XML document. Since you are getting multiple violations then your XPath must have selected all "CASHR_RQST_STAT_CD" elements which is probably what you want if you are trying to validate that they all equal "APPR".
Concerning your XML Data Bank, what are you using that for? Do you have a specific question about it? It serves a different purpose than the XML Assertor. Both tools operate independent of one another.
1