1 SE Day @ Rutgers 4/22/08 TAXI TAXI Systematic document generation from XML Schema Antonia Bertolino , Jinghua Gao, Eda Marchetti, Andrea Polini [email protected]Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo" (ISTI-CNR), Pisa
23
Embed
Systematic document generation from XML Schemaprolangs.cs.vt.edu/rutgers/meetings/seday2008/slides/Bertolino/slides.pdfSystematic document generation from XML Schema Antonia Bertolino,
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
1SE Day @ Rutgers 4/22/08TAXITAXI
Systematic document generation fromXML Schema
Antonia Bertolino, Jinghua Gao, Eda Marchetti, Andrea Polini
Information of the structure ofthe final instances Element: “minOccurs”, “maxOccurs” Attribute: “use”
preprocessorAnalyzeSpecifications
Identify Functional Units
Identify Sub-Schema Sets
Partition Categories
Identify Types
Selecte ChoicesPartition
Values and Structures
Determine Constraints
Determine “valid/invalid” Constraints
Generate Test Specification
Generate Intermediate
Instances
Generate Test Specification
Generate Final Instances
Mapping from CP to XPT
12SE Day @ Rutgers 4/22/08TAXITAXI
Constraints of“valid/invalid”
Two types of constraints canbe identified Valid: values in choices conform
to the specification of theXML Schema
Invalid: values in choices donot conform to the declarationof XML Schema.
preprocessorAnalyzeSpecifications
Identify Functional Units
Identify Sub-Schema Sets
Partition Categories
Identify Types
Selecte ChoicesPartition
Values and Structures
Determine Constraints
Determine “valid/invalid” Constraints
Generate Test Specification
Generate Intermediate
Instances
Generate Test Specification
Generate Final Instances
Mapping from CP to XPT
13SE Day @ Rutgers 4/22/08TAXITAXI
Example of “valid/invalid” contraints
Sequence:
The same sequence of element as the specification of XML Schema [Valid]
The sequence of element is differnt from the XML Schema specification [Invalid]
String:
Any strings confrom to the specification of XML Schema [Valid]
Any strings do not conform to the specification of XML schema. [Invalid]
Numeric:
Any digitals confrom to the specification of XML Schema [Valid]
Any digitals do not conform to the specification of XML schema. [Invalid]
Occurrence:
Occurrence value ∈ (-∞ , minOccurs) [Invalid]
Occurrrence value ∈ [minOccurs, maxOccurs] [Valid]
Occurrence value ∈ (maxOccurs, ∞) [Invalid]
14SE Day @ Rutgers 4/22/08TAXITAXI
Intermediate InstancesGenerate intermediate instance by combining the values of“minOccurs” and “maxOccurs”.
We apply the conventional Boundary Condition test approachto reduce the combinations
sub-Schema
minOccurs=0
maxOccurs=3
minOccurs=2
maxOccurs=4
A
B
Intermediate Instance
B occurs=2
Intermediate Instance
Intermediate Instance
Intermediate Instance
A occurs=0 A occurs=3
B occurs=2
A occurs=0
B occurs=4
A occurs=3
B occurs=4
preprocessorAnalyzeSpecifications
Identify Functional Units
Identify Sub-Schema Sets
Partition Categories
Identify Types
Selecte ChoicesPartition
Values and Structures
Determine Constraints
Determine “valid/invalid” Constraints
Generate Test Specification
Generate Intermediate
Instances
Generate Test Specification
Generate Final Instances
Mapping from CP to XPT
15SE Day @ Rutgers 4/22/08TAXITAXI
Instance Derivation
The set of final instancesis generated by giving theproper value to eachelement. The values are selected
from the choices accordingto the restrictionsexpressed in the XMLSchema.
preprocessorAnalyzeSpecifications
Identify Functional Units
Identify Sub-Schema Sets
Partition Categories
Identify Types
Selecte ChoicesPartition
Values and Structures
Determine Constraints
Determine “valid/invalid” Constraints
Generate Test Specification
Generate Intermediate
Instances
Generate Test Specification
Generate Final Instances
Mapping from CP to XPT
16SE Day @ Rutgers 4/22/08TAXITAXI
Instance Derivation(2)
The problem of CP method: Too manygenerations!
Our solution: Apply Pair-wise testing during the
occurrence generation Weighted Test Strategies
preprocessorAnalyzeSpecifications
Identify Functional Units
Identify Sub-Schema Sets
Partition Categories
Identify Types
Selecte ChoicesPartition
Values and Structures
Determine Constraints
Determine “valid/invalid” Constraints
Generate Test Specification
Generate Intermediate
Instances
Generate Test Specification
Generate Final Instances
Mapping from CP to XPT
17SE Day @ Rutgers 4/22/08TAXITAXI
Main Interface of TAXI
18SE Day @ Rutgers 4/22/08TAXITAXI
TAXI
The mapping from the CP to the XML Schema Partition Testinghas been partially implemented in a proof-of-concept tool calledTAXI : Testing by Automatically generated XML Instances
TAXI includes four components Schema Analyzer (XSA)
Expands and preprocesses the XML Schema, Prepares the intermediate instance frames Provides a set of final instances
Test Strategy Selector (TSS) Implements a set of test strategies. Manages the weight assignment for the elements in the
identified functional units Values Storage (VS)
Manages a database for occurrences and values assignment User Interface (UI)
19SE Day @ Rutgers 4/22/08TAXITAXI
Potential Applications
For validating database management systems automatically generate valid XML instances for populating
database in a systematic evaluate the performance and the quality of the associated
management systems For testing the inter-operability between applications and
for enabling the correct interactions among the interfacesused by remote components in distributed systems. Automatic and controlled generation of valid and invalid
instances enables the automated testing of I/O behavior For verifying the proper communication protocols between
web-services. SOAP-based interaction between services can be reconducted
to the corresponding XML Schemas
20SE Day @ Rutgers 4/22/08TAXITAXI
Black-box testing
21SE Day @ Rutgers 4/22/08TAXITAXI
100% automaticXSLT testing
22SE Day @ Rutgers 4/22/08TAXITAXI
Conclusions
TAXI tool can automatically derive a set ofinstances that systematically covers a XSD
It can be applied for interoperability validation,database benchmarking, black-box testing, …