Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

XML Testing

This is a discussion on XML Testing within the Web Testing forums, part of the Software Testing category; Can any one tell me about XML testing. How it is done? Where I can find more information about how it is done etc.,...

Go Back   Geeks Talk > Software Testing > Web Testing
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

Web Testing Web Testing

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-18-2008
Junior Member
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
apabbati is on a distinguished road
XML Testing

Can any one tell me about XML testing. How it is done? Where I can find more information about how it is done etc.,
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-22-2008
Expert Member
 
Join Date: Oct 2007
Location: Mumbai
Posts: 354
Thanks: 4
Thanked 58 Times in 47 Posts
bizzzzzare will become famous soon enough
Re: XML Testing

Hi Apabbati,

XML testing can be under 2 scenarios.
1) Validating the Structure of XML.
2) Comparing Nodes and Properties.
3) Comparing XML file against a Standard XML format to find differences.

Validating the Structure of XML.

Sometimes the AUT would return result-sets in XML formats. Meaning as an output of any operation carried out in the application, an XML fiel could be generated.
As part of testing we would need to validate the Structure of the XML in terms of Parent - Children nodes. We would also need to ascertain Node properties and Attributes.

Comparing Nodes and Properties.

Testing scope in this would involve extracting Specified Nodes and their Attribute values and checking whether valid data was actually posted in these.

Comparing XML file against a Standard XML format to find differences.

In the above scenario, XML files from 2 environments would be compared. It should not be a textual comparision, as it would be ineffective. It would be Node based comparision where Every Parent node would be compared in terms of Child Nodes, attributes etc.
Overall structure of both XML's would be compared.

Testing Methodology.

XML testing could be carried out manually incase the number of XML results / files is very less. Say 1 or 2 but comparing larger number of XML files would be difficult.

We genreally use automated code to perform the same. We could use something on following lines. Please NOTE this is a sample code only.

set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("C:\Google.xml")

for each x in xmlDoc.documentElement.childNodes
msgbox(x.nodename) & ":" & (x.text)
next


The above code would iterate through the XML file and return all asoociated ChildNode names.

Cheers...
__________________
Regards,

V.Umesh Krishnan
QA Consultant
Reply With Quote
  #3 (permalink)  
Old 02-18-2008
Banned
 
Join Date: Oct 2007
Location: Hyderabad
Posts: 176
Thanks: 2
Thanked 13 Times in 13 Posts
quality_quantity is on a distinguished road
Re: XML Testing

XmlTestSuite provides a powerful way to test web applications.

Check site structure:
HTML pages are well formed and links are valid

Check the content of pages
Use Javascript variables, XPath expressions, database queries

Check the way the site works:
Run test scanarios, written in XML
The main aims of XmlTestSuite are

Tests are written in XML
Allows use of syntax checking XML editors.
We use the excellent free editor jEdit.


Tests scripts are robust to changes in the application
Using xpath expressions you can check the important parts of the HTML and ignore the decoration


Writing tests requires only a knowledge of HTML and XML
We wanted XmlTestSuite to be adopted by testers, business analysts,
and web developers who don't have a java background.
(advanced usage may require use of simple xpath expressions.
See the dtd manual for some examples).


Testing encompasses all parts of the system including the database and file system.
XmlTestSuite can verify that certain tables are updated when a certain page is submitted.
After the tests have been completed it can suggest the sql necessary to clean up the database.
It can also perform xpath evaluations on local files.


Test environment is easily extended (see the Api for details)
New test classes can be added by including them in the java classpath
New resources for test classes can be added almost as easily


Enables test driven development
We have used XmlTestSuite to develop tests for existing applications.
We have also used it for new applications, where the tests form part of
the specifications, and are used during the development phase.


Enables functional testing


Full compatibility with junit
This allows the use of the standard junit test runner applications.
Developers can use it with IDE frameworks (jEdit, Eclipse)

Please read the installation notes and the introduction for further details.

Changes in version 1.2

Addition of a domain tag which maps a domain name to an ip address, bypassing the normal DNS lookup for the specified name. Useful when testing in a web farm environment or on a laptop.

Changes in version 1.1

Support for javascript variables and expressions.
Uses the latest version of Httpunit, which uses a faster parser, which is also more tollerant of non-standard Html constructs.
Allows multiple tests scripts in a dorectory to be run by supplying a directory name
New tag to define the browser attributes, including window size.
New

All times are GMT -4. The time now is 03:28 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved