SlideShare a Scribd company logo
XML Validation  Test Suites with CAMV Exchange Development Deploy Requirements CAMV Model  Data Test NIEM Team, Oracle Public Sector Build  Exchange Generate Dictionary Technology Introduction – September 2011
DisclaimerNotice The following is not intended to outline Oracle general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Slide 2
Test Suites Introduction A key need in working with XML information exchanges, is developing examples and matching templates including rules, context, and roles for correctly managing information exchange content between partners. The W3C Schema by themselves are not sufficient.  Learn how to use open source tooling, XPath rules, and the OASIS CAM templates standard to create automated testing tools. Integrating SQL table lookup validation rules The CAMV validation engine can also be used in production environments to manage live information exchanges. Slide 3
Contents ,[object Object],The XML Validation Framework XPath Rules Techniques Code lists and SQL lookups Rules use cases ,[object Object]
Example CAM templates
CAMV validation examples
NIEM example test suite
Elections example test suite
SQL table database lookups
Running validations from visual CAM Editor
Results handling techniques
Summary* National Information Exchange Model (NIEM) – see http://www.niem.gov Slide 4
XML Validation Framework Architecture and Deployment Exchange Development Deploy Requirements CAMV Model  Data Test Build  Exchange Generate Dictionary
XML Validation Framework Slide 6
CAMV Engine Slide 7
CAMV Validation Engine Standalone XML validator using XPath rules Context aware and declarative rules approach Integrated with CAM editor menus for instant testing External code list and SQL table lookup support Callable via Spring framework or Java API; thread safe and server container deployable Configurable error levels – error, warning Java error results object returned Embedded validation results attributes in XML results Slide 8
CAMV CAM Editor XSLT CAM Editor / CAMV Environment Reports Single XML Test Instance XML Validation Result CAM Editor CAM template Slide 9
CAMV XSLT CAMV / ANT Script Environment CAM template(s) Reports CAMV Control Script XML XML Test Instances ANT 2 XML Validation Results 1 Slide 10
CAMV Test Control Script XML (single) Singleton Test Case Example <camvTestSuite> 	<testCase> 		<Example-Test-v19-3> 			<cxxfile>Test-Template-v19.cxx</cxxfile> 			<xmlfile>Test-Instance-v19-3.xml</xmlfile> 			<verbose>true</verbose> 			<inlineErrors>true</inlineErrors> <parameters> 				<abc>Param1</abc> 				<cde>Param2</cde> 			</parameters> 		</Example-Test-v19-3> 	</testCase>		 </camvTestSuite> Test case name Validation Template Test XML instance Optional items Slide 11
CAMV Test Control Script XML (multi-instance) Multi-Test Folder Example Test case name <camvTestSuite> <testCase> <Example-Test-With-Folder> <cxxfile>../samples/templates/EML-330-list-v7.cxx</cxxfile> 	<testdir>../samples/XMLsamples/UOCAVA/330</testdir> 	<verbose>true</verbose> 	<inlineErrors>true</inlineErrors> <parameters> 		<abc>Param1</abc> 		<cde>Param2</cde> 	</parameters> </Example-Test-With-Folder> </testCase>		 </camvTestSuite> Validation Template Test XML instances folder Optional items Slide 12
Linux GTK ANT Configuration Linux distributions (e.g. Ubuntu) has ANT pre-installed in /usr/share/ant/lib Download Ant-contrib from  http://ant-contrib.sourceforge.net/ Copy ant-contrib jar file to /lib directory inside ANT installation Slide 13
Mac OS ANT Configuration Mac OS X 1.7+ “Lion” comes pre-installed - use command : ant –version and it will self-configure Mac OS X 1.6 and earlier – need to install “Xcode” development software first Download Ant-contrib from  http://ant-contrib.sourceforge.net/ Copy ant-contrib jar file to /lib directory inside ANT installation Slide 14
ANT – Windows configuration Download ANT from  http://ant.apache.org Download Ant-contrib from  http://ant-contrib.sourceforge.net/ Copy ant-contrib jar file to /lib directory inside ANT installation Set the ANT_HOME environment variable to the directory where you installed ANT Add %ANT_HOME%/bin folder to executable path Slide 15
Windows System Path Settings 1 2 3 Slide 16
Running CAMV with ANT Go to CAMV location on Sourceforge http://www.cameditor.org/#CAMV_Testing Download CAMV release JAR and Test example ZIP Unpack test example from ZIP and put CAMV jar into folder Go to the command line (run cmd) Switch to folder where CAMV test suite is located ANT runAll Output is automatically placed in folder called CAMVTestResultslocated within the test instance location folder(s) Slide 17
Reviewing Validation Results HTML Slide 18
XPath Rules Techniques Quick Syntax Primer Controlling Scope, Context, Evaluation Dynamic Structure Components Useful XPath Resources Exchange Development Deploy Requirements CAMV Model  Data Test Build  Exchange Generate Dictionary
XPath Syntax Primer XPath is a simple assertion language where expressions reference components hierarchically within an XML instance structure – e.g. /animals/canines/domestic/dogs/poodle[1] /animals/canines/domestic/* CAMV uses the XPath v2.0 Java library In CAM templates XPath is used extensively to provide rules and content details for XML structure components  Slide 20
XPath Functions Slide 21
CAM XPath Extensions (most used) Slide 22
CAM templates and XPath expressions Within a CAM template XPath expressions are found in the <as:BusinessUseContext> section of the template. Slide 23
Rules Use Cases Typical Business Needs Quick Examples Exchange Development Deploy Requirements CAMV Model  Data Test Build  Exchange Generate Dictionary
Standard Pattern for Business Rules Claim – An English statement of a business rule that conveys its meaning.Example:  A Chapter MUST have a Title. Test – A formal statement of a business rule that can be parsed and processed by machine.Example:  <Assert test="count(para) &gt;=1"> Diagnostic – An English statement that identifies and explains what happened or was found when a Test fails.Example:  Chapter "X" does not have a Title. Outcome – Error, Warning, Pass Slide 25
Controlling Scope and Context Condition controls if and when the content rule action applies Condition can control structure as well; optional, mandatory, exclude Condition can reference different component(s) for contextual rule actions  Slide 26
Some more examples Business Rule: Items with color attributes don't need a tray number—the color is sufficient for picking the item:  <as:constraintcondition="exists(//Item/@color)" action="makeOptional(//Item/TrayNumber)" />  Business Rule: If order weight exceeds 25 kg, purchase order must specify a freight carrier: <as:constraintcondition="//Item/@weight > 25" action="makeMandatory(//Item/FreightHandler)">  Using XPath axis referencing (when things are not adjacent in hierarchy):  <as:constraintcondition="exists(ancestor::Item/@color)" action="makeOptional(//Item/TrayNumber)" />  * Excerpted from Michael Sorens DEVX CAM article examples Slide 27
Useful XPath Resources Michael Sorens article on using CAM from DEVX.com http://www.devx.com/xml/Article/41150 Martin Roberts – tutorial on writing CAM rules http://merryflame.co.uk/jcam/site/tutorials/CAMTemplateBasics.htm XPath tutorial resources Search on XPath tutorial Books available Tools – XPath expression constructors Slide 28
Code Lists and SQL Lookups Introduction to CAM code lists Advantages Tools and Hints Exchange Development Deploy Requirements CAMV Model  Data Test Build  Exchange Generate Dictionary
Code lists CAM lookup() function allows referencing to external XML lists of values Can replace use of restrictValues() static lists Database - CAM lookup() function can reference SQL table for dynamic value checking Where to get code lists? Import XSD enumeration schema into CAM lookup lists Convert UBL Genericode into CAM lookup lists Dump from database into lookup list XML format Direct via SQL table lookup Slide 30
CAM Code list XML format Code list name Code value Textual value Slide 31
Combining Rules and Code lists Real power of code lists and CAM – ability to select code list values based on XPath rule criteria to handle different partner configurations, versioning and cross-table validations  e.g.  Ford / Mustang | Chevy / Corvette Message version id = 1.6 – use code list XYZ-1-6  Slide 32
Code lists examples Load lookup list XML into CAM editor Assign lookup() rule to XML component Using SQL lookups – need to define connectivity to database and the SQL query to perform – we will do this part in the next section Slide 33
Code Lists Summary Lookups can be to external XML file instances Simple XML format for optimized performance and readability Dynamic runtime control via XPath rules to select lists to be applied Lookup can reference SQL statement for database content checking Slide 34
Part 2 Example CAM templates  Running CAMV validations Results handling techniques Summary Exchange Development Deploy Requirements CAMV Model  Data Test Build  Exchange Generate Dictionary
CAM templates Here we introduce CAM templates and understanding their component sections Template is abstraction layer over schema structure and rules Template can be automatically built from existing XSD schema Add additional XPath validation rules Compiled templates provide the validation instructions for the CAMV validation engine Using CAMV validations and handling results Slide 36
CAM Templates Overview Consists of 4 functional sections: ,[object Object]
AssemblyStructure captures the business information exchange structures
BusinessUseContextprovides the rules to apply during validation
Extensionpoints to the annotations and external lookup tablesSlide 37
Example CAM templates Examples Reviewed Quick walk through of important details Exchange Development Deploy Requirements CAMV Model  Data Test Build  Exchange Generate Dictionary
Available Test Suite Examples Experimental SAR Examples Two test example templates and XML instances: Baseline SAR with just structure and content usage rules, schema parlance “cardinality, facets and enumerations” Baseline SAR advanced – logical business rules added to check consistency of information and structure components Each test set contains examples that pass and those that fail depending on the template validation applied OASIS EML V7 – UOCAVA Testing ,[object Object]
Both individual test cases and folder based multiple examples
Each test uses different template and validation scenario* SAR – Suspicious Activity Report NIEM exchange * EML – Election Markup Language Standard Slide 39
Experimental SAR Overview Areas of Interest: ,[object Object]
Fraud
Gangs
Internet
Pornography
Missing Persons
Property
Vehicles
Community
Weapons/Chemicals
Prescriptions

More Related Content

Similar to Xml Validation Test Suite With Camv

SoftTest Ireland: Model Based Testing - January 27th 2011
SoftTest Ireland: Model Based Testing - January 27th 2011SoftTest Ireland: Model Based Testing - January 27th 2011
SoftTest Ireland: Model Based Testing - January 27th 2011
David O'Dowd
 
Mazda Use of Third Generation Xml Tools
Mazda Use of Third Generation Xml ToolsMazda Use of Third Generation Xml Tools
Mazda Use of Third Generation Xml Tools
CardinaleWay Mazda
 
Modeling and Testing Dovetail in MagicDraw
Modeling and Testing Dovetail in MagicDrawModeling and Testing Dovetail in MagicDraw
Modeling and Testing Dovetail in MagicDraw
Gregory Solovey
 
PathMATE
PathMATEPathMATE
PathMATE
CS, NcState
 
Ogf20 Gmb Chris Swan
Ogf20 Gmb Chris SwanOgf20 Gmb Chris Swan
Ogf20 Gmb Chris Swan
FNian
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
justmeanscsr
 
Test automation process
Test automation processTest automation process
Test automation process
Bharathi Krishnamurthi
 
Automation Framework Presentation
Automation Framework PresentationAutomation Framework Presentation
Automation Framework Presentation
Ben Ngo
 
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
CA Technologies
 
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
CA Technologies
 
Smu bscit sem 4 spring 2015 assignments copy
Smu bscit sem 4 spring 2015 assignments   copySmu bscit sem 4 spring 2015 assignments   copy
Smu bscit sem 4 spring 2015 assignments copy
solved_assignments
 
Basics of QTP Framework
Basics of QTP FrameworkBasics of QTP Framework
Basics of QTP Framework
Anish10110
 
Struts Interview Questions
Struts Interview QuestionsStruts Interview Questions
Struts Interview Questions
jbashask
 
Tail-f Systems Whitepaper - Configuration Management Simplified
Tail-f Systems Whitepaper - Configuration Management SimplifiedTail-f Systems Whitepaper - Configuration Management Simplified
Tail-f Systems Whitepaper - Configuration Management Simplified
Tail-f Systems
 

Similar to Xml Validation Test Suite With Camv (20)

SoftTest Ireland: Model Based Testing - January 27th 2011
SoftTest Ireland: Model Based Testing - January 27th 2011SoftTest Ireland: Model Based Testing - January 27th 2011
SoftTest Ireland: Model Based Testing - January 27th 2011
 
Mazda Use of Third Generation Xml Tools
Mazda Use of Third Generation Xml ToolsMazda Use of Third Generation Xml Tools
Mazda Use of Third Generation Xml Tools
 
Modeling and Testing Dovetail in MagicDraw
Modeling and Testing Dovetail in MagicDrawModeling and Testing Dovetail in MagicDraw
Modeling and Testing Dovetail in MagicDraw
 
About Qtp_1 92
About Qtp_1 92About Qtp_1 92
About Qtp_1 92
 
About QTP 9.2
About QTP 9.2About QTP 9.2
About QTP 9.2
 
About Qtp 92
About Qtp 92About Qtp 92
About Qtp 92
 
PathMATE
PathMATEPathMATE
PathMATE
 
Hybrid framework
Hybrid frameworkHybrid framework
Hybrid framework
 
Report
ReportReport
Report
 
Ogf20 Gmb Chris Swan
Ogf20 Gmb Chris SwanOgf20 Gmb Chris Swan
Ogf20 Gmb Chris Swan
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Test automation process _ QTP
Test automation process _ QTPTest automation process _ QTP
Test automation process _ QTP
 
Test automation process
Test automation processTest automation process
Test automation process
 
Automation Framework Presentation
Automation Framework PresentationAutomation Framework Presentation
Automation Framework Presentation
 
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
 
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
 
Smu bscit sem 4 spring 2015 assignments copy
Smu bscit sem 4 spring 2015 assignments   copySmu bscit sem 4 spring 2015 assignments   copy
Smu bscit sem 4 spring 2015 assignments copy
 
Basics of QTP Framework
Basics of QTP FrameworkBasics of QTP Framework
Basics of QTP Framework
 
Struts Interview Questions
Struts Interview QuestionsStruts Interview Questions
Struts Interview Questions
 
Tail-f Systems Whitepaper - Configuration Management Simplified
Tail-f Systems Whitepaper - Configuration Management SimplifiedTail-f Systems Whitepaper - Configuration Management Simplified
Tail-f Systems Whitepaper - Configuration Management Simplified
 

More from Bizagi Inc

GRA, NIEM and XACML Security Profiles July 2012
GRA, NIEM and XACML Security Profiles July 2012GRA, NIEM and XACML Security Profiles July 2012
GRA, NIEM and XACML Security Profiles July 2012
Bizagi Inc
 
Oracle BPM Adaptive Case Management 2014
Oracle BPM Adaptive Case Management 2014Oracle BPM Adaptive Case Management 2014
Oracle BPM Adaptive Case Management 2014
Bizagi Inc
 
Oracle BPM Open Data Services (Part 1)
Oracle BPM Open Data Services (Part 1)Oracle BPM Open Data Services (Part 1)
Oracle BPM Open Data Services (Part 1)
Bizagi Inc
 
Oracle BPM workflow and Open-XDX web services (Part 2)
Oracle BPM workflow and Open-XDX web services (Part 2)Oracle BPM workflow and Open-XDX web services (Part 2)
Oracle BPM workflow and Open-XDX web services (Part 2)
Bizagi Inc
 
NIEM and XML for Architects and Developers
NIEM and XML for Architects and DevelopersNIEM and XML for Architects and Developers
NIEM and XML for Architects and Developers
Bizagi Inc
 
Ottawa NIEM SOA Open Data Event
Ottawa NIEM SOA Open Data EventOttawa NIEM SOA Open Data Event
Ottawa NIEM SOA Open Data Event
Bizagi Inc
 
NIEM, CAM and Open-XDX tools
NIEM, CAM and Open-XDX toolsNIEM, CAM and Open-XDX tools
NIEM, CAM and Open-XDX tools
Bizagi Inc
 
Introducing Open XDX Technology for Open Data API development
Introducing Open XDX Technology for Open Data API developmentIntroducing Open XDX Technology for Open Data API development
Introducing Open XDX Technology for Open Data API development
Bizagi Inc
 
NIEM and Future SAR
NIEM and Future SARNIEM and Future SAR
NIEM and Future SAR
Bizagi Inc
 
CAM editor NIEM Evaluation Report
CAM editor NIEM Evaluation ReportCAM editor NIEM Evaluation Report
CAM editor NIEM Evaluation Report
Bizagi Inc
 
NIEM Overview Rule Ml November 2011
NIEM Overview Rule Ml November 2011NIEM Overview Rule Ml November 2011
NIEM Overview Rule Ml November 2011
Bizagi Inc
 
EML V7 Election Standard Overview
EML V7 Election Standard OverviewEML V7 Election Standard Overview
EML V7 Election Standard Overview
Bizagi Inc
 
NIEM and Oracle Overview October 2011
NIEM and Oracle Overview October 2011NIEM and Oracle Overview October 2011
NIEM and Oracle Overview October 2011
Bizagi Inc
 

More from Bizagi Inc (13)

GRA, NIEM and XACML Security Profiles July 2012
GRA, NIEM and XACML Security Profiles July 2012GRA, NIEM and XACML Security Profiles July 2012
GRA, NIEM and XACML Security Profiles July 2012
 
Oracle BPM Adaptive Case Management 2014
Oracle BPM Adaptive Case Management 2014Oracle BPM Adaptive Case Management 2014
Oracle BPM Adaptive Case Management 2014
 
Oracle BPM Open Data Services (Part 1)
Oracle BPM Open Data Services (Part 1)Oracle BPM Open Data Services (Part 1)
Oracle BPM Open Data Services (Part 1)
 
Oracle BPM workflow and Open-XDX web services (Part 2)
Oracle BPM workflow and Open-XDX web services (Part 2)Oracle BPM workflow and Open-XDX web services (Part 2)
Oracle BPM workflow and Open-XDX web services (Part 2)
 
NIEM and XML for Architects and Developers
NIEM and XML for Architects and DevelopersNIEM and XML for Architects and Developers
NIEM and XML for Architects and Developers
 
Ottawa NIEM SOA Open Data Event
Ottawa NIEM SOA Open Data EventOttawa NIEM SOA Open Data Event
Ottawa NIEM SOA Open Data Event
 
NIEM, CAM and Open-XDX tools
NIEM, CAM and Open-XDX toolsNIEM, CAM and Open-XDX tools
NIEM, CAM and Open-XDX tools
 
Introducing Open XDX Technology for Open Data API development
Introducing Open XDX Technology for Open Data API developmentIntroducing Open XDX Technology for Open Data API development
Introducing Open XDX Technology for Open Data API development
 
NIEM and Future SAR
NIEM and Future SARNIEM and Future SAR
NIEM and Future SAR
 
CAM editor NIEM Evaluation Report
CAM editor NIEM Evaluation ReportCAM editor NIEM Evaluation Report
CAM editor NIEM Evaluation Report
 
NIEM Overview Rule Ml November 2011
NIEM Overview Rule Ml November 2011NIEM Overview Rule Ml November 2011
NIEM Overview Rule Ml November 2011
 
EML V7 Election Standard Overview
EML V7 Election Standard OverviewEML V7 Election Standard Overview
EML V7 Election Standard Overview
 
NIEM and Oracle Overview October 2011
NIEM and Oracle Overview October 2011NIEM and Oracle Overview October 2011
NIEM and Oracle Overview October 2011
 

Recently uploaded

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 

Xml Validation Test Suite With Camv

  • 1. XML Validation Test Suites with CAMV Exchange Development Deploy Requirements CAMV Model Data Test NIEM Team, Oracle Public Sector Build Exchange Generate Dictionary Technology Introduction – September 2011
  • 2. DisclaimerNotice The following is not intended to outline Oracle general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Slide 2
  • 3. Test Suites Introduction A key need in working with XML information exchanges, is developing examples and matching templates including rules, context, and roles for correctly managing information exchange content between partners. The W3C Schema by themselves are not sufficient. Learn how to use open source tooling, XPath rules, and the OASIS CAM templates standard to create automated testing tools. Integrating SQL table lookup validation rules The CAMV validation engine can also be used in production environments to manage live information exchanges. Slide 3
  • 4.
  • 10. Running validations from visual CAM Editor
  • 12. Summary* National Information Exchange Model (NIEM) – see http://www.niem.gov Slide 4
  • 13. XML Validation Framework Architecture and Deployment Exchange Development Deploy Requirements CAMV Model Data Test Build Exchange Generate Dictionary
  • 16. CAMV Validation Engine Standalone XML validator using XPath rules Context aware and declarative rules approach Integrated with CAM editor menus for instant testing External code list and SQL table lookup support Callable via Spring framework or Java API; thread safe and server container deployable Configurable error levels – error, warning Java error results object returned Embedded validation results attributes in XML results Slide 8
  • 17. CAMV CAM Editor XSLT CAM Editor / CAMV Environment Reports Single XML Test Instance XML Validation Result CAM Editor CAM template Slide 9
  • 18. CAMV XSLT CAMV / ANT Script Environment CAM template(s) Reports CAMV Control Script XML XML Test Instances ANT 2 XML Validation Results 1 Slide 10
  • 19. CAMV Test Control Script XML (single) Singleton Test Case Example <camvTestSuite> <testCase> <Example-Test-v19-3> <cxxfile>Test-Template-v19.cxx</cxxfile> <xmlfile>Test-Instance-v19-3.xml</xmlfile> <verbose>true</verbose> <inlineErrors>true</inlineErrors> <parameters> <abc>Param1</abc> <cde>Param2</cde> </parameters> </Example-Test-v19-3> </testCase> </camvTestSuite> Test case name Validation Template Test XML instance Optional items Slide 11
  • 20. CAMV Test Control Script XML (multi-instance) Multi-Test Folder Example Test case name <camvTestSuite> <testCase> <Example-Test-With-Folder> <cxxfile>../samples/templates/EML-330-list-v7.cxx</cxxfile> <testdir>../samples/XMLsamples/UOCAVA/330</testdir> <verbose>true</verbose> <inlineErrors>true</inlineErrors> <parameters> <abc>Param1</abc> <cde>Param2</cde> </parameters> </Example-Test-With-Folder> </testCase> </camvTestSuite> Validation Template Test XML instances folder Optional items Slide 12
  • 21. Linux GTK ANT Configuration Linux distributions (e.g. Ubuntu) has ANT pre-installed in /usr/share/ant/lib Download Ant-contrib from http://ant-contrib.sourceforge.net/ Copy ant-contrib jar file to /lib directory inside ANT installation Slide 13
  • 22. Mac OS ANT Configuration Mac OS X 1.7+ “Lion” comes pre-installed - use command : ant –version and it will self-configure Mac OS X 1.6 and earlier – need to install “Xcode” development software first Download Ant-contrib from http://ant-contrib.sourceforge.net/ Copy ant-contrib jar file to /lib directory inside ANT installation Slide 14
  • 23. ANT – Windows configuration Download ANT from http://ant.apache.org Download Ant-contrib from http://ant-contrib.sourceforge.net/ Copy ant-contrib jar file to /lib directory inside ANT installation Set the ANT_HOME environment variable to the directory where you installed ANT Add %ANT_HOME%/bin folder to executable path Slide 15
  • 24. Windows System Path Settings 1 2 3 Slide 16
  • 25. Running CAMV with ANT Go to CAMV location on Sourceforge http://www.cameditor.org/#CAMV_Testing Download CAMV release JAR and Test example ZIP Unpack test example from ZIP and put CAMV jar into folder Go to the command line (run cmd) Switch to folder where CAMV test suite is located ANT runAll Output is automatically placed in folder called CAMVTestResultslocated within the test instance location folder(s) Slide 17
  • 27. XPath Rules Techniques Quick Syntax Primer Controlling Scope, Context, Evaluation Dynamic Structure Components Useful XPath Resources Exchange Development Deploy Requirements CAMV Model Data Test Build Exchange Generate Dictionary
  • 28. XPath Syntax Primer XPath is a simple assertion language where expressions reference components hierarchically within an XML instance structure – e.g. /animals/canines/domestic/dogs/poodle[1] /animals/canines/domestic/* CAMV uses the XPath v2.0 Java library In CAM templates XPath is used extensively to provide rules and content details for XML structure components Slide 20
  • 30. CAM XPath Extensions (most used) Slide 22
  • 31. CAM templates and XPath expressions Within a CAM template XPath expressions are found in the <as:BusinessUseContext> section of the template. Slide 23
  • 32. Rules Use Cases Typical Business Needs Quick Examples Exchange Development Deploy Requirements CAMV Model Data Test Build Exchange Generate Dictionary
  • 33. Standard Pattern for Business Rules Claim – An English statement of a business rule that conveys its meaning.Example: A Chapter MUST have a Title. Test – A formal statement of a business rule that can be parsed and processed by machine.Example: <Assert test="count(para) &gt;=1"> Diagnostic – An English statement that identifies and explains what happened or was found when a Test fails.Example: Chapter "X" does not have a Title. Outcome – Error, Warning, Pass Slide 25
  • 34. Controlling Scope and Context Condition controls if and when the content rule action applies Condition can control structure as well; optional, mandatory, exclude Condition can reference different component(s) for contextual rule actions Slide 26
  • 35. Some more examples Business Rule: Items with color attributes don't need a tray number—the color is sufficient for picking the item: <as:constraintcondition="exists(//Item/@color)" action="makeOptional(//Item/TrayNumber)" /> Business Rule: If order weight exceeds 25 kg, purchase order must specify a freight carrier: <as:constraintcondition="//Item/@weight > 25" action="makeMandatory(//Item/FreightHandler)"> Using XPath axis referencing (when things are not adjacent in hierarchy): <as:constraintcondition="exists(ancestor::Item/@color)" action="makeOptional(//Item/TrayNumber)" /> * Excerpted from Michael Sorens DEVX CAM article examples Slide 27
  • 36. Useful XPath Resources Michael Sorens article on using CAM from DEVX.com http://www.devx.com/xml/Article/41150 Martin Roberts – tutorial on writing CAM rules http://merryflame.co.uk/jcam/site/tutorials/CAMTemplateBasics.htm XPath tutorial resources Search on XPath tutorial Books available Tools – XPath expression constructors Slide 28
  • 37. Code Lists and SQL Lookups Introduction to CAM code lists Advantages Tools and Hints Exchange Development Deploy Requirements CAMV Model Data Test Build Exchange Generate Dictionary
  • 38. Code lists CAM lookup() function allows referencing to external XML lists of values Can replace use of restrictValues() static lists Database - CAM lookup() function can reference SQL table for dynamic value checking Where to get code lists? Import XSD enumeration schema into CAM lookup lists Convert UBL Genericode into CAM lookup lists Dump from database into lookup list XML format Direct via SQL table lookup Slide 30
  • 39. CAM Code list XML format Code list name Code value Textual value Slide 31
  • 40. Combining Rules and Code lists Real power of code lists and CAM – ability to select code list values based on XPath rule criteria to handle different partner configurations, versioning and cross-table validations e.g. Ford / Mustang | Chevy / Corvette Message version id = 1.6 – use code list XYZ-1-6 Slide 32
  • 41. Code lists examples Load lookup list XML into CAM editor Assign lookup() rule to XML component Using SQL lookups – need to define connectivity to database and the SQL query to perform – we will do this part in the next section Slide 33
  • 42. Code Lists Summary Lookups can be to external XML file instances Simple XML format for optimized performance and readability Dynamic runtime control via XPath rules to select lists to be applied Lookup can reference SQL statement for database content checking Slide 34
  • 43. Part 2 Example CAM templates Running CAMV validations Results handling techniques Summary Exchange Development Deploy Requirements CAMV Model Data Test Build Exchange Generate Dictionary
  • 44. CAM templates Here we introduce CAM templates and understanding their component sections Template is abstraction layer over schema structure and rules Template can be automatically built from existing XSD schema Add additional XPath validation rules Compiled templates provide the validation instructions for the CAMV validation engine Using CAMV validations and handling results Slide 36
  • 45.
  • 46. AssemblyStructure captures the business information exchange structures
  • 47. BusinessUseContextprovides the rules to apply during validation
  • 48. Extensionpoints to the annotations and external lookup tablesSlide 37
  • 49. Example CAM templates Examples Reviewed Quick walk through of important details Exchange Development Deploy Requirements CAMV Model Data Test Build Exchange Generate Dictionary
  • 50.
  • 51. Both individual test cases and folder based multiple examples
  • 52. Each test uses different template and validation scenario* SAR – Suspicious Activity Report NIEM exchange * EML – Election Markup Language Standard Slide 39
  • 53.
  • 54. Fraud
  • 55. Gangs
  • 65. Terrorism* SAR – Suspicious Activity Report Slide 40
  • 66. Visual Template Rules Wizard Tools Slide 41
  • 67. Running CAMV Validation Illustrative examples – pass, fail, warnings Default structure handling Data type and Content checking Cross-field validation rules SQL database lookup Exchange Development Deploy Requirements CAMV Model Data Test Build Exchange Generate Dictionary
  • 68. Example Advanced Rules Business Rule: Providing warning if PurgeDate is earlier than PurgeReviewDate <as:constraintcondition="//sbl:PrivacyDetails/sbl:PrivacyPurgeDate < //sbl:PrivacyDetails/sbl:PrivacyPurgeReviewDate"action="printMessage(//sbl:PrivacyDetails/sbl:PrivacyPurgeReviewDate,Warning: Review date not before purge date)"><as:annotation/></as:constraint> Business Rule: Location must contain an address or a highway or coordinate set <as:constraintcondition="not(./nc:LocationAddress) and(not(./nc:LocationHighway)) and(not(./nc:LocationTwoDimensionalGeographicCoordinate))"action="printMessage(//j:TargetLocation/sbl:Location,Empty Location information)"><as:annotation><as:documentationtype="documentation">Example of advanced rule</as:documentation></as:annotation></as:constraint> Slide 43
  • 69. Default Structure Handling By default all structure components are required and string content Content Masks Structure control Slide 44
  • 70.
  • 71. Sample SAR Validation Results HTML Slide 46
  • 72. Installing and using SQL lookup example Contains test sample and template DB lookup sample install folder contents Run start and stop database scripts Simply download and unpack the ZIP archive and drop the DatasourceExample package into the samples Test Suite folder Then add the camv-test-DbList.xml to the testsuites folder Slide 47
  • 73. SQL DB configuration details Modify to match your local directory structure camv-test-DbList.xml contains data source reference and connection configuration Modify inside dbProps.props file to match your local directory structure Slide 48
  • 74.
  • 75. From within the Test Suite folder on the command line execute > Ant runALLSlide 49
  • 76. DB lookup test results rendered as HTML SQL DB lookup result Slide 50
  • 77. CAM Editor Visual Tools SQL lookup entry wizard Run CAMV validation wizard Visual entry of SQL connection details Visual review of validation results Exchange Development Deploy Requirements CAMV Model Data Test Build Exchange Generate Dictionary
  • 78. CAM template SQL lookup rule definition This is the myLists.cam example template Slide 52
  • 79. CAM template SQL lookup rule wizard Slide 53
  • 80. Test from CAM Editor validation Run Wizard Pick test case XML file 1 Choose JDBC driver Confirm driver name 2 3 Replace default connection with actual JDBC string 4 NOTE: this is the same information as contained in the dbProp.props file jdbc:derby://localhost:1527/firstdb Slide 54
  • 81. Sample Visual Test Results SQL lookup result displayed Slide 55
  • 82. More Results Handling XSLT script post-processing XML Diff considerations Regression Testing with CAMV Middleware Integration Exchange Development Deploy Requirements CAMV Model Data Test Build Exchange Generate Dictionary
  • 83. Default XSLT rendering of results HTML output Finds CAM validation results attributes Formats and outputs error details Slide 57
  • 84. Post-Processing Tips and Tricks XSLT post-processing not only for HTML reporting Create response error messaging directly from CAMV output Create receipt notification directly from CAMV output Can use simple DIFF to compare generic HTML report output to detect regression test changes Rule based checking is superior to simple result content change testing Java API and Spring supports direct integration of CAMV and returning validation results directly to middleware Slide 58
  • 85. Summary Review Next Steps Future enhancements Resources and Links Exchange Development Deploy Requirements CAMV Model Data Test Build Exchange Generate Dictionary
  • 86. Review and Value Proposition Testing and verification of your exchange XML examples SQL database lookups and flexible code lists handling Business rule checking Post-processing options and reporting with XSLT scripts Regression testing with batch processing Flexible deployment of XML validation framework Integration via Spring API to middleware Slide 60
  • 87. What are we working on? Improvements “CAM for web services” – currently exchange-centric Enhancing ANT capabilities and soapUI integration New features Dictionary integration with NIEM Domain Update Tool Evaluation tools for dictionaries and components Enhancing XML example generation with synthetic data Slide 61
  • 88. CAMV Summary Open source, open public standards based, cross-platform deployment written using Java Uses Java APIs, Spring API, JDOM, etc. Validation features: XPath V2.0 support Looks ups 20 built-in functions Reporting Embedded CAMERROR, CAMWARN tags Spring API and results set handler Optional sysout test result log Slide 62
  • 89. Links and References DOWNLOADS - http://cameditor.org/ #CAMV_Testing NIEM MATERIALS - Oracle NIEM website http://www.oracle.com/goto/niem Oracle XMLOrb blog site http://blogs.oracle.com/xmlorb Slide 63