adspace
How do you script this scenario in QTP using VB?
Verify XML attributes in XML message against XSD and data
mapping of fields to Oracle tables? Verify data in XML to
data in a defined table?
Answer Posted / Akhtar Israr Ahmad
To verify XML attributes against an XSD schema, map XML fields to Oracle tables, and compare XML data with Oracle table data using QTP (QuickTest Professional) in VBScript, you can follow these steps:
1. Parse the XML response using Microsoft's MSXML or QTP's built-in XML functions like DOMDocumentLoad() or XMLFileToDOM().
2. Validate the parsed XML against an XSD schema by calling the MSXML function `Validate()`. This will generate a list of validation errors, if any.
3. Map the XML fields to Oracle tables using QTP's Data Table and Data Source objects. Assign the appropriate data source to the corresponding XML nodes.
4. Read data from the defined Oracle table using ADO (ActiveX Data Objects) functions like `Recordset.Open()` or `Connection.Execute()`.
5. Compare the extracted XML field values with the corresponding values from the Oracle table using QTP's built-in comparison functions, such as Assert.Equal(), Assert.IsTrue(), or custom comparison functions if needed.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the difference between datatable and dataset?
How to send xml file on server using http protocol?
How can I extract the formated word(bold,italic,underline,font,color etc) from the msword file.?
How to retrieve images in sql server database through vb.net?
What are the features of c# which are not present in vb.net?
Explain an assembly?
How to store images in sql server database through vb.net?
What is option strict?
What is early binding?
What is the use of assembly?
Explain the difference between system.string and system.stringbuilder classes?
Explain how can we remove handlers at run time?