testing xml pallavi patwa cste,istqb (foundation)

17
Testing XML Testing XML Pallavi Patwa Pallavi Patwa CSTE,ISTQB (Foundation) CSTE,ISTQB (Foundation)

Upload: emery-hall

Post on 11-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

Testing XML Testing XML

Pallavi Patwa Pallavi Patwa

CSTE,ISTQB (Foundation)CSTE,ISTQB (Foundation)

Page 2: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

AgendaAgenda

About Checking XMLAbout Checking XML XML Verifications & ValidationsXML Verifications & Validations Tools availableTools available Use of ToolsUse of Tools

Page 3: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

About Checking XMLAbout Checking XML

XML files contain text with simple tags that XML files contain text with simple tags that describe the data within an XML documentdescribe the data within an XML document..

Testing of XML can be done by verifying Testing of XML can be done by verifying data content of XML filesdata content of XML files

A few common XML verifications & A few common XML verifications & validations are described as follows validations are described as follows

Page 4: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

SchemaSchema ValidationValidation

XML Elements XML Elements VerificationVerification

DTD DTD ValidationValidation

XML Data XML Data VerificationVerification

XML XML VerificationsVerifications

&&ValidationsValidations

Page 5: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

XML Data VerificationXML Data Verification

An XML file can be a static data file that is An XML file can be a static data file that is accessed in order to retrieve commonly used accessed in order to retrieve commonly used data for which a quick response time is data for which a quick response time is needed needed

• for example, country names, zip codes, or area codes. for example, country names, zip codes, or area codes.

Although this data can change over time, it Although this data can change over time, it is normally quite static. is normally quite static.

( Cont..)( Cont..)

Page 6: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

XML Data Verification XML Data Verification (cont..)(cont..)

You can test an XML file by verifying that You can test an XML file by verifying that the data has not changed from one the data has not changed from one application release to another.application release to another.

Page 7: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

XML Elements VerificationXML Elements Verification

An XML file can consist of elements with An XML file can consist of elements with attributes and values (character data).attributes and values (character data).

There is a parent and child relationship There is a parent and child relationship between the elements, and elements can between the elements, and elements can have attributes associated with them.have attributes associated with them.

( Cont..)( Cont..)

Page 8: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

XML Elements Verification XML Elements Verification (cont..)(cont..)

If any part of this structure (including If any part of this structure (including data) changes, your application’s ability to data) changes, your application’s ability to process the XML file may be affected.process the XML file may be affected.

For an XML testing, you can verify the For an XML testing, you can verify the

content of an element to make sure that content of an element to make sure that its tags, attributes, and values have not its tags, attributes, and values have not changed.changed.

Page 9: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

DTD ValidationsDTD Validations

XML files are often an intermediary that XML files are often an intermediary that retrieves dynamically changing data from retrieves dynamically changing data from one system. one system.

The data is then accessed by another The data is then accessed by another system using Document Type Definitions system using Document Type Definitions (DTD), enabling the accessing system to (DTD), enabling the accessing system to read and display the information in the file.read and display the information in the file.

( Cont..)( Cont..)

Page 10: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

DTD Validation DTD Validation (cont..)(cont..)

You can parameterize the XML data values You can parameterize the XML data values in order to check an XML document or file in order to check an XML document or file whose data changes in a predictable way.whose data changes in a predictable way.

Page 11: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

Schema ValidationSchema Validation

XML documents and files often need a well-XML documents and files often need a well-defined structure in order to be portable defined structure in order to be portable across platforms and development systems. across platforms and development systems.

One way to accomplish this is by One way to accomplish this is by developing an XML schema, which developing an XML schema, which describes the structure of the XML elements describes the structure of the XML elements and data typesand data types..

( Cont..)( Cont..)

Page 12: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

Schema ValidationSchema Validation (cont..)(cont..)

You can validate schema to passing You can validate schema to passing negative & positive data in XML file to negative & positive data in XML file to check that each item of content in an XML check that each item of content in an XML file adheres to the schema description of file adheres to the schema description of the element in which the content is to be the element in which the content is to be placed. placed.

Page 13: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

Automation of XML checkingAutomation of XML checking

Following tools are available to automate Following tools are available to automate XML testingXML testing Mercury interactive Quick Test ProMercury interactive Quick Test Pro Segue Silk TestSegue Silk Test

Page 14: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

Use of Tools (QTP)Use of Tools (QTP)

QTP supports automation of XML file by way QTP supports automation of XML file by way of of

XML Web Page/Frame Checkpoint:- XML Web Page/Frame Checkpoint:- Checks an XML document within a Web Checks an XML document within a Web page or frame. page or frame.

File Checkpoint :- File Checkpoint :- Checks a specified Checks a specified XML file. XML file.

Page 15: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

Use of Tools (QTP)Use of Tools (QTP)

Apart from checking ,Apart from checking , element(s), element(s), attribute(s), and/or value(s) that you want attribute(s), and/or value(s) that you want to check.to check.

QTP also helps toQTP also helps to check that the XML check that the XML structure adheres to a specific XML structure adheres to a specific XML schema, by schema, by Activate Schema Activate Schema Validation feature Validation feature

Page 16: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

Use of Tools (Silk Test)Use of Tools (Silk Test)

To test XML with help of Silk testTo test XML with help of Silk test XMLParserClass is availableXMLParserClass is available

Page 17: Testing XML Pallavi Patwa CSTE,ISTQB (Foundation)

Thank You !!Thank You !!