Callista Enterprise Test Driven ESB Development Sofia Jonsson

Slides:



Advertisements
Similar presentations
Acceptance Testing vs. Unit Testing: A Developers Perspective Owen Rogers Rob Styles
Advertisements

Applying the SOA RA Utah Public Safety ESB Project Utah Department of Technology Services April 10, 2008 Prepared by Robert Woolley.
COMPSCI 105 S Principles of Computer Science 12 Abstract Data Type.
Predictor of Customer Perceived Software Quality By Haroon Malik.
Tailoring Needs Chapter 3. Contents This presentation covers the following: – Design considerations for tailored data-entry screens – Design considerations.
CSCU 411 Software Engineering Chapter 2 Introduction to Software Engineering Management.
1 CODE TESTING Principles and Alternatives. 2 Testing - Basics goal - find errors –focus is the source code (executable system) –test team wants to achieve.
By Thomas Rodgers Matlock Capital, LLC.  Privately held trading firm specializing in Stock and Stock Options market making  Focus on sophisticated analytics.
Page 1Prepared by Sapient for MITVersion 0.1 – August – September 2004 This document represents a snapshot of an evolving set of documents. For information.
Click to add text Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Stateful Web Application Development with Spring Web Flow John Case Senior Consultant Centare Group, Ltd.
Messaging Technologies Group: Yuzhou Xia Yi Tan Jianxiao Zhai.
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
By for Test Driven Development: Industry practice and teaching tool Robert Vanderwall, Ph.D. 1 WISTPC-15.
UNIT-V The MVC architecture and Struts Framework.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
CSCE 548 Secure Software Development Risk-Based Security Testing.
Enterprise DevOps Grid Jonny Wooldridge this deck available here:
Implementation & Integration Phase Implementation, then integration: Implementation, then integration:  Each module is implemented by member of programmer.
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
Balancing Practices: Inspections, Testing, and Others JAXA scenario (formal method) Masa Katahira Japanese Space Agency.
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
UNIT – II ARCHITECTING WEB SERVICES. WHAT ARE WEB SERVICES ? Web Services are loosely coupled, contracted components that communicate via XML-based interfaces.
XML in Development of Distributed Systems Tooling Programming Runtime.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
CakePHP is an open source web development framework. It follows Model-View- Controller and is developed using PHP. IT is the basic for user to create.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
28-29 th March 2006CCP4 Automation STAB MeetingCCP4i and Automation 1 CCP4i and Automation : Opportunities and Limitations Peter Briggs, CCP4.
Introduction to Exception Handling and Defensive Programming.
Drools Sofia Jonsson CADEC2006, Drools, Slide 2 Copyright 2006, Callista Enterprise AB Agenda Rule Engines - History/Background.
Kuali Enterprise Workflow Ryan Kirkendall (Indiana University) Brian McGough (Indiana University)
Software Construction Lecture 18 Software Testing.
Service Oriented Architecture CCT355H5 Professor Michael Jones Suezan Makkar.
Copyright © 2005 Charlie Poole. All rights reserved Test First User Interfaces XP2005 Sheffield University June 18, 2005.
12/14/2015 Concept of Test Driven Development applied to Embedded Systems M. Smith University of Calgary, Canada 1 Automated Testing Environment Concepts.
Test Stubs... getting the world under control. TDD of State Pattern To implement GammaTown requirements I CS, AUHenrik Bærbak Christensen2.
XmlBlackBox The presentation Alexander Crea June the 15st 2010 The presentation Alexander Crea June the 15st 2010
1 Presentation Title Test-driven development (TDD) Overview David Wu.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Testing Spring Applications Unit Testing.
(1) Test Driven Development Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
CS451 Software Implementation and Integration Yugi Lee STB #555 (816) Note: This lecture was designed.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Introduction to Modeling Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
A service Oriented Architecture & Web Service Technology.
Software Engineering Lecture 11 Software Testing Presenter: Josef Hallberg 1.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
6. Application Server Issues for the Project
Software Development.
Automated Software Testing
CSE 219 Final exam review.
CSCE 548 Secure Software Development Risk-Based Security Testing
Lecture 3 Prescriptive Process Models
Chapter 8 – Software Testing
TerraForm3D Plasma Works 3D Engine & USGS Terrain Modeler
History, Characteristics and Frameworks
Testing and Test-Driven Development CSC 4700 Software Engineering
Multiple Aspect Modeling of the Synchronous Language Signal
Software Test Automation and Tools
Jasper Hillebrand Emerging Technologies Think Big Analytics / Teradata
Games Development 2 Entity / Architecture Review
Demo for Partners and Customers
Mulesoft Anypoint Connector for AS/400 and Web Transaction Framework
Presentation transcript:

Callista Enterprise Test Driven ESB Development Sofia Jonsson

Cadec 2007, Test Driven ESB Development, Slide 2 Copyright 2007, Callista Enterprise AB The Enterprise Service Bus Point to Point ESB

Cadec 2007, Test Driven ESB Development, Slide 3 Copyright 2007, Callista Enterprise AB ESB Development Configuring/implementing ESB message flows. Each flow consists of multiple nodes with functionlity for e.g.: –Message Routing –Message Transformation –Validation –Logging –Error handling Example:

Cadec 2007, Test Driven ESB Development, Slide 4 Copyright 2007, Callista Enterprise AB Testing in an ESB Environment Services, sub systems and systems are often tested early –In isolation The message flows are often tested late –During integration or system test phase –Not tested in isolation

Cadec 2007, Test Driven ESB Development, Slide 5 Copyright 2007, Callista Enterprise AB Why Test ESB Code? The flows often contain mission critical functionality that is difficult to change. Errors in the flows can be particularly hard to track down: –No GUI –Difficult to simulate all types of behaviour –Unclear responsibility

Cadec 2007, Test Driven ESB Development, Slide 6 Copyright 2007, Callista Enterprise AB Test Driven Development TDD deals with: –”Change is the only constant”. –Errors/changes are more expensive the later they’re identified. TDD Key Concepts: –Tests are written up front. –Test suites are automated. –Units are tested in isolation.

Cadec 2007, Test Driven ESB Development, Slide 7 Copyright 2007, Callista Enterprise AB Why Test Driven ESB Development - Summary ESB flows contain a lot of functionality. TDD can help test that functionality in isolation. ESB flows are often tested late. TDD means to write tests upfront. ESB flows often contain mission critical functionality that is difficult to change. Having an automated unit test suite asserts quality when changes are applied. Errors in the ESB flows can be particularly hard to track down. TDD assures that errors are detected as early as possible.

Cadec 2007, Test Driven ESB Development, Slide 8 Copyright 2007, Callista Enterprise AB Test Driven ESB Development - the Challenge Varied environment –Product level –Flow level –Node level Asynchronous communication –Tests typically handle request – reply –Timeout issues Lack of tool support –Environments without good support for testing –Few specialized tools available

Cadec 2007, Test Driven ESB Development, Slide 9 Copyright 2007, Callista Enterprise AB Defining the Units What should the tests cover? –Code + configuration –Own code in isolation Flow = Unit Node = Unit Code within node = Unit

Cadec 2007, Test Driven ESB Development, Slide 10 Copyright 2007, Callista Enterprise AB Unit Granularity vs. Test Runtime Out of ESB ”container” –Test of code within node –Test of node –Test of flow In ESB ”container” –Test of code within node –Test of node –Test of flow Be pragmatic! –Find out what works in your environment

Cadec 2007, Test Driven ESB Development, Slide 11 Copyright 2007, Callista Enterprise AB Characteristics: –Similar to ”ordinary” unit testing –Typically covers code and not configuration –Tests can be run outside of the ESB –Delegation can be used within a node to improve testability Isolated Test of Code Within Node Node

Cadec 2007, Test Driven ESB Development, Slide 12 Copyright 2007, Callista Enterprise AB Isolated Test of Code Within Node Pros: –Fast runtime –Fine grained tests –Isolation of own code –No asynchronous issues Cons: –Variations at node level can cause problems Need tests in different languages Lack of unit test support Graphical modelled nodes cannot be tested –Difficult to mock some products’ APIs. –Expensive to cover all code

Cadec 2007, Test Driven ESB Development, Slide 13 Copyright 2007, Callista Enterprise AB Test of flow in ESB Characteristics: –Covers both code and configuration –Typical ”black box” test Handles input and expected output Reusable test cases Varied test data

Cadec 2007, Test Driven ESB Development, Slide 14 Copyright 2007, Callista Enterprise AB Test of flow in ESB - Continued Pros: –Clear Interface –Don’t have to deal with variations at node level –Black box testing means test cases often can be reused –Tests can easily be based on existing unit test frameworks Cons: –Custom plumbing code often necessary –Can be too coarse grained –Slow runtime Deployment is necessary Asynchronous aspects has to be handled

Cadec 2007, Test Driven ESB Development, Slide 15 Copyright 2007, Callista Enterprise AB A Real Life Example – Test of Flow in ESB Each test covered one (asynchronous) message flow Tests were run in ESB, using WebSphere MQ as communication protocol Only a few very basic test cases were used –input message –> expected output message Test framework based on JUnit was built Test data was externalized to an XML format

Cadec 2007, Test Driven ESB Development, Slide 16 Copyright 2007, Callista Enterprise AB A Real Life Example - Continued ”Happy days”: 1.Send in one message 2.Listen for the outgoing message 3.Apply filter for irrelevant output, e.g. timestamps 4.Compare the outgoing message with an expected outcome

Cadec 2007, Test Driven ESB Development, Slide 17 Copyright 2007, Callista Enterprise AB A Real Life Example - Continued Negative tests: 1.Send in one message 2.Check for error message 3.Apply filter for irrelevant output, e.g. timestamps 4.Compare with expected error message 5.Check log queue

Cadec 2007, Test Driven ESB Development, Slide 18 Copyright 2007, Callista Enterprise AB Lessons Learned The automated test suite turned out to be a crucial success factor! –Made late changes possible Fine grained tests is a good complement –In our specific environment - quite expensive! Testing each flow as one unit made it simple to reuse test cases –Building a reusable test framework on top of JUnit Externalizing the test data means non programmers can manage the tests. –Integration specialists are not always programmers –The test framework can be reused for acceptance testing

Cadec 2007, Test Driven ESB Development, Slide 19 Copyright 2007, Callista Enterprise AB Lessons Learned - Continued Simple string comparison is not always enough –Filter out parts of the response, e.g. timestamps –XML infoset comparison Ignore differences in whitespaces etc Address conflicts can cause problems –Use specific queues/urls for testing purposes

Cadec 2007, Test Driven ESB Development, Slide 20 Copyright 2007, Callista Enterprise AB Lessons Learned - Choosing a Test Tool Specialized tools are available but often expensive. Certain ESB vendors offer specialized tools. –Often without support for automation. Our recommendation: Reuse an existing unit test framework, e.g. JUnit or NUnit. –IDE integration –Report functionality Necessary plumbing code can be written on top of the framework. –Often reusable between tests.

Cadec 2007, Test Driven ESB Development, Slide 21 Copyright 2007, Callista Enterprise AB Summary Don’t postpone testing the ESB flows! –TDD can be used in this environment as well. Our experience: An automated test suite can be a crucial success factor in a rapid changing world. Be pragmatic –Find out what test configuration works in your environment. –Remember: Rome wasn’t built in a day...

Cadec 2007, Test Driven ESB Development, Slide 22 Copyright 2007, Callista Enterprise AB Bottom Line: Start Testing the ESB Today!