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


Please Help Members By Posting Answers For Below Questions

Explain the difference between datatable and dataset?

1423


How to send xml file on server using http protocol?

1077


How can I extract the formated word(bold,italic,underline,font,color etc) from the msword file.?

1108


How to retrieve images in sql server database through vb.net?

1043


What are the features of c# which are not present in vb.net?

1185


Explain an assembly?

1059


How to store images in sql server database through vb.net?

1024


What is option strict?

1214


What is early binding?

1016


What is the use of assembly?

1081


Explain the difference between system.string and system.stringbuilder classes?

1082


Explain how can we remove handlers at run time?

1077