1 / 31

XML Integration Testing

OBST. XMLT. XML Integration Testing. XML Portals connect distributed Components Composition of a Component Component Integration Testing Web-based Test Environment XML Testbed XML Document Type Defintion Structure of an XML Interface XML Connectors XML Data Tree

eman
Télécharger la présentation

XML Integration Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OBST XMLT XML Integration Testing XML Portals connect distributed Components Composition of a Component Component Integration Testing Web-based Test Environment XML Testbed XML Document Type Defintion Structure of an XML Interface XML Connectors XML Data Tree A Letter as a Data interchange Protocol Development of an XML Interface Interface Test Cycle Sample Order Entry Interfaces Object Structure of an Order Entry System Data Structure of an Order Order Test Procedure DTD for an Order XML Document for an Order Order Test Data Customer Test Procedure Customer Test Data Article Test Procedure Article Test Data Invoice Test Procedure DTD for an Invoice XML Document for an invoice Sample Invoice Summary 1 15 2 16 3 17 4 18 5 19 6 20 7 21 8 22 23 9 10 24 25 11 26 12 27 13 28 14

  2. OBST XMLT-1 XML Portals connect distributed Components -------------- -------------- -------------- Data Data Data Data Data Data Data Component Component Component Component Component Component Component Component Data exchange in Form of XML Documents

  3. OBST XMLT-2 Composition of a Component -------------- XML Input Documents XML Reader Class Gui Classes XML Writer Class XML Output Documents Import Classes Processing Classes Export Classes 1 1 Access Class Access Class Persistent Objects

  4. OBST XMLT-3 Component Integration Testing Predecessor Component Component under Test (CUT) XML Import Component XML Export Testdata aregenerated oredited or replayedfrom a previous test Test Results are scanned or validated or recorded for future use Successor Component Testing the Interfaces between distributed Components

  5. OBST XMLT-4 Web-based Test Environment HTML HTML Front End Back End Test Work Station Web Work Station XML Generator XML Validator Client Compo- nents XML Documents MessageQueue XML Documents Server Compo- nents XML Documents SOAPMQ-Series Database

  6. OBST XMLT-5 XML Testbed Component Interface Interface Base Class Sub Class Sub Class 1 * Test data Generator Expected Results Validator Validation Report XML Instances XML Comparison XML Document XML Document Import Export Test data Generator Database Validator Validation Report SQL SQL

  7. OBST XMLT-6 XML Document Type Defintion XML Declaration Stylesheet Reference Stylesheet (XSL, CSS) Prolog? DOCTYPE_Declaration [Reference to external DTD Subset] [internal DTD Subset] external DTD_Subset XML-Daten<Entity> <Attributes></Entity><Entity> <Attributes></Entity><Entity> <Attributes></Entity> external Data (Entity) XMLDocument validInstance+ external Data (Entity) external Data (Entity)

  8. OBST XMLT-7 Structure of an XML Interface <!DOCTYPE name [ <!ATTLIST elementname (attributename attributetype presetting)> attributetype := (CDATA | ID | IDREFS | ENTITIY | ENTITIES | NMTOKEN | NMTOKENS | NOTATION (name (I name)...) presetting := (#REQUIRED | #IMPLIED | [#FIXED]) Value wert := (“literal" | ‘literal' | entity_reference) <!ELEMENT name contentmodel><contentmodel := EMPTY | ANY | data | modelgroup | mixed data := (#PCDATA) modelgroup := (Connector | sequence) [?|*|+] ]

  9. OBST XMLT-8 XML Connectors Connectors: , z.B. X,Y = Sequence X and Y | z.B. X|Y = or X or Y ? z.B. X? = optional X can occur optionally + z.B. X+ = 1:n X can occur 1 to n times * z.B. X* = 0:n X can occur 0 to n times

  10. OBST XMLT-9 XML Data Tree Interface Header Body Footing + Elem Elem Elem Elem Group Elem Elem Elem Elem | ? ? Elem Elem

  11. OBST XMLT-10 A Letter as a Data Interchange Protocol Letter ? * Reference Date Address Receiver Text Greeting Sender + + ? Name Street City Name Title

  12. OBST XMLT-11 Development of an XML Interface XMLParser InterfaceAnalyzer DTDDesigner XMLEditor Request Document Type Definition (DTD) or a Schema (XSD) Req.- Analysis Document Analysis Interface Specification Structure Design Document Design XML Generator XML-DTD Test

  13. OBST XMLT-12 Interface Test Cycle Results Argu-ments Storage Store Tester Tester Enter Testdata Enter expected Results Actual Inputs Generate Input Docu- ments Expected Outputs Generate Output Docu- ments Capture/Replay Feedback XML Document XML Document Generator Test Validator Comparison Report

  14. OBST XMLT-13 Sample Order Entry Interfaces HeaderItems Invoice Customer Order Class XML Document Billing Class Customer Customer Class Article Class SQL- Tab. SQL- Tab. Customer Data Article Data

  15. OBST XMLT-14 Object Structure of an Order Entry System Order + Order number Customer number Delivery mode Delivery date Order Item Customer Item number Article number Item amount ? Customer number Customer address Customer creditrate Customer points Article + + Name Street City Article number Article name Article amount Article price Minimum amount

  16. OBST XMLT-15 Data Structure of an Order Order Customer number Customer address Order number Date Nr_Items_ ordered Items + + Name Street City Day Month Year Order Item Item number Article number Item amount

  17. OBST XMLT-16 Order Test Procedure XML.Object:: Order { assert pre CustomerNr = range (00000001:99999999); assert pre OrderNr = range (1+1); assert pre OrderDate = Day, Month, Year; assert pre Day = range (01:31); assert pre Month = range (01:12); assert pre Year = range (00:99); assert pre Nr_Items_ordered = set (1, 5, 9); assert pre OrderItem [1:9] = ItemNr, ArticleNr, itemAmount); assert pre ItemNr = range (1+1); assert pre ArticleNr = set (0, 400, 650, 900, 942, 969, 988, 999); assert pre ItemAmount = range (1+99); }

  18. OBST XMLT-17 DTD for an Order <?xml version = '1.0'?><!DOCTYPE Auftrag [<!--* Customer Order for Underwear *--><!ELEMENT Order (CustomerNumber, OrderNumber, OrderDate, Nr_Items_ordered, OrderItem*)><!ELEMENT CustomerNr (#PCDATA)><!ELEMENT OrderNr (#PCDATA)><!ELEMENT OrderDate (Day, Month, Year)><!ELEMENT Day (#PCDATA)><!ELEMENT Month (#PCDATA)><!ELEMENT Year (#PCDATA)><!ELEMENT Nr_Items_ordered (#PCDATA)><!ELEMENT OrderItem (ItemNr, ArticleNr, ItemAmount)><!ELEMENT ItemNr (#PCDATA)><!ELEMENT ArticleNr (#PCDATA)><!ELEMENT ItemAmount (#PCDATA)>]>

  19. OBST XMLT-18 XML Document for an Order <Order> <CustomerNr>00000001</CustomerNr> <OrderNr>000001</OrderNr> <OrderDate> <Day>01</Day> <Month>03</Month> <Year>00</Year> </OrderDate> <Nr_Items_ordered>3</Nr_Items_ordered> <Order_Item> <ItemNr>1</ItemNr> <ArticleNr>969</ArticleNr> <ItemAmount>1</ItemAmount> </Order_Item> <Order_Item> <ItemNr>2</ItemNr> <ArticleNr>942</ArticleNr> <ItemAmount>100</ItemAmount> </OrderItem> <OrderItem> <ItemNr>3</ItemNr> <ArticleNr>988</ArticleNr> <ItemAmount>199</ItemAmount> </OrderItem></Order>

  20. OBST XMLT-19 Order Test Data CustomerNr OrderNr OrderDate Items_ ordered OrderItems Day Mon Year Nr ArtNr ArticleName ItemAmount 00000001 000001 01 03 00 3 1 969 Büstenhalter 1 2 942 Straps 100 3 988 Slip 200 00126254 00000000 02 03 00 2 1 650 Panties 300 2 400 Unterrock 400 99999999 00000000 03 03 00 5 1 942 Straps 500 2 969 Büstenhalter 999 3 988 Slip 999 4 650 Panties 999 5 400 Unterrock 999

  21. OBST XMLT-20 Customer Test Procedure SQL.Object:: Customer { assert pre CustomerNr = range (00000001:99999999); assert pre CusomerAddress = Name, Street, Zip, City; assert pre Name = set ("Feldbusch, Verona", "Schiffer, Claudia", "Illner, Maybritt", "Christiansen, Sabine", "Buster, Dolly"); assert pre Street = set ("Eroticastr. 9", "Modellstr. 66", "Ossistr. 89", "Wessistr. 49", "Pornostr. 77"); assert pre Zip = set ("55555", "44444", "11111", "22222", "66666"); assert pre City = set ("Koeln", "Duesseldorf", "Berlin", "Hamburg", "Prag"); assert pre Credit = set (1, 2, 3, 4, 0); assert pre Points = range (1000 + 1000); }

  22. OBST XMLT-21 Customer Test Data CustomerNr CustomerAddress Credit Points Name Street Zip City 00000001 Feldbusch, Verona Eroticastr. 9 55555 Köln 1 1000 00126254 Schiffer, Claudia Modellstr. 66 44444 Düsseldorf 2 1500 11117777 Illner, Maybritt Ossistr. 89 11111 Berlin 3 2000 55555555 Christiansen, Sabine Wessistr. 49 22222 Hamburg 4 4000 99999999 Buster, Dolly Pornostr. 77 66666 Prag 0 0

  23. OBST XMLT-22 Article Test Procedure SQL:Object:: Article { assert pre ArticleNr = set (400, 650, 942, 969, 988, 999); assert pre ArticleName = set ("Unterrock", "Panties", "Straps", "Büstenhalter", "Slip", "Bluse"); assert pre ArticlesonStock = range (1000 - 100); assert pre ArticlePrice = range (0 + 99,99); assert pre MinimumAmount = range (100 + 100); assert post ArticlesonStock = ArticlesonStock - Order.OrderItem.ItemAmount if (ArticlesonStock > Order.OrderItem.ItemAmount); assert post BackOrderSwitch = 1 if (ArticlesonStock < MinimumAmount); }

  24. OBST XMLT-23 Article Test Data ArticleNr ArticleName ArticlesonStock ArticlePrice MinimumAmount 400 Unterrock 500 199,99 100 650 Panties 1500 59,99 500 942 Straps 1000 99,99 500 969 Büstenhalter 600 82,50 200 988 Slip 300 150,00 200 999 Bluse 200 150,40 200

  25. OBST XMLT-24.1 Invoice Test Procedure XML.Object:: Invoice { assert post InvoiceNr = set (1:9999); assert post InvoiceDate = Day, Month, Year; assert post Day = OrderDate.Day; assert post Month = OrderDate.Month; assert post Year = OrderDate.Year; assert post DueDate = DueDay, DueMonth, DueYear; assert post DueDay = Day + 15 if (Day < 16 & Month ! = 2); assert post DueDay = Day - 15 if (Day < 15 & Month ! = 2); assert post DueDay = Day + 14 if (Day > 15 & Month = 2); assert post DueDay = Day - 14 if (Day > 14 & Month = 2); assert post DueMonth = Month if (Day < 16 & Month ! = 2) | (Day < 15 & Month = 2)); assert post DueMonth = Month + 1 if (Day > 15 & Month ! = 2) | (Day > 14 & Month = 2) & (Month < 12)); assert post DueMonth = 1 if (Day > 15 & Month = 12);

  26. assert post DueYear = Year if (Month < 12) | (Month = 12 & Day < 16); assert post DueYear = Year + 1 if (Month = 12 & Day > 16); assert post BillingItem = ArticleNr, Articlename, ArticlePrice, ItemAmount, ItemPrice; assert post ArticlePrice = ArticleNr -> Article.ArticlePrice; assert post ItemAmount = OrderNr -> Order.ItemNr -> OrderItem.ItemAmount; assert post itemPrice = ArticlePrice * ItemAmount; assert post TotalPrice = sum (ItemPrice [1:9]; assert post SalesTax = TotalPrice * TaxRate; asssert post AmouuntDue = TotalPrice + SalesTax; } OBST XMLT-24.2

  27. OBST XMLT-25 DTD for an Invoice <?xml version = '1.0'?><!DOCTYPE Invoice [<!--* Invoice for a Customer Order *--><!ELEMENT Invoice ( InvoiceNr, CustomerName, InvoiceDate, DueDate, BillingItem+, TotalPrice, SalesTax, AmountDue)><!ELEMENT InvoiceNr (#PCDATA)><!ELEMENT CustomerName (#PCDATA)><!ELEMENT InvoiceDate (Day, Month, Year)><!ELEMENT DueDate (Day, Month, Year)><!ELEMENT Day (#PCDATA)><!ELEMENT Month (#PCDATA)><!ELEMENT Year (#PCDATA)><!ELEMENT BillingItem (ArticleNr, Articlename, ArticlePrice, ItemAmount, ItemPrice)><!ELEMENT ArticleNr (#PCDATA)><!ELEMENT ArticleName (#PCDATA)><!ELEMENT ArticlePrice (#PCDATA)><!ELEMENT ItemAmount (#PCDATA)><!ELEMENT ItemPrice (#PCDATA)><!ELEMENT TotalPrice (#PCDATA)><!ELEMENT SalesTax (#PCDATA)><!ELEMENT AmountDue (#PCDATA)> ]>

  28. OBST XMLT-26.1 XML Document for an Invoice <Invoice> <InvoiceNr>0001</InvoiceNr> <CustomerName>Feldbusch,Verone</CustomerName> <InvoiceDate> <Day>01</Day> <Month>03</Month> <Year>00</Year> </InvoiceDate> <DueDate> <Day>16</Day> <Month>03</Month> <Year>00</Year> </DueDate> <BillingItem> <ArticleNr>969</ArticleNr> <Articlename>Buestenhalter</Articlename> <ArticlePrice>82,50</ArticlePrice> <ItemAmount>1</ItemAmount> <ItemPrice>82,50</ItemPrice> </BillingItem>

  29. OBST XMLT-26.2 <BillingItem> <ArticleNr>942</ArticleNr> <Articlename>Straps</Articlename> <ArticlePrice>99,99</ArticlePrice> <ItemAmount>100</ItemAmount> <ItemPrice>9999,00</ItemPrice> </BillingItem> <BillingItem> <ArticleNr>988</ArticleNr> <Articlename>Slip</Articlename> <ArticlePrice>150,00</ArticlePrice> <ItemAmount>200</ItemAmount> <ItemPrice>30000,00</ItemPrice> </BillingItem> <TotalPrice>40081,50</TotalPrice> <SalesTax>6413,04</SalesTax> <AmountDue>46494,54</AmouuntDue></Invoice>

  30. OBST XMLT-27 Sample Invoice Invoice Nr: 0001 Invoice Date: 01.03.00 Customer Name: Feldbusch, Verona Due Date: 16.03.00 ArticleNr Articlename ArticlePrice ItemAmount itemPrice 969 Büstenhalter 82,50 1 82,50 942 Straps 99,99 100 9999,00 988 Slip 150,00 200 30000,00 Total Price: 40081,50 Sales Tax: 6413,04 Amount Due: 46494,54

  31. OBST XMLT-28 Summary  Analyize the Component Interactions & Interfaces  Specifiy the Input Testdata Procedures Specifiy the Output Validation Procedures Generate the XML Testdata Documents Execute the Test Validate the XML Output Documents Control the Interface & Interaction Coverage

More Related