Advanced Assertions in soapUI Presented by Kushan Athukorala

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

XCAP Tutorial Jonathan Rosenberg.
W3C SML F2F XML Schema 1.1 Sandy Gao, IBM.
XML III. Learning Objectives Formatting XML Documents: Overview Using Cascading Style Sheets to format XML documents Using XSL to format XML documents.
Advanced XSLT. Branching in XSLT XSLT is functional programming –The program evaluates a function –The function transforms one structure into another.
XML: Extensible Markup Language
Internet Technologies1 1 Lecture 4: Programming with XSLT.
SOAP & Security IEEE Computer Society Utah Chapter Hilarie Orman - Purple Streak Development Tolga Acar - Novell, Inc. October 24, 2002.
SOAP.
Apache Axis2 SOAP Primer. Agenda What is SOAP? Characteristics SOAP message structure Header blocks Fault notification Exercises.
1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
RDF Tutorial.
Snejina Lazarova Senior QA Engineer, Team Lead CRMTeam Dimo Mitev Senior QA Engineer, Team Lead SystemIntegrationTeam Telerik QA Academy SOAP-based Web.
XSL Unit 6 November 2. XSL –eXtensible Stylesheet Language –Basically a stylesheet for XML documents XSL has three parts: –XSLT –XPath –XSL-FO.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
Object Oriented Programming III1 XSLT Processing XML using XSLT Using XPath.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Introduction to soapUI Presented by Kushan Athukorala.
SD2520 Databases using XML and JQuery
A Use Case for SAML Extensibility Ashish Patel, France Telecom Paul Madsen, NTT.
4/20/2017.
Functional Testing of Webservices Presented by Kushan Athukorala.
Instances and Object Diagrams Reporter: 陳雅萍. Abstractions and Instances Abstraction: the ideal essence of a thing Instance: a concrete manifestation of.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
IS432 Semi-Structured Data Lecture 5: XSLT Dr. Gamal Al-Shorbagy.
An Introduction to XML Presented by Scott Nemec at the UniForum Chicago meeting on 7/25/2006.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
XML – Tools and Trends Schematron Tim Bornholtz Session 55.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
CSE3201/CSE4500 Information Retrieval Systems XSLT – Part 2.
XML 102 Mike Rawlins Rawlins EC Consulting. Soup to Nuts Data content based on TS190 Based on XML Forum approach: Instance document representation W3C.
XPath. Why XPath? Common syntax, semantics for [XSLT] [XPointer][XSLT] [XPointer] Used to address parts of an XML document Provides basic facilities for.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
XRules An XML Business Rules Language Introduction Copyright © Waleed Abdulla All rights reserved. August 2004.
Spring Database Access Ojitha Kumanayaka Copyright © Virtusa, 2007.
Implementing the XDS Infrastructure Bill Majurski IT Infrastructure National Institute of Standards and Technology.
Page 1 © 2001, Epicentric - All Rights Reserved Epicentric Modular Web Services Alan Kropp Web Services Architect WSRP Technical Committee – March 18,
Service Oriented Architecture and Web Services
Copyright © 2013 Curt Hill SOAP Protocol for exchanging data and Enabling Web Services.
XSD Presented by Kushan Athukorala. 2 Agenda XML Namespaces XML Schema XSD Indicators XSD Data Types XSD Schema References.
Schematron Tim Bornholtz. Schema languages Many people turn to schema languages when they want to be sure that an XML instance follows certain rules –DTD.
XPath Presented by Kushan Athukorala. 2 Agenda XPath XPath Terminology Selecting Nodes Predicates.
A university for the world real R © 2009, Chapter 9 The Runtime Environment Michael Adams.
The Semistructured-Data Model Programming Languages for XML Spring 2011 Instructor: Hassan Khosravi.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
XML Presented by Kushan Athukorala. 2 Agenda XML Overview Entity References Elements vs. Atributes XML Validation DTD XML Schema Linking XML and CSS XSLT.
INT-9: Implementing ESB Processes with OpenEdge ® and Sonic ™ David Cleary Principal Software Engineer.
SOAP-based Web Services Telerik Software Academy Software Quality Assurance.
What is SOAP? Luciano Piccoli. SOAP – Simple Object Access Protocol  SOAP is an XML based protocol to let software components and applications communicate.
Calling Web Services from Oracle Presenter – Raymond Jones Company – Intermountain Healthcare Background – We are implementing a new ERP system (Peoplesoft)
 XSL – Extensible Style Sheet Language  XSLT – XSL Transformations › Used to transform XML documents to other formats,like HTML or other XML documents.
CSE3201/CSE4500 Information Retrieval Systems XSLT – Part 2.
Advance Database S Week-6 Dr.Kwanchai Eurviriyanukul
Lecture 23 XQuery 1.0 and XPath 2.0 Data Model. 2 Example 31.7 – User-Defined Function Function to return staff at a given branch. DEFINE FUNCTION staffAtBranch($bNo)
#N14 Pattern Value (aka Substring attribute) SDD 1.1 Initial Discussion XXX = [Proposal | Initial Discussion | General Direction Proposal]
1 WS-Policy. 2 What’s the Problem? To use a web service a client needs more information than is provided in WSDL file. Examples: –Does service support.
1 XPath. 2 Agenda XPath Introduction XPath Nodes XPath Syntax XPath Operators XPath Q&A.
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 9 Web Services: JAX-RPC,
XML: Extensible Markup Language
Unit 4 Representing Web Data: XML
MIME Type Definition Group Name: PRO WG
CWA3 Standardized roll-out package Part 2: XBRL Handbook for Declarers
LITECOIN SCRIPT|ETHEREUM SCRIPT | ETHEREUM CLONE.
LITECOIN SCRIPT|ETHEREUM SCRIPT | ETHEREUM CLONE.
Chapter 7 Representing Web Data: XML
CS 431 – February 28, 2005 Carl Lagoze – Cornell University
Unit 6 - XML Transformations
Presentation transcript:

Advanced Assertions in soapUI Presented by Kushan Athukorala

Agenda XPath Match Assertion XQuery Match Asserion Script Assertions WS-Addressing Response Assertion WS-Addressing Request Assertion

XPath Match Assertion Study XPath First

XPath Match Assertion The XPath Match assertion allows specification of an XPath expression to be evaluated against the received response message and compare its result to a predefined value. Expressions can select everything from attribute values, make Boolean evaluations or select the entire response body. XmlUnit is used internally for comparing xml elements, nodes or hierarchies

XPath Assertion Examples Example1 - Validate that the result contains how many hits declare namespace ns1='http://webservices.amazon.com/AWSECommerceService/2005-07-26'; count(//ns1:Item) Example2 - Validate that the ProductGroup element always is "Book“ declare namespace ns1='http://webservices.amazon.com/AWSECommerceService/2005-07-26'; count(//ns1:ProductGroup[text()!='Book']) Example3 -Validate that DetailPageURL always starts with 'http://www.amazon.com/exec/obidos': declare namespace ns1='http://webservices.amazon.com/AWSECommerceService/2005-07-26'; count(//ns1:DetailPageURL) = count(//ns1:DetailPageURL[starts-with(text(), 'http://www.amazon.com/exec/obidos')])

XQuery Match Assertion Study XQuery First

XQuery Match Assertion The XQuery Match assertions is configured exactly like the XPath Math assertion described above. Difference being that the specified expression is evaluated as an XQuery expression instead This assertion is useful when you want to assert a subset of your data and for example not be dependent on other data, the data order, etc

Script Assertion – Using Groovy script editor Script Assertion allows for arbitrary validations Script has access to the following objects: messageExchange : Message Exchange for the current request/response. Gives direct access to message content, HTTP Headers, Attachments, etc. context : TestRunContext running the current TestCase, this will for now always be an instance of WsdlTestRunContext log : a standard log4j Logger object available for logging arbitrary information

Examples Validate a certain response time assert messageExchange.timeTaken < 400 Validate existence of a response HTTP Header assert messageExchange.responseHeaders["x-amz-id-1"] != null Validate the existence of a specific element using GroovyUtils def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def holder = groovyUtils.getXmlHolder( messageExchange.responseContent ) assert holder["//ns1:RequestId"] != null

WS-Addressing Response Assertion Validates that the response has valid WS-A header properties.

WS-Addressing Request Assertion Validates that the request has valid WS-A header properties

Thank You

USA INDIA SRILANKA UK www.virtusa.com "Virtusa" is a trademark of the company and a registered trademark in the EU and In India. "Productization" is a service mark of the company and a registered service mark in the United States. "vRule" is a service mark of the company. For more information please contact SalesInquiries@virtusa.com © V I r t u s a C o r p o r a t i o n