document style. The last work provides automatically
derivation of data instances from WSDL descriptions.
The proposed software tool has some limitations
related to the processing of XML elements and
generation of invalid data needed for negative testing.
In this direction, we propose an approach for
instantiation of XML documents from XML Schema.
The approach leverage the potential of XML Schema
in describing input data in standardized manner. In
addition it is realized as a software tool for automated
generation of test inputs for single web services as
well as web service orchestrations, described with
WS-BPEL. The tool is integrated in a framework,
named Testing as a Service Software Architecture –
TASSA (Pavlov, Borisov, Ilieva & Petrova-
Antonova, 2010). The main goal of TASSA is to
support the testing of web service compositions at
design time.
The paper is structured as follows. In the next
section the current software tools for XML Schema-
based test data generation are analyzed. Section 3
describes an approach for XML Schema-based test
data generation. Section 4 presents a proof-of-concept
of the proposed approach through sample usage
scenarios. Conclusions are drawn in Section 5.
2 RELATED WORK
The goal of the proposed approach is to automate test
data generation while performing testing of WSDL-
based web services and web service orchestrations,
described with WS-BPEL. That is why software tools
that provide similar functionality are investigated and
compared.
XML Editor (Eclipse.org) is an open source Java
plugin for Eclipse that supports a single XML
instance generation from an XML Schema. It
generates the structure of an XML document and
could fill some dummy values, but actually is
designed with presumption that the user will fill them.
XML Spear (Donkeydevelopment.com) is a free
XML editor written in Java that generates an XML
file from an XSD file. It is possible to configure some
properties for the generated structure of the XML, but
the values should be filled manually. XML-XIG is an
open source Java application, presented by Simon
Tuffs (2004) that produces more than one XML
instance form a single schema and automatically
generates values, based on an XIG meta-data file.
CAMed proposed by Sorens (2009) is an XML editor
implemented as an open source Java application that
also produces more than one XML instance from an
XSL Schema. In a template file a variety of
configurations could be done including schema
structure and values specification. WS-TAXI
(Bartolini, Bertolino, Marchetti & Polini, 2009) is a
free Web service, for derivation of XML instances
from XML schema. It implements a category
partitioning for the <choice> elements. The generated
XML instances can be populated with random values
or values loaded from a file. XMLBeans (Apache.org)
is an Apache licensed set of Java classes and console
tools, some of which support XML instantiation from
XML Schema and validation according to that
schema. DataGen tool, presented by Herrmann
(2005) is an open source Java application that
produces test cases in a XML format from an XML
Schema. It provides a lot of functions especially for
negative testing configured in an instruction file. The
XML values could be randomly generated or
predefined. Databene Benerator, described by Frank,
Crescenzio and Chavez is a Java written tool for
generation of XML instances from XSD Schema. It
handles very well the generation of values, but has
some disadvantages on building of the XML
structure. Table 1 shows a comparison of the tools
according to the following characteristics:
1) Extraction of XSD Schema from file – WSDL,
BPEL, etc.;
2) Processing more than one root element;
3) Processing optional elements;
4) Processing optional attributes;
5) Processing choice elements;
6) Processing repeating elements;
7) Validation of XML files;
8) Automatic generation of valid data;
9) Automatic generation of invalid data;
10) Loading data from an external source.
Table 1: Tools for test data generation from XML Schema.
Tool 1) 2) 3) 4) 5) 6) 7) 8) 9) 10)
XML Editor √ √ √ √ √ √
XMLSpear √ √ √ √ √
XML-XIG √ √ √
CAMed √ √ √ √ √ √ √ √ √
WS-TAXI √ √ √ √ √
XMLBeans √ √
DataGen √ √ √ √
Benerator √ √ √ √
As can be seen from the Table 1, the current
software tools work only with *.xsd files and do not
support extraction of XML schema from external
sources, where it is referenced or embedded. Only
two of them, namely CAMed and DataGen, provide
generation of XML instances with incorrect data. In
addition, specific XML schema elements and
attributes are not handled by tools such as WS-TAXI,
ICSOFT-EA2015-10thInternationalConferenceonSoftwareEngineeringandApplications
278