SlideShare a Scribd company logo
© 2010 Torry Harris Business Solutions. All rights reserved Page 1
TORRY HARRIS BUSINESS SOLUTIONS
Unit Testing webMethods
Integrations using JUnit
Practicing TDD for EAI projects
Ganapathi Nanjappa
4/28/2010
© 2010 Torry Harris Business Solutions. All rights reserved Page 2
Table of Contents
1. Abstract .................................................................................................................................................3
2. Introduction...........................................................................................................................................3
3. JUnit wrapper for webMethods............................................................................................................3
4. JUnit test suite for webMethods Services.............................................................................................5
5. Limitations of the JUnit wrapper...........................................................................................................6
6. Conclusion.............................................................................................................................................6
© 2010 Torry Harris Business Solutions. All rights reserved Page 3
1. Abstract
In a very short time, Test Driven Development (TDD) has branched off from Extreme Programming (XP)
and gained a significant prominence among non-XP projects. It is now seen as a practice by itself and
applied to various programming methodologies including RUP and AUP.
In addition to the quality benefits offered by practicing TDD, the unit tests provide a working
specification of the functional code, and a fully functional test suite that can be reused many times over.
This white paper presents a solution to unit test webMethods Flow/Java services using the popular JUnit
test framework, and helps put TDD into practice for Enterprise Application Integration projects.
2. Introduction
JUnit is a unit testing framework for the Java programming language and has played a significant role in
the practice of TDD in Java projects. It provides reusable components to organize and execute test cases
and verify the results.
webMethods Developer is the stand-alone graphical development tool used to build, edit and test
integration logic implemented in the webMethods flow language.
While the webMethods Developer provides various tools for testing and debugging the integration
solutions, it does not provide support for using JUnit from within the Developer. This white paper details
how JUnit can be used for testing services implemented in the webMethods flow/java language.
3. JUnit wrapper for webMethods
As part of the ongoing efforts at the EAI Centre of Excellence at Torry Harris, a JUnit wrapper for
webMethods was developed to test and verify the flow services implemented in the webMethods flow
language. The JUnit Wrapper consists of a single java class named “WMTestClient” and provides
methods to invoke any flow/java service deployed on the webMethods Integration Server (IS). The
wrapper method accepts the input filename for the service under test and converts the file into a format
that webMethods IS understands. The screen shot of a test method is shown below:
© 2010 Torry Harris Business Solutions. All rights reserved Page 4
A sample JUnit test method for testing the “getConnectionStatistics” service.
The wrapper provides all the result variables of the service in a java “Map” and any variable can be used
for asserting the test results. In the above test case, the output variable “TotalConnections” is used for
asserting the test case. The wrapper is generic enough to allow assertion of multiple output cases, as
may be required for services that return multiple values.
The generic wrapper method to test any webMethods flow/java service.
The wrapper accepts input XML file, package and service names as input apart from the optional output
file and location to save the output file. The input files and the test cases are generated by the
developer for the services developed/modified. Input files can be generated from the webMethods
Developer console by selecting the “Save Pipeline” option for the service under test. The output file can
be used for closer inspection of the results and/or for comparing the results with a previous test run.
The input and output file locations configured in the properties file.
© 2010 Torry Harris Business Solutions. All rights reserved Page 5
The properties for the service under test and the server details are stored in a configuration file to allow
changes to the inputs and server to test on without having to recompile the source. It also allows for
easy customizations, for example, the variable to assert and the assertion value can also be made
configurable for each service under test.
4. JUnit test suite for webMethods Services
A JUnit test suite was developed to test a few webMethods in-built services using the wrapper, the
results as shown below:
The result of a JUnit test suite execution that tests various webMethods built-in services.
With JUnit 4, creating a test suite is as easy as adding test methods to a source file. To create a new test
method, any existing test method (like the one shown in the previous section) can be copied and
renamed to reflect the new service under test. The input/output parameters are defined in the
configuration file and the assert variable and value are updated to match the new service.
The unit test suites created as part of different projects can be invoked using ‘ant’
(http://ant.apache.org/) scripts from the command line as and when necessary (this will be mostly done
when there are changes to dependant modules). Various JUnit ant tasks are available to generate
reports on the tests executed. These reports can be used for verification of services tested and the
coverage.
© 2010 Torry Harris Business Solutions. All rights reserved Page 6
5. Limitations of the JUnit wrapper
The JUnit Wrapper for webMethods has the following limitations that JUnit has, it cannot:
Automatically generate tests for a service under test
Automatically generate test data for a service under test
Provide coverage metrics for a webMethods flow/java service
6. Conclusion
Test-driven development is an important practice to delivering high quality code and to enable a flexible
and result-oriented way of development. Apart from verification of code, it provides an automatic
catalog of unit tests that can be regressed.
A test framework for webMethods integrations is even more crucial to simplify and automate unit tests
as integrations work on heterogeneous environment. The framework presented in this paper is simple
to setup and maintain, and enables TDD to be practiced for EAI projects. It uses the features made
available by one of the most popular open-source testing solution and eliminates the need for
developing a custom unit-testing solution for webMethods.

More Related Content

Viewers also liked

Data power Performance Tuning
Data power Performance TuningData power Performance Tuning
Data power Performance Tuning
KINGSHUK MAJUMDER
 
CAF & Portlet Development Notes
CAF & Portlet Development NotesCAF & Portlet Development Notes
CAF & Portlet Development Notes
Vladimir Ivanchenko
 
Top 9 webmethods interview questions answers
Top 9 webmethods interview questions answersTop 9 webmethods interview questions answers
Top 9 webmethods interview questions answers
jonhmart036
 
Using IBM DataPower for rapid security and application integration with an op...
Using IBM DataPower for rapid security and application integration with an op...Using IBM DataPower for rapid security and application integration with an op...
Using IBM DataPower for rapid security and application integration with an op...
Gennadiy Civil
 
Software AG’s webMethods Integration Cloud: Integrate Cloud Apps with ease
Software AG’s webMethods Integration Cloud: Integrate Cloud Apps with ease Software AG’s webMethods Integration Cloud: Integrate Cloud Apps with ease
Software AG’s webMethods Integration Cloud: Integrate Cloud Apps with ease
Kellton Tech Solutions Ltd
 
Command Central Overview
Command Central OverviewCommand Central Overview
Command Central Overview
Software AG
 
OAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPowerOAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPower
Shiu-Fun Poon
 
Presentación webMethods BPMS por Simbius S.A.
Presentación webMethods BPMS por Simbius S.A.Presentación webMethods BPMS por Simbius S.A.
Presentación webMethods BPMS por Simbius S.A.
Simbius SGP
 
Intorduction to Datapower
Intorduction to DatapowerIntorduction to Datapower
Intorduction to Datapower
Shilpin Pvt. Ltd.
 
Data Power Architectural Patterns - Jagadish Vemugunta
Data Power Architectural Patterns - Jagadish VemuguntaData Power Architectural Patterns - Jagadish Vemugunta
Data Power Architectural Patterns - Jagadish Vemugunta
floridawusergroup
 
Datapower Steven Cawn
Datapower Steven CawnDatapower Steven Cawn
Datapower Steven Cawn
Valeri Illescas
 

Viewers also liked (11)

Data power Performance Tuning
Data power Performance TuningData power Performance Tuning
Data power Performance Tuning
 
CAF & Portlet Development Notes
CAF & Portlet Development NotesCAF & Portlet Development Notes
CAF & Portlet Development Notes
 
Top 9 webmethods interview questions answers
Top 9 webmethods interview questions answersTop 9 webmethods interview questions answers
Top 9 webmethods interview questions answers
 
Using IBM DataPower for rapid security and application integration with an op...
Using IBM DataPower for rapid security and application integration with an op...Using IBM DataPower for rapid security and application integration with an op...
Using IBM DataPower for rapid security and application integration with an op...
 
Software AG’s webMethods Integration Cloud: Integrate Cloud Apps with ease
Software AG’s webMethods Integration Cloud: Integrate Cloud Apps with ease Software AG’s webMethods Integration Cloud: Integrate Cloud Apps with ease
Software AG’s webMethods Integration Cloud: Integrate Cloud Apps with ease
 
Command Central Overview
Command Central OverviewCommand Central Overview
Command Central Overview
 
OAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPowerOAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPower
 
Presentación webMethods BPMS por Simbius S.A.
Presentación webMethods BPMS por Simbius S.A.Presentación webMethods BPMS por Simbius S.A.
Presentación webMethods BPMS por Simbius S.A.
 
Intorduction to Datapower
Intorduction to DatapowerIntorduction to Datapower
Intorduction to Datapower
 
Data Power Architectural Patterns - Jagadish Vemugunta
Data Power Architectural Patterns - Jagadish VemuguntaData Power Architectural Patterns - Jagadish Vemugunta
Data Power Architectural Patterns - Jagadish Vemugunta
 
Datapower Steven Cawn
Datapower Steven CawnDatapower Steven Cawn
Datapower Steven Cawn
 

Similar to EAI Test Driven Development WebMethods | Torry Harris Whitepaper

Automation Testing of Web based Application with Selenium and HP UFT (QTP)
Automation Testing of Web based Application with Selenium and HP UFT (QTP)Automation Testing of Web based Application with Selenium and HP UFT (QTP)
Automation Testing of Web based Application with Selenium and HP UFT (QTP)
IRJET Journal
 
New features in qtp11
New features in qtp11New features in qtp11
New features in qtp11
G.C Reddy
 
Front Cover:
Front Cover:Front Cover:
Front Cover:
Jeff Smith
 
Front Cover:
Front Cover:Front Cover:
Front Cover:
Jeff Smith
 
Front Cover:
Front Cover:Front Cover:
Front Cover:
Jeff Smith
 
Performance Test Plan - Sample 2
Performance Test Plan - Sample 2Performance Test Plan - Sample 2
Performance Test Plan - Sample 2
Atul Pant
 
Qtp (2)
Qtp (2)Qtp (2)
Qtp (2)
soujanya k
 
New features in qtp11
New features in qtp11New features in qtp11
New features in qtp11
Ramu Palanki
 
Qtp 11 new enhacements in
Qtp 11 new enhacements inQtp 11 new enhacements in
Qtp 11 new enhacements in
Ramu Palanki
 
DevOps CI Automation Continuous Integration
DevOps CI Automation Continuous IntegrationDevOps CI Automation Continuous Integration
DevOps CI Automation Continuous Integration
IRJET Journal
 
Qtp tutorial
Qtp tutorialQtp tutorial
Qtp tutorial
Olga Palade
 
Qtp questions and answers
Qtp questions and answersQtp questions and answers
Qtp questions and answers
Ramu Palanki
 
A Technique for Testing Composed Web Services Including Footprint
A Technique for Testing Composed Web Services Including FootprintA Technique for Testing Composed Web Services Including Footprint
A Technique for Testing Composed Web Services Including Footprint
IRJET Journal
 
White paper ready api
White paper  ready apiWhite paper  ready api
White paper ready api
Nithin Bijjala
 
STC 2014_ADAPTING TEST AUTOMATION TECHNIQUES TO IMPROVE ORACLE ERP CONFIGURAT...
STC 2014_ADAPTING TEST AUTOMATION TECHNIQUES TO IMPROVE ORACLE ERP CONFIGURAT...STC 2014_ADAPTING TEST AUTOMATION TECHNIQUES TO IMPROVE ORACLE ERP CONFIGURAT...
STC 2014_ADAPTING TEST AUTOMATION TECHNIQUES TO IMPROVE ORACLE ERP CONFIGURAT...
Shivika Khare
 
Open Source Software Testing Tools
Open Source Software Testing ToolsOpen Source Software Testing Tools
Open Source Software Testing Tools
Varuna Harshana
 
Scale and Load Testing of Micro-Service
Scale and Load Testing of Micro-ServiceScale and Load Testing of Micro-Service
Scale and Load Testing of Micro-Service
IRJET Journal
 
Rit 8.5.0 training release notes
Rit 8.5.0 training release notesRit 8.5.0 training release notes
Rit 8.5.0 training release notes
Darrel Rader
 
Marathon Testing Tool
Marathon Testing ToolMarathon Testing Tool
Marathon Testing Tool
narayan dudhe
 
Hybrid framework for test automation
Hybrid framework for test automationHybrid framework for test automation
Hybrid framework for test automation
srivinayak
 

Similar to EAI Test Driven Development WebMethods | Torry Harris Whitepaper (20)

Automation Testing of Web based Application with Selenium and HP UFT (QTP)
Automation Testing of Web based Application with Selenium and HP UFT (QTP)Automation Testing of Web based Application with Selenium and HP UFT (QTP)
Automation Testing of Web based Application with Selenium and HP UFT (QTP)
 
New features in qtp11
New features in qtp11New features in qtp11
New features in qtp11
 
Front Cover:
Front Cover:Front Cover:
Front Cover:
 
Front Cover:
Front Cover:Front Cover:
Front Cover:
 
Front Cover:
Front Cover:Front Cover:
Front Cover:
 
Performance Test Plan - Sample 2
Performance Test Plan - Sample 2Performance Test Plan - Sample 2
Performance Test Plan - Sample 2
 
Qtp (2)
Qtp (2)Qtp (2)
Qtp (2)
 
New features in qtp11
New features in qtp11New features in qtp11
New features in qtp11
 
Qtp 11 new enhacements in
Qtp 11 new enhacements inQtp 11 new enhacements in
Qtp 11 new enhacements in
 
DevOps CI Automation Continuous Integration
DevOps CI Automation Continuous IntegrationDevOps CI Automation Continuous Integration
DevOps CI Automation Continuous Integration
 
Qtp tutorial
Qtp tutorialQtp tutorial
Qtp tutorial
 
Qtp questions and answers
Qtp questions and answersQtp questions and answers
Qtp questions and answers
 
A Technique for Testing Composed Web Services Including Footprint
A Technique for Testing Composed Web Services Including FootprintA Technique for Testing Composed Web Services Including Footprint
A Technique for Testing Composed Web Services Including Footprint
 
White paper ready api
White paper  ready apiWhite paper  ready api
White paper ready api
 
STC 2014_ADAPTING TEST AUTOMATION TECHNIQUES TO IMPROVE ORACLE ERP CONFIGURAT...
STC 2014_ADAPTING TEST AUTOMATION TECHNIQUES TO IMPROVE ORACLE ERP CONFIGURAT...STC 2014_ADAPTING TEST AUTOMATION TECHNIQUES TO IMPROVE ORACLE ERP CONFIGURAT...
STC 2014_ADAPTING TEST AUTOMATION TECHNIQUES TO IMPROVE ORACLE ERP CONFIGURAT...
 
Open Source Software Testing Tools
Open Source Software Testing ToolsOpen Source Software Testing Tools
Open Source Software Testing Tools
 
Scale and Load Testing of Micro-Service
Scale and Load Testing of Micro-ServiceScale and Load Testing of Micro-Service
Scale and Load Testing of Micro-Service
 
Rit 8.5.0 training release notes
Rit 8.5.0 training release notesRit 8.5.0 training release notes
Rit 8.5.0 training release notes
 
Marathon Testing Tool
Marathon Testing ToolMarathon Testing Tool
Marathon Testing Tool
 
Hybrid framework for test automation
Hybrid framework for test automationHybrid framework for test automation
Hybrid framework for test automation
 

More from Torry Harris Business Solutions

Application Rationalization | Torry Harris Whitepaper
Application Rationalization | Torry Harris WhitepaperApplication Rationalization | Torry Harris Whitepaper
Application Rationalization | Torry Harris Whitepaper
Torry Harris Business Solutions
 
Application Oriented Networks: An SOA Perspective | Torry Harris Whitepaper
Application Oriented Networks: An SOA Perspective | Torry Harris WhitepaperApplication Oriented Networks: An SOA Perspective | Torry Harris Whitepaper
Application Oriented Networks: An SOA Perspective | Torry Harris Whitepaper
Torry Harris Business Solutions
 
Outsourcing SOA Implementation | Torry Harris Whitepaper
Outsourcing SOA Implementation | Torry Harris WhitepaperOutsourcing SOA Implementation | Torry Harris Whitepaper
Outsourcing SOA Implementation | Torry Harris Whitepaper
Torry Harris Business Solutions
 
SOA Migration Services | Torry Harris
SOA Migration Services | Torry HarrisSOA Migration Services | Torry Harris
SOA Migration Services | Torry Harris
Torry Harris Business Solutions
 
SOA Roadmap and Education | Torry Harris
SOA Roadmap and Education | Torry HarrisSOA Roadmap and Education | Torry Harris
SOA Roadmap and Education | Torry Harris
Torry Harris Business Solutions
 
SOA Offshore Onsite Delivery Model | Torry Harris Whitepaper
SOA Offshore Onsite Delivery Model | Torry Harris WhitepaperSOA Offshore Onsite Delivery Model | Torry Harris Whitepaper
SOA Offshore Onsite Delivery Model | Torry Harris Whitepaper
Torry Harris Business Solutions
 
SOA Test Methodology | Torry Harris Whitepaper
SOA Test Methodology | Torry Harris WhitepaperSOA Test Methodology | Torry Harris Whitepaper
SOA Test Methodology | Torry Harris Whitepaper
Torry Harris Business Solutions
 
SOA for Retail | Torry Harris Whitepaper
SOA for Retail | Torry Harris WhitepaperSOA for Retail | Torry Harris Whitepaper
SOA for Retail | Torry Harris Whitepaper
Torry Harris Business Solutions
 
SOA for Telecom | Torry Harris Whitepaper
SOA for Telecom | Torry Harris WhitepaperSOA for Telecom | Torry Harris Whitepaper
SOA for Telecom | Torry Harris Whitepaper
Torry Harris Business Solutions
 
A Guide to SOA Governance | Torry Harris Whitepaper
A Guide to SOA Governance | Torry Harris WhitepaperA Guide to SOA Governance | Torry Harris Whitepaper
A Guide to SOA Governance | Torry Harris Whitepaper
Torry Harris Business Solutions
 
SOA Maturity Model | Torry Harris Whitepaper
SOA Maturity Model | Torry Harris WhitepaperSOA Maturity Model | Torry Harris Whitepaper
SOA Maturity Model | Torry Harris Whitepaper
Torry Harris Business Solutions
 
SOA Open Source Implementation | Torry Harris Whitepaper
SOA Open Source Implementation | Torry Harris WhitepaperSOA Open Source Implementation | Torry Harris Whitepaper
SOA Open Source Implementation | Torry Harris Whitepaper
Torry Harris Business Solutions
 
Migration and Security in SOA | Torry Harris Whitepaper
Migration and Security in SOA | Torry Harris WhitepaperMigration and Security in SOA | Torry Harris Whitepaper
Migration and Security in SOA | Torry Harris Whitepaper
Torry Harris Business Solutions
 
Web Services in SOA | Torry Harris
Web Services in SOA | Torry HarrisWeb Services in SOA | Torry Harris
Web Services in SOA | Torry Harris
Torry Harris Business Solutions
 
Cloud Catalyst Programme | Torry Harris Whitepaper
Cloud Catalyst Programme | Torry Harris WhitepaperCloud Catalyst Programme | Torry Harris Whitepaper
Cloud Catalyst Programme | Torry Harris Whitepaper
Torry Harris Business Solutions
 
Cloud Computing Overview | Torry Harris Whitepaper
Cloud Computing Overview | Torry Harris WhitepaperCloud Computing Overview | Torry Harris Whitepaper
Cloud Computing Overview | Torry Harris Whitepaper
Torry Harris Business Solutions
 
Comparison of Cloud Computing Services | Torry Harris Whitepaper
Comparison of Cloud Computing Services | Torry Harris WhitepaperComparison of Cloud Computing Services | Torry Harris Whitepaper
Comparison of Cloud Computing Services | Torry Harris Whitepaper
Torry Harris Business Solutions
 
Eucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris Whitepaper
Eucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris WhitepaperEucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris Whitepaper
Eucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris Whitepaper
Torry Harris Business Solutions
 
BPM - The Soft Science of Change | Torry Harris Whitepaper
BPM - The Soft Science of Change | Torry Harris WhitepaperBPM - The Soft Science of Change | Torry Harris Whitepaper
BPM - The Soft Science of Change | Torry Harris Whitepaper
Torry Harris Business Solutions
 
Web Service Extensions | Torry Harris Whitepaper
Web Service Extensions | Torry Harris WhitepaperWeb Service Extensions | Torry Harris Whitepaper
Web Service Extensions | Torry Harris Whitepaper
Torry Harris Business Solutions
 

More from Torry Harris Business Solutions (20)

Application Rationalization | Torry Harris Whitepaper
Application Rationalization | Torry Harris WhitepaperApplication Rationalization | Torry Harris Whitepaper
Application Rationalization | Torry Harris Whitepaper
 
Application Oriented Networks: An SOA Perspective | Torry Harris Whitepaper
Application Oriented Networks: An SOA Perspective | Torry Harris WhitepaperApplication Oriented Networks: An SOA Perspective | Torry Harris Whitepaper
Application Oriented Networks: An SOA Perspective | Torry Harris Whitepaper
 
Outsourcing SOA Implementation | Torry Harris Whitepaper
Outsourcing SOA Implementation | Torry Harris WhitepaperOutsourcing SOA Implementation | Torry Harris Whitepaper
Outsourcing SOA Implementation | Torry Harris Whitepaper
 
SOA Migration Services | Torry Harris
SOA Migration Services | Torry HarrisSOA Migration Services | Torry Harris
SOA Migration Services | Torry Harris
 
SOA Roadmap and Education | Torry Harris
SOA Roadmap and Education | Torry HarrisSOA Roadmap and Education | Torry Harris
SOA Roadmap and Education | Torry Harris
 
SOA Offshore Onsite Delivery Model | Torry Harris Whitepaper
SOA Offshore Onsite Delivery Model | Torry Harris WhitepaperSOA Offshore Onsite Delivery Model | Torry Harris Whitepaper
SOA Offshore Onsite Delivery Model | Torry Harris Whitepaper
 
SOA Test Methodology | Torry Harris Whitepaper
SOA Test Methodology | Torry Harris WhitepaperSOA Test Methodology | Torry Harris Whitepaper
SOA Test Methodology | Torry Harris Whitepaper
 
SOA for Retail | Torry Harris Whitepaper
SOA for Retail | Torry Harris WhitepaperSOA for Retail | Torry Harris Whitepaper
SOA for Retail | Torry Harris Whitepaper
 
SOA for Telecom | Torry Harris Whitepaper
SOA for Telecom | Torry Harris WhitepaperSOA for Telecom | Torry Harris Whitepaper
SOA for Telecom | Torry Harris Whitepaper
 
A Guide to SOA Governance | Torry Harris Whitepaper
A Guide to SOA Governance | Torry Harris WhitepaperA Guide to SOA Governance | Torry Harris Whitepaper
A Guide to SOA Governance | Torry Harris Whitepaper
 
SOA Maturity Model | Torry Harris Whitepaper
SOA Maturity Model | Torry Harris WhitepaperSOA Maturity Model | Torry Harris Whitepaper
SOA Maturity Model | Torry Harris Whitepaper
 
SOA Open Source Implementation | Torry Harris Whitepaper
SOA Open Source Implementation | Torry Harris WhitepaperSOA Open Source Implementation | Torry Harris Whitepaper
SOA Open Source Implementation | Torry Harris Whitepaper
 
Migration and Security in SOA | Torry Harris Whitepaper
Migration and Security in SOA | Torry Harris WhitepaperMigration and Security in SOA | Torry Harris Whitepaper
Migration and Security in SOA | Torry Harris Whitepaper
 
Web Services in SOA | Torry Harris
Web Services in SOA | Torry HarrisWeb Services in SOA | Torry Harris
Web Services in SOA | Torry Harris
 
Cloud Catalyst Programme | Torry Harris Whitepaper
Cloud Catalyst Programme | Torry Harris WhitepaperCloud Catalyst Programme | Torry Harris Whitepaper
Cloud Catalyst Programme | Torry Harris Whitepaper
 
Cloud Computing Overview | Torry Harris Whitepaper
Cloud Computing Overview | Torry Harris WhitepaperCloud Computing Overview | Torry Harris Whitepaper
Cloud Computing Overview | Torry Harris Whitepaper
 
Comparison of Cloud Computing Services | Torry Harris Whitepaper
Comparison of Cloud Computing Services | Torry Harris WhitepaperComparison of Cloud Computing Services | Torry Harris Whitepaper
Comparison of Cloud Computing Services | Torry Harris Whitepaper
 
Eucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris Whitepaper
Eucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris WhitepaperEucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris Whitepaper
Eucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris Whitepaper
 
BPM - The Soft Science of Change | Torry Harris Whitepaper
BPM - The Soft Science of Change | Torry Harris WhitepaperBPM - The Soft Science of Change | Torry Harris Whitepaper
BPM - The Soft Science of Change | Torry Harris Whitepaper
 
Web Service Extensions | Torry Harris Whitepaper
Web Service Extensions | Torry Harris WhitepaperWeb Service Extensions | Torry Harris Whitepaper
Web Service Extensions | Torry Harris Whitepaper
 

Recently uploaded

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 

EAI Test Driven Development WebMethods | Torry Harris Whitepaper

  • 1. © 2010 Torry Harris Business Solutions. All rights reserved Page 1 TORRY HARRIS BUSINESS SOLUTIONS Unit Testing webMethods Integrations using JUnit Practicing TDD for EAI projects Ganapathi Nanjappa 4/28/2010
  • 2. © 2010 Torry Harris Business Solutions. All rights reserved Page 2 Table of Contents 1. Abstract .................................................................................................................................................3 2. Introduction...........................................................................................................................................3 3. JUnit wrapper for webMethods............................................................................................................3 4. JUnit test suite for webMethods Services.............................................................................................5 5. Limitations of the JUnit wrapper...........................................................................................................6 6. Conclusion.............................................................................................................................................6
  • 3. © 2010 Torry Harris Business Solutions. All rights reserved Page 3 1. Abstract In a very short time, Test Driven Development (TDD) has branched off from Extreme Programming (XP) and gained a significant prominence among non-XP projects. It is now seen as a practice by itself and applied to various programming methodologies including RUP and AUP. In addition to the quality benefits offered by practicing TDD, the unit tests provide a working specification of the functional code, and a fully functional test suite that can be reused many times over. This white paper presents a solution to unit test webMethods Flow/Java services using the popular JUnit test framework, and helps put TDD into practice for Enterprise Application Integration projects. 2. Introduction JUnit is a unit testing framework for the Java programming language and has played a significant role in the practice of TDD in Java projects. It provides reusable components to organize and execute test cases and verify the results. webMethods Developer is the stand-alone graphical development tool used to build, edit and test integration logic implemented in the webMethods flow language. While the webMethods Developer provides various tools for testing and debugging the integration solutions, it does not provide support for using JUnit from within the Developer. This white paper details how JUnit can be used for testing services implemented in the webMethods flow/java language. 3. JUnit wrapper for webMethods As part of the ongoing efforts at the EAI Centre of Excellence at Torry Harris, a JUnit wrapper for webMethods was developed to test and verify the flow services implemented in the webMethods flow language. The JUnit Wrapper consists of a single java class named “WMTestClient” and provides methods to invoke any flow/java service deployed on the webMethods Integration Server (IS). The wrapper method accepts the input filename for the service under test and converts the file into a format that webMethods IS understands. The screen shot of a test method is shown below:
  • 4. © 2010 Torry Harris Business Solutions. All rights reserved Page 4 A sample JUnit test method for testing the “getConnectionStatistics” service. The wrapper provides all the result variables of the service in a java “Map” and any variable can be used for asserting the test results. In the above test case, the output variable “TotalConnections” is used for asserting the test case. The wrapper is generic enough to allow assertion of multiple output cases, as may be required for services that return multiple values. The generic wrapper method to test any webMethods flow/java service. The wrapper accepts input XML file, package and service names as input apart from the optional output file and location to save the output file. The input files and the test cases are generated by the developer for the services developed/modified. Input files can be generated from the webMethods Developer console by selecting the “Save Pipeline” option for the service under test. The output file can be used for closer inspection of the results and/or for comparing the results with a previous test run. The input and output file locations configured in the properties file.
  • 5. © 2010 Torry Harris Business Solutions. All rights reserved Page 5 The properties for the service under test and the server details are stored in a configuration file to allow changes to the inputs and server to test on without having to recompile the source. It also allows for easy customizations, for example, the variable to assert and the assertion value can also be made configurable for each service under test. 4. JUnit test suite for webMethods Services A JUnit test suite was developed to test a few webMethods in-built services using the wrapper, the results as shown below: The result of a JUnit test suite execution that tests various webMethods built-in services. With JUnit 4, creating a test suite is as easy as adding test methods to a source file. To create a new test method, any existing test method (like the one shown in the previous section) can be copied and renamed to reflect the new service under test. The input/output parameters are defined in the configuration file and the assert variable and value are updated to match the new service. The unit test suites created as part of different projects can be invoked using ‘ant’ (http://ant.apache.org/) scripts from the command line as and when necessary (this will be mostly done when there are changes to dependant modules). Various JUnit ant tasks are available to generate reports on the tests executed. These reports can be used for verification of services tested and the coverage.
  • 6. © 2010 Torry Harris Business Solutions. All rights reserved Page 6 5. Limitations of the JUnit wrapper The JUnit Wrapper for webMethods has the following limitations that JUnit has, it cannot: Automatically generate tests for a service under test Automatically generate test data for a service under test Provide coverage metrics for a webMethods flow/java service 6. Conclusion Test-driven development is an important practice to delivering high quality code and to enable a flexible and result-oriented way of development. Apart from verification of code, it provides an automatic catalog of unit tests that can be regressed. A test framework for webMethods integrations is even more crucial to simplify and automate unit tests as integrations work on heterogeneous environment. The framework presented in this paper is simple to setup and maintain, and enables TDD to be practiced for EAI projects. It uses the features made available by one of the most popular open-source testing solution and eliminates the need for developing a custom unit-testing solution for webMethods.