Home
Test Data Generation Tool - User Manual -
Contents
1. The element to be affected in form of an Xpath expression relative to the parent element specified in the surrounding lt testLocation gt complexErrorType optional Is evaluated only for testT ype invalid and specifies the type of error to generate Possible values are e minOccurs the number of occurrences of this complex type is less than allowed e maxOccurs the number of occurrences of this complex type is larger than allowed e composition the composition of the structure is violated e g wrong element in sequence not element of choice missing element of el Subelements none 2 8 lt testCondition gt Element Description The lt testCondition gt element is used to test for specific conditions identified by the conditions ID for a specific location specified by the surrounding lt testLocation gt element The full functionality for this test instruction is not yet implemented Multiplicity Occurs once in the lt testLocation gt element 1 Attributes Attribute Usage Default Description Value conditionID required This attribute holds the unique ID of the targeted condition The ID must be one that is defined in the application profile testType optional valid Specifies whether this condition should be satisfied or not Allowed values are valid The premise of this condition should be true and all preceding p
2. ct testCase gt lt xs sequence gt lt xs element name testLocation type ti ct testLocation global minOccurs 0 maxOccurs unbounded gt lt xs element name testAddConstraint type ti ct testAddConstraint minOccurs 0 maxOccurs unbounded gt lt xs sequence gt lt xs attribute name tcID type xs token gt lt xs attribute name root type xs QName use required gt lt xs complexType gt lt xs complexType name ct testLocation local gt lt xs sequence gt lt xs element name testLocation type ti ct testLocation local minOccurs 0 maxOccurs unbounded gt lt xs group ref ti grp testInstructions minOccurs 0 maxOccurs unbounded gt lt xs sequence gt lt xs attribute name location type xs token use required gt lt xs complexType gt lt xs complexType name ct testLocation global gt lt xs complexContent gt lt xs extension base ti ct testLocation local gt lt xs attribute name baseSchema type xs anyURI use required gt lt xs extension gt lt xs complexContent gt lt xs complexType gt lt xs complexType name ct testSimpleType gt lt xs complexContent gt lt xs extension base ti ct testInstruction gt lt xs sequence gt lt xs element name testFacet type ti ct testFacet minOccurs 0 maxOccurs unbounded gt lt xs sequence gt lt xs attribute name constraint type xs token gt lt xs attribute name property gt lt xs simpleType gt lt xs re
3. will try to violate all given facets and not violate any other facets Multiplicity Occurs zero or many time 0 Attributes Attribute Usage Default Value Description facetName required Specifies the facet to be affected Possible values are length minLength maxLength pattern enumeration whiteSpace maxlnclusive maxExclusive woot mininclusive minExclusive totalDigits fractionDigits Subelements none 2 7 lt testStructure gt Element Description The lt testStructure gt elements specify how to affect the structure of the document to be generated They do not affect the values of the document instance The surrounding lt testLocation gt element must point to the parent of the complexType to be affected while the complexType itself is defined in the attribute subelement of the lt testStructure gt element itself Multiplicity Occurs one or more time in the lt testSet gt element 1 Attributes Attribute Usage Default Value Description testT ype required Defines how this element should be affected Possible values are e valid Generate a valid structure for this complexType e invalid Generate an invalid structure details are specified in attribute complexErrorType e specific Allows the tester to enter a raw XML fragment at the position of this element subelement required
4. ata to the system and verifying that the data is processed correctly The system being tested should accept all conformant data and detect non conformant data The conformant data should be handled correctly that is the output should be as expected while the non conformant data should not affect the system stability and maybe the system should be able to recover and proceed for minor errors in the data To be able to verify some of the system s quality characteristics like correctness reliability and robustness it is necessary to have the appropriate test data at hand Often existing data is not available at the time of system testing an even if real data is available it might not be adequate for the testing purposes As a result of this fact the tester in charge is often forced to write at least some test data that is specific for his testing needs Writing this test data can be very time consuming and expensive as generally includes some amount of overhead work In case of XML documents the tester might just want to test for specific element at a certain position to be handled correctly but still has to write a complete XML document so that the element to be tested conformant or non conformant is located inside an otherwise valid XML structure The DataGen tool is written for this specific case to reduce the effort of the tester and let him concentrate on the actual work of selecting the right test cases The tester picks a specific elemen
5. ema file It is required only for the top level lt testLocation gt Subelements e testLocation e testInstruction a element group containing o testSimpleType o testStructure o testCondition 2 4 lt testInstructions gt Group Description The lt testInstructions gt element is used as a placeholder for the implemented categories of test instructions In the test instructions XML file this tag will never appear the file will rather have one of the following element types in this position e testSimpleType e testStructure e testCondition 2 5 lt testSimpleType gt Element Description The lt testSimpleType gt element defines what kind of XML simple type value should be generated for the simple type element defined in the surrounding lt testLocation gt element DataGen will then generate a document instance that contains at least one occurrence of this element in the given form The effect applied to the simple type value is defined by the attributes Multiplicity Occurs once in the innermost lt testLocation gt element 1 Attributes Attribute Usage Default Value Description testType required valid Defines whether the generated simple type value should be conformant or non conformant Allowed values are valid or invalid property optional Defines which property of the simple type is affected Possible values e primitive o For testType invalid violate the pri
6. gef VW telcert Technology Enhanced Learning Conformance European Requirements amp Testing Test Data Generation Tool User Manual Hans Christian Herrmann Institut f r Wissensmedien University Koblenz Landau Version 1 0 Draft 1 8 April 2005 1 INTRODUCTION sisscsssssssascssacscscssvesascsssasaasiacaisssiaessaseiavasassiavniasesasaiassiaeaiassiaaaiasseaediassersansereneauasieseeeaeess 2 2 WRITING THE TEST INSTRUCTIONS cccccssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssses 3 2 1 lt TESTSET gt ROOT ELEMENT jacssissicsesiovisivsdeelsssivesigined EEEE EONAR EET EON sue EE EE 3 2 2 lt TEST CASE ELEMENT reae oneri erer EN ETEO EENEN EET ON EEEN EE Or EEAO ENIE O asain 3 2 3 lt TESTLOCATION gt ELEMENT teren 4 2 4 lt TESTINSTRUCTIONS gt GROUP 5 2 5 lt TESTSIMPLETYPE gt PLEMENT sirernierorecn erener AEO O E OOE Or E EREE En EEN EE 5 2 6 lt TESIFACET A ELEMEN T ea eer A T E 6 2 7 ATESTSTRUCTURE gt ELEMENT orsi d aT TA EREE A TT TRE A A TT ERT a 7 2 8 lt TESTCONDITION gt ELEMENT 000 000s0ssssseeeeseeeeeeeeeeseeeseseesseseesesesseeeeseeessseeeseseseeseeseeeeeessseeseseeeeseees 8 3 DATA GENERATION PROCESS ccsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssees 9 3 1 COMMAND LINE PARAMETERS eenegen 9 3 2 LOGGING EE 9 3 3 DATAGEN OUTPUT Toroa a 9 1 Introduction Testing a software system always include the task of feeding test d
7. he bug report Note The log file is overwritten with every start of DataGen So please make a copy of the log file if a specific log seems relevant for you 3 3 DataGen Output The output of DataGen is in form of an IMS content package This content package contains the generated documents that can be identified by the ID in the filename as given in the test instructions Additionally a diagnostics document is generated with information on that file The exact format of the test package will be documented in the next release of this document Appendix XML Schema for Test Instructions Note This XML schema is also available online at http iwm uni koblenz de xsd tel_testv1p0 xsd lt xml version 1 0 encoding iso 8859 1 gt lt filename tel_testv1p0 xsd gt lt xs schema xmins ti http iwm uni koblenz de xsd tel_testv1p0 xmlns xs http Awww w3 org 200 1 XMLSchema targetNamespace http iwm uni koblenz de xsd tel_testv1p0 elementFormDefault qualified version TELCERT TEST INSTRUCTIONS 1 0 gt lt xs element name testSet type ti ct testSet gt lt xs key name testCase_id gt lt xs selector xpath ti testCase gt lt xs field xpath tcID gt lt xs key gt lt xs keyref name cnd_ref refer ti testCase_id gt lt xs selector xpath gt lt xs field xpath ti refTC gt lt xs keyref gt lt xs element gt lt xs attribute name create gt lt xs simpleType gt lt xs restriction ba
8. mitive Type of the simpleType e g use value abc for a primitive type decimal o For testType valid irrelevant e Value facet o For testType invalid violate the facets of the simple type but not the primitive type o For testType valid use a value that is valid but on the boundaries of the simple type s value range constraint optional If this attribute is used it will be handled with highest priority When conflicting with other attributes this can result even in overriding the other attribute s settings The value is a string consisting of an Xpath expression that evaluates to a Boolean value and constrains the values to be used The expression is made up of the placeholder value a Boolean operator gt and or anda number or string Examples Constraint value male Constraint value gt 42 Subelements e testFacet 2 6 lt testFacet gt Element Description This subelement of lt testSimpleType gt defines the facets of the simple type that should be affected It is only useful in combination with the surrounding lt testSimpleType gt element that has the attribute values lt testSimpleType testType invalid property facet gt lt testFacet facetName gt lt testSimpleType gt More than one lt testFacet gt subelement is allowed for lt testSimpleType gt DataGen
9. ption tclD required A unique ID for this test case root required The root element of the application profile to be used Many specifications allow more than one root element Choosing a random root element does not seem convenient for structured testing Subelements e testLocation e testAddConstraint 2 3 lt testLocation gt Element Description The lt testLocation gt element defines a position in the derived base schema This position is given in Form of an Xpath expression The specified position is affected by the test instructions enclosed as subelement of the lt testLocation gt lt testLocation gt elements can be nested This is necessary if elements are referenced in schemas and element within the reference should be addressed Test instructions always refer to the innermost lt testLocation gt element Please note that although the data generation process is based on the application profile given in the respective lt testSet gt attribute this profile is internally transformed into a derived schema using the Schema Transform Tool developed by Apple The further data generation process work on the derived schema Multiplicity Occurs one or more time in the lt testSet gt element 1 Attributes Attribute Usage Default Value Description location required The location of the element to be affected baseSchema required Contains the location of the used XML sch
10. remises of other modifications should be false invalid The premise of this condition should be false and all preceding premises of other modifications should be false Subelements none A Data Generation Process 3 1 Command Line Parameters DataGen is invoked from the command line with the following parameters gt java jar DataGen jar myTestInstructions xml D Output Java This is the java executable of your local Sun Java installation jar This parameter is needed by the java executable to recognize the format of the DataGen jar DataGen jar This parameter specified the file name of the DataGen JAR file You may have to set the correct file name e g DataGen snapshot jar or DataGen 0 1 jar myTestInstructions xml This parameter specifies the file name of the XML file containing the test instructions that should be processed D Output This Parameter specifies a directory that will be used by DataGen as output directory In this directory the files and directory structure of the test package will be generated Please verify that the DataGen process has write access to this directory 3 2 Logging DataGen will write all logging output to the console and additionally write it to the log file DataGen log If case of any errors or unusual behaviour of DataGen please have a look at the log messages When reporting a bug to the developers it might be useful to include the log file to t
11. se xs string gt lt xs enumeration value auto gt lt xs enumeration value testCase gt lt xs restriction gt lt xs simpleType gt lt xs attribute gt lt xs attribute name refT C type xs token gt lt xs attributeGroup name attrGrp structure gt lt xs attribute ref ti create gt lt xs attribute ref ti refTC gt lt xs attributeGroup gt lt xs group name grp testInstructions gt lt xs choice gt lt xs element name testSimpleType type ti ct testSimpleType gt lt xs element name testStructure type ti ct testStructure gt lt xs element name testCondition type ti ct testCondition gt lt xs choice gt lt xs group gt lt xs complexType name ct testInstruction gt lt xs attribute name testType use lt xs simpleType gt lt xs restriction base xs string gt lt xs enumeration value valid gt lt xs enumeration value invalid gt lt xs restriction gt lt xs simpleType gt lt xs attribute gt lt xs complexType gt lt xs complexType name ct testSet gt lt xs sequence minOccurs 0 maxOccurs unbounded gt lt xs element name testCase type ti ct testCase gt lt xs sequence gt lt xs attribute name applicationProfile type xs anyURI gt required gt lt xs attribute name constraintDefinitions gt lt xs simpleType gt lt xs list itemType xs anyURI gt lt xs simpleType gt lt xs attribute gt lt xs complexType gt lt xs complexType name
12. striction base xs string gt lt xs enumeration value facet gt lt xs enumeration value primitive gt lt xs restriction gt lt xs simpleType gt lt xs attribute gt lt xs extension gt lt xs complexContent gt lt xs complexType gt lt xs complexType name ct testFacet gt lt xs attribute name facetName use required gt lt xs simpleType gt lt xs restriction base xs string gt lt xs enumeration value length gt lt xs enumeration value minLength gt lt xs enumeration value maxLength gt lt xs enumeration value pattern gt lt xs enumeration value enumeration gt lt xs enumeration value whiteSpace gt lt xs enumeration value maxInclusive gt lt xs enumeration value maxExclusive gt lt xs enumeration value minInclusive gt lt xs enumeration value minExclusive gt lt xs enumeration value totalDigits gt lt xs enumeration value fractionDigits gt lt xs restriction gt lt xs simpleType gt lt xs attribute gt lt xs complexType gt lt xs complexType name ct testStructure gt lt xs complexContent gt lt xs extension base ti ct testInstruction gt lt xs sequence gt lt xs any namespace other processContents skip minOccurs 0 gt lt xs sequence gt lt xs attribute name subelement type xs token use required gt lt xs attribute name complexErrorType gt lt xs simpleType gt lt xs restriction base xs string gt lt xs enumera
13. t of the application profile that he wants to run tests on and specifies the type of testing he want to perform i e whether this element should be valid or invalid and what type error should be included With this information the DataGen tool will generate a set of XML documents and deliver them in form of an IMS content package Please note that DataGen only supports the tester by generating test data as specified DataGen is not able to select the correct test data itself like picking critical element that should be tested This remains in the responsibility of the tester http www imsglobal org content packaging index html 2 Writing the Test Instructions Before the actual process of test data generation with DataGen can be started the tester must provide the test instructions in form of an XML file This Test Instructions XML file must currently be written with an XML editor or text editor The DataGen tool does not have a GUI or other sort of input possibility It is currently provided as a command line tool and might be embedded in future into other tools to provide a better and more user friendly user interface 2 1 lt TestSet gt Root Element Description The only allowed root element of all test instructions is lt testSet gt It has several attribute that constitute the general setting for the test data generation process The XML namespaces used are also defined here Multiplicity Occurs exactly once in each XML
14. test instructions file 1 Attributes Attribute Usage Default Value Description applicationProfile required The application profile that is the basis for this data generation process constraintDefinitions Optional Namespaces The following namespaces are required e xmins http iwm uni koblenz de xsd tel_testv1p0 The default namespace for the test instructions required e xmins ti http iwm uni koblenz de xsd tel_testv1p0 Unique namespace prefix for test instructions required e xmins xsi http www w3 org 2001 XMLSchema instance W3C XML schema instance namespace definition required e xsi schemaLocation http iwm uni koblenz de xsd tel_testv1p0 xsd tel_testv1p0 xsd Defines the local instance of the XML schema file required e xmins xs http www w3 org 2001 XMLSchema W3C namespace for XML schema required e xmins cp http www imsglobal org xsd imscp_v1p1 Namespace of the IMS Content packaging specification Subelements e testCase 2 2 lt TestCase gt Element Description The lt testCase gt element contains the information required to create one XML document instance Each correctly specified lt testCase gt element will result in one XML document instance If not the lt testCase gt could not be processed Multiplicity Occurs zero or more time in the lt testSet gt element 0 Attributes Attribute Usage Default Value Descri
15. tion value minOccurs gt lt xs enumeration value maxOccurs gt lt xs enumeration value composition gt lt xs restriction gt lt xs simpleType gt lt xs attribute gt lt xs extension gt lt xs complexContent gt lt xs complexType gt lt xs complexType name ct testCondition gt lt xs complexContent gt lt xs extension base ti ct testInstruction gt lt xs attribute name conditionID type xs NCName gt lt xs extension gt lt xs complexContent gt lt xs complexType gt lt xs complexType name ct testAddConstraint gt lt xs complexContent gt lt xs extension base ti ct testInstruction gt lt xs attribute name namespace type xs token use lt xs attribute name constraint type xs token use lt xs attribute name definition type xs token use lt xs extension gt lt the namespace that the tested added file is connected to gt lt the constraintID of the tested constraint gt lt the tested definition gt lt xs complexContent gt lt xs complexType gt lt xs schema gt required gt required gt optional gt
Download Pdf Manuals
Related Search
Related Contents
Visual MODFLOW Premium SB-99Ci SB-99Ci Tourisme & Handicap en Touraine MODE D`EMPLOI Fujitsu S26391-F841-L100 Installation and Users Guide FCDR-05統計データ取得ソフトインストール説明書(130205) Copyright © All rights reserved.
Failed to retrieve file