105 Chapter 7 XML-Schema Based Testing Technique Today, XML (eXtensible Mark-up Language) is being accepted as an effective medium in data exchange over the web due to its modeling ability to support multiple inheritance and querying capabilities. With evolution of XML specification language, XML Schemas are convenient for definition of interface specifications, definition of data models, protocol specifications etc. Graphical user Interface (GUI) is by far the most popular means to interact with software. An important aspect in GUI testing is specification of system behavior and generation of test scripts. This research work is addressing the problem of testing GUI components through various techniques. The ultimate goal is to provide test manager with systematic methods to extract suitable test sequences for higher levels of testing. The XML schema based formalization approach presented here takes into account both dimensions of the testing problem; specification using XML-Schema is used both to drive the selection of tests and to identify interaction between system components to generate test sequences. 7.1 Motivation for XML Schema Based Testing The application of GUI technology in Component-Based software systems facilitates both the software development and the user operations. The task of testing is heavy and reduplicate, especially in case of regression testing. An important recent innovation for fostering interoperability has been the introduction of the eXtensible Markup Language (XML). It has established itself as the de facto standard form for specifying and exchanging data and documents between almost any digital or web applications. XML based stored procedures provide higher degree of independency between database server and the software components. Further, it supports existence of heterogeneous platforms and heterogeneous servers. Therefore, XML Schema
14
Embed
Chapter 7shodhganga.inflibnet.ac.in › bitstream › 10603 › 8030 › 17... · data. 7.2.1 XML Schema XML Schema describes the structure of an XML document. It supports data types
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
105
Chapter 7
XML-Schema Based Testing Technique
Today, XML (eXtensible Mark-up Language) is being accepted as an effective
medium in data exchange over the web due to its modeling ability to support multiple
inheritance and querying capabilities. With evolution of XML specification language,
XML Schemas are convenient for definition of interface specifications, definition of
data models, protocol specifications etc. Graphical user Interface (GUI) is by far the
most popular means to interact with software. An important aspect in GUI testing is
specification of system behavior and generation of test scripts.
This research work is addressing the problem of testing GUI components
through various techniques. The ultimate goal is to provide test manager with
systematic methods to extract suitable test sequences for higher levels of testing. The
XML schema based formalization approach presented here takes into account both
dimensions of the testing problem; specification using XML-Schema is used both to
drive the selection of tests and to identify interaction between system components to
generate test sequences.
7.1 Motivation for XML Schema Based Testing
The application of GUI technology in Component-Based software systems
facilitates both the software development and the user operations. The task of testing
is heavy and reduplicate, especially in case of regression testing. An important recent
innovation for fostering interoperability has been the introduction of the eXtensible
Markup Language (XML). It has established itself as the de facto standard form for
specifying and exchanging data and documents between almost any digital or web
applications. XML based stored procedures provide higher degree of independency
between database server and the software components. Further, it supports existence
of heterogeneous platforms and heterogeneous servers. Therefore, XML Schema
106
Based Testing approach has been adopted for describing input data in open and
standard form to automate test data generation.
An approach to automate generation of regression testing for GUI components
by incorporating XML based testing support has been projected with anticipation that
schema-based testing stands at a testing level above traditional code based testability.
For this, a Regression Testing engine has been designed. It incorporates Test case
checker to categorize the test suite and test case generator to generate regression test
suite for GUI component.
7.2 XML Specification Language
XML (extensible Markup Language) is derived from SGML (Standard
Generalized Markup Language). It is frequently used for data representation and
interchange in Web-based applications. Being semantic oriented, it increases the
expression ability of information semantic. Most of the data appearing on Internet is
organized by XML. With evolution of XML specification language, XML Schema
(XSD) evolved, which is currently the standard for specification of XML documents
structure. XML
Schemas and corresponding XML documents are becoming the most
important software artifacts and act as foundation for web services. Thus, XML
schema plays an important role in describing XML documents. In most cases, the
XML documents must conform to a schema that defines the type of data that is
accepted by a Web application. Therefore, an error in the schema or in XML
document can lead to failures in the application. At present, the main challenge
existing in XML is appropriate testing approach and criteria to ensure the reliability of
data.
7.2.1 XML Schema
XML Schema describes the structure of an XML document. It supports data
types and namespaces, whereby a namespace is a collection of names identified by
URL references. XML Schema based Test specifications are defined in an
unambiguous, standardized notation which makes them easier to understand and
document. The test process involves generating XML documents with some
modifications with respect to the original XML document and using queries to these
107
documents to validate the schema. XML Schema offers numerous advantages in terms
of Stronger and Extensible Data Typing, better content modeling, and interoperability.
The XML documents and queries are generated according to a set of fault
classes defined for the XML schema. Sample XML document is represented in Figure
7.1 and sample XML Schema is shown in Figure 7.2 respectively. The XML
documents and queries are generated according to a set of fault classes defined for the
XML schema. XML schema embodies the following:
• Defines elements and attributes that can appear in a document.
• Defines which elements are child elements.
• Defines the number and order of child elements.
• Defines whether an element is empty or can include text.