SlideShare a Scribd company logo
1 of 22
Testing - Mule
Presented By
Sindhu VL
Testing :
• This section describes how to test your Mule
application.
• Introduction to Testing Mule
• Unit Testing
• Functional Testing
• Testing Strategies
• MUnit
1. Introduction to Testing Mule :
• Typically, existing, bundled tests can fill many of
your testing requirements.
Thesrc/test/ directory in every Mule ESB Maven
project incorporates both unit and functional
tests. The included Maven tests project contains
additional useful functional and integration
tests.
Types of Testing :
• You can leverage the following bundled tests when
configuring and customizing Mule:
• Unit testing of your simple extensions and
customizations
• Functional testing of your Mule configuration and setup
• Functional and unit testing of your custom modules and
transports
• Integration testing of multiple modules, transports, and
transformers, etc.
• System testing of transports that connect to embedded
or external services
• Stress and performance testing
Performance Tests :
• After you have ensured that your setup and
configuration are correct and that your
customizations work correctly, verify that your
system is performing as intended. RunJapex
benchmark tests to test individual packages.
Additionally, the Mule Profiler Packcan identify
memory leaks in your customizations.
Using MuleForge for Continuous
Integration Testing :
• If you host your Mule project on MuleForge, you can
take advantage of continuous integration testing.
MuleForge automatically builds hosted projects
using Bamboo, a Continuous Integration Build
Server from Atlassian. The build frequency for
source code is every 30 minutes, while the snapshot
build frequency is once per day. You can request
different frequencies for your individual project.
• For more information on hosting your project,
visit MuleForge.
2. Unit Testing :
• Mule ESB provides a Test Compatibility Kit
(TCK) of unit tests that you can use to test your
simple extensions as well as your custom
modules and transports. The unit tests are
located in the -tests.jar file, such as mule-core-
3.0.0-tests.jar for Mule version 3.0.0. All unit
tests inherit
from org.mule.tck.AbstractMuleTestCase
• These unit tests are beneficial for the following
reasons:
• Components tested with a TCK test case ensure that the
common behavior of the component is compatible with the
Mule framework.
• Using a TCK test case allows the developer to concentrate on
writing tests for specific behavior of their component.
• Where testing of a method in the Component API cannot be
tested by the TCK test case, the test cases provides an abstract
method for the test, ensuring the developer tests all areas of
the component.
• The TCK provides a default test model that is a simple set of
test classes. The developer doesn’t need to worry about
writing new test classes for their test cases each time.
• The abstract test cases in the TCK use JUnit’s TestCase, so
they are compatible with other test cases.
unit tests in the Mule TCK:
Testing Component : Description :
• AbstractMuleTestCase • A helper test case providing
methods for creating test and
mock object types. This is the
base class for all other abstract
TCK classes.
unit tests in the Mule TCK:
Testing Component : Description :
• AbstractConnectorTestCase • Used to test the common
behavior of a connector. This
tests dispatching and sending
events using mock objects.
unit tests in the Mule TCK:
Testing Component : Description :
• AbstractMuleMessageFactoryT
estCase
• Provides tests for all the
standard methods defined in
theMuleMessageFactory interf
ace. Add specific tests for
converting your transport
message to a MuleMessage in
your subclass.
unit tests in the Mule TCK:
Testing Component : Description :
• AbstractMessageReceiverTest
Case
• Used to test the common
behavior of aMessageReceiver.
This tests receiving messages
using mock objects.
unit tests in the Mule TCK:
Testing Component : Description :
• AbstractComponentTestCase • This is the base class for unit tests
that test custom component
implementations. Concrete
subclasses of this base class
includeDefaultJavaComponentTest
Case,PooledJavaComponentTestCas
e,
andSimpleCallableJavaComponentT
estCase, each of which contains
methods for testing that component
type. For example,
theDefaultJavaComponentTestCasei
ncludes methods for testing the
creation, lifecycle, and disposal of a
basic Java component.
unit tests in the Mule TCK:
Testing Component : Description :
• AbstractTransformerTestCase • Used to test transformers. This
class defines a number of tests
that ensures that the
transformer works in single
scenarios as well as in round
trip scenarios. There are many
concrete sub-classes of this
abstract class that test specific
types of transformers, such
asStringByteArrayTransformer
sTestCase.
unit tests in the Mule TCK:
Testing Component : Description :
• DefaultMuleContextTestCase • Tests the creation and disposal
of the Mule context.
3. Functional Testing :
• Because Mule ESB is light-weight and embeddable,
it is easy to run a Mule Server inside a test case.
Mule provides an abstract JUnit test case
calledorg.mule.tck.junit4.FunctionalTestCase that
runs Mule inside a test case and manages the
lifecycle of the server.
The org.mule.tck.functional package contains a
number of supporting classes for functionally testing
Mule code, includingFunctionalTestComponent.
These classes are described in more detail in the
following sections.
FunctionalTestComponent :
• The previous example of FunctionalTestCase
covers many common (synchronous) test
scenarios, where the flow responds directly to
the caller. FunctionalTestComponent can help
support richer tests, such as:
• Simulating asynchronous communication
• Returning mock data to the caller
• Common scenarios such as forced exceptions,
storing message history, appending text to
responses, and delayed responses.
4. Testing Strategies :
• Building a comprehensive suite of automated tests for your Mule
project is the primary factor that will ensure its longevity: you’ll gain
the security of a safety net catching any regression or incompatible
change in your applications before they even leave your workstation.
• We’ll look at testing under three different aspects:
• *Unit testing: these tests are designed to be fast, with a very narrow
system under test. Mule is typically not run for unit tests.
*Functional testing: these tests usually involve running Mule,
though with a limited configuration, and should run fast enough to
be executed on each build.
*Integration testing: these tests exercise a full Mule application with
settings that are as close to production as possible. They are usually
slower to run and not part of the regular build
Unit Testing :
• In a Mule application, unit testing is limited to the code
that can be realistically exercised without the need to run
it inside Mule itself. As a rule of thumb, code that is Mule
aware (for example, code that relies on the registry), will
better be exercised with a functional test
• With this in mind, the following are good candidates for
unit testing:
• *Custom transformers
*Custom components
*Custom expression evaluators
*All the Spring beans that your Mule application will use.
Typically, these beans come as part of a dependency JAR
and are tested while being built, alleviating the need for
re-retesting them in your Mule application project
Functional Testing :
• Functional tests are those that most extensively
exercise your application configuration. In these
tests, you’ll have the freedom and tools for
simulating happy and unhappy paths.
• The "paths" that you will be interested to cover
include:
• *Message flows
*Rule-based routing, including validation
handling within these flows
*Error handling
5. Munit :
• Munit is Beta-version Mule testing framework that allows
you to:
• mock the output of your message processors
• write tests in XML or Java
• create tests in the Anypoint Studio drag-and-drop interface
• insert spy functionality to track what happens before and after
a message processor is called
• view coverage reports in Studio
• run tests with your plugins
• access detailed Mule stacktraces that pinpoint message
processor failures
• integrate with Maven and Surefire for continuous integration
support
Thank You!!!!!!!

More Related Content

What's hot

Mule enterprise service introduction
Mule enterprise service introductionMule enterprise service introduction
Mule enterprise service introductionSon Nguyen
 
Mule Jetty transport
Mule Jetty transportMule Jetty transport
Mule Jetty transportAnkush Sharma
 
Testing mule
Testing   muleTesting   mule
Testing muleSindhu VL
 
Mule Microsoft Share Point 2010 Connector
Mule Microsoft Share Point 2010 ConnectorMule Microsoft Share Point 2010 Connector
Mule Microsoft Share Point 2010 ConnectorAnkush Sharma
 
Connectors in mule
Connectors in muleConnectors in mule
Connectors in muleSindhu VL
 
Mule concepts components
Mule concepts componentsMule concepts components
Mule concepts componentskunal vishe
 
Rabbit Mq in Mule
Rabbit Mq in MuleRabbit Mq in Mule
Rabbit Mq in MuleMohammed246
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esbRaviShankar Mishra
 
Introduction testingmule
Introduction testingmuleIntroduction testingmule
Introduction testingmuleSrikrishna k
 
Mule Collection Splitter
Mule Collection SplitterMule Collection Splitter
Mule Collection SplitterAnkush Sharma
 
Mule concepts flows
Mule concepts flowsMule concepts flows
Mule concepts flowskunal vishe
 
Mule soft esb – data validation best practices
Mule soft esb – data validation best practicesMule soft esb – data validation best practices
Mule soft esb – data validation best practicesalfa
 
Mule system properties
Mule system propertiesMule system properties
Mule system propertiesGandham38
 

What's hot (18)

Mule enterprise service introduction
Mule enterprise service introductionMule enterprise service introduction
Mule enterprise service introduction
 
Mule message
Mule messageMule message
Mule message
 
Mule Jetty transport
Mule Jetty transportMule Jetty transport
Mule Jetty transport
 
Testing mule
Testing   muleTesting   mule
Testing mule
 
Mule Microsoft Share Point 2010 Connector
Mule Microsoft Share Point 2010 ConnectorMule Microsoft Share Point 2010 Connector
Mule Microsoft Share Point 2010 Connector
 
Connectors in mule
Connectors in muleConnectors in mule
Connectors in mule
 
Mule concepts components
Mule concepts componentsMule concepts components
Mule concepts components
 
Rabbit Mq in Mule
Rabbit Mq in MuleRabbit Mq in Mule
Rabbit Mq in Mule
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Introduction testingmule
Introduction testingmuleIntroduction testingmule
Introduction testingmule
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule Collection Splitter
Mule Collection SplitterMule Collection Splitter
Mule Collection Splitter
 
Mule concepts flows
Mule concepts flowsMule concepts flows
Mule concepts flows
 
Mule soft esb – data validation best practices
Mule soft esb – data validation best practicesMule soft esb – data validation best practices
Mule soft esb – data validation best practices
 
Mule rabbit mq
Mule rabbit mqMule rabbit mq
Mule rabbit mq
 
Mule system properties
Mule system propertiesMule system properties
Mule system properties
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule esb
Mule esbMule esb
Mule esb
 

Viewers also liked

Mule for beginners
Mule for beginnersMule for beginners
Mule for beginnersSindhu VL
 
Bindings of components in mule
Bindings of components in muleBindings of components in mule
Bindings of components in muleSindhu VL
 
Debugging mule
Debugging   muleDebugging   mule
Debugging muleSindhu VL
 
File connector mule
File connector   muleFile connector   mule
File connector muleSindhu VL
 
Enterprise service bus mule
Enterprise service bus  muleEnterprise service bus  mule
Enterprise service bus muleSindhu VL
 
Content based routing tutorial in mule
Content based routing tutorial in muleContent based routing tutorial in mule
Content based routing tutorial in muleSindhu VL
 
Mule debugging
Mule   debuggingMule   debugging
Mule debuggingSindhu VL
 
Using maven with mule
Using maven with muleUsing maven with mule
Using maven with muleSindhu VL
 
Using flows for service orchestration
Using flows for service orchestrationUsing flows for service orchestration
Using flows for service orchestrationSindhu VL
 
Working of mule
Working of muleWorking of mule
Working of muleSindhu VL
 
Concepts in mule
Concepts in muleConcepts in mule
Concepts in muleSindhu VL
 
Mule testing
Mule   testingMule   testing
Mule testingSindhu VL
 
Configuration patterns in mule
Configuration patterns in muleConfiguration patterns in mule
Configuration patterns in muleSindhu VL
 
Xslt elements
Xslt elementsXslt elements
Xslt elementsSindhu VL
 
Mule concepts
Mule conceptsMule concepts
Mule conceptsSindhu VL
 
Quartz connector mule
Quartz connector   muleQuartz connector   mule
Quartz connector muleSindhu VL
 
Groovy component
Groovy componentGroovy component
Groovy componentSindhu VL
 
Mule esb enterprise
Mule esb enterpriseMule esb enterprise
Mule esb enterpriseSindhu VL
 

Viewers also liked (20)

Mule for beginners
Mule for beginnersMule for beginners
Mule for beginners
 
Bindings of components in mule
Bindings of components in muleBindings of components in mule
Bindings of components in mule
 
Debugging mule
Debugging   muleDebugging   mule
Debugging mule
 
File connector mule
File connector   muleFile connector   mule
File connector mule
 
Enterprise service bus mule
Enterprise service bus  muleEnterprise service bus  mule
Enterprise service bus mule
 
Content based routing tutorial in mule
Content based routing tutorial in muleContent based routing tutorial in mule
Content based routing tutorial in mule
 
Mule debugging
Mule   debuggingMule   debugging
Mule debugging
 
Using maven with mule
Using maven with muleUsing maven with mule
Using maven with mule
 
Using flows for service orchestration
Using flows for service orchestrationUsing flows for service orchestration
Using flows for service orchestration
 
Working of mule
Working of muleWorking of mule
Working of mule
 
Concepts in mule
Concepts in muleConcepts in mule
Concepts in mule
 
Mule testing
Mule   testingMule   testing
Mule testing
 
Mule errors
Mule errorsMule errors
Mule errors
 
Munit
MunitMunit
Munit
 
Configuration patterns in mule
Configuration patterns in muleConfiguration patterns in mule
Configuration patterns in mule
 
Xslt elements
Xslt elementsXslt elements
Xslt elements
 
Mule concepts
Mule conceptsMule concepts
Mule concepts
 
Quartz connector mule
Quartz connector   muleQuartz connector   mule
Quartz connector mule
 
Groovy component
Groovy componentGroovy component
Groovy component
 
Mule esb enterprise
Mule esb enterpriseMule esb enterprise
Mule esb enterprise
 

Similar to Testing mule

Introduction to testing mule
Introduction to testing muleIntroduction to testing mule
Introduction to testing muleRamakrishna kapa
 
Testing Frameworks
Testing FrameworksTesting Frameworks
Testing FrameworksMoataz Nabil
 
How to test models using php unit testing framework?
How to test models using php unit testing framework?How to test models using php unit testing framework?
How to test models using php unit testing framework?satejsahu
 
Software Testing Strategy
Software Testing StrategySoftware Testing Strategy
Software Testing StrategyAjeng Savitri
 
Test driven development and unit testing with examples in C++
Test driven development and unit testing with examples in C++Test driven development and unit testing with examples in C++
Test driven development and unit testing with examples in C++Hong Le Van
 
Testing strategies part -1
Testing strategies part -1Testing strategies part -1
Testing strategies part -1Divya Tiwari
 
Automated testing overview
Automated testing overviewAutomated testing overview
Automated testing overviewAlex Pop
 
Unit testing using Munit Part 1
Unit testing using Munit Part 1Unit testing using Munit Part 1
Unit testing using Munit Part 1Anand kalla
 
Introduction to Total Data Driven Test Automation
Introduction to Total Data Driven Test AutomationIntroduction to Total Data Driven Test Automation
Introduction to Total Data Driven Test AutomationVNITO Alliance
 
Laravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsLaravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsMuhammad Shehata
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsSteven Li
 

Similar to Testing mule (20)

Introduction to testing mule
Introduction to testing muleIntroduction to testing mule
Introduction to testing mule
 
Testing Frameworks
Testing FrameworksTesting Frameworks
Testing Frameworks
 
Software automation
Software automationSoftware automation
Software automation
 
Mule testing
Mule testingMule testing
Mule testing
 
How to test models using php unit testing framework?
How to test models using php unit testing framework?How to test models using php unit testing framework?
How to test models using php unit testing framework?
 
Software Testing Strategy
Software Testing StrategySoftware Testing Strategy
Software Testing Strategy
 
Soa
SoaSoa
Soa
 
Test driven development and unit testing with examples in C++
Test driven development and unit testing with examples in C++Test driven development and unit testing with examples in C++
Test driven development and unit testing with examples in C++
 
Testing strategies part -1
Testing strategies part -1Testing strategies part -1
Testing strategies part -1
 
Mule esb munit
Mule esb munitMule esb munit
Mule esb munit
 
Testing Angular
Testing AngularTesting Angular
Testing Angular
 
Automated testing overview
Automated testing overviewAutomated testing overview
Automated testing overview
 
Unit testing using Munit Part 1
Unit testing using Munit Part 1Unit testing using Munit Part 1
Unit testing using Munit Part 1
 
Munit_in_mule_naveen
Munit_in_mule_naveenMunit_in_mule_naveen
Munit_in_mule_naveen
 
Introduction to Total Data Driven Test Automation
Introduction to Total Data Driven Test AutomationIntroduction to Total Data Driven Test Automation
Introduction to Total Data Driven Test Automation
 
Laravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsLaravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and Tools
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementations
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule ctf
Mule  ctfMule  ctf
Mule ctf
 

More from Sindhu VL

Mule - error handling
Mule - error handling Mule - error handling
Mule - error handling Sindhu VL
 
Mule - beginners guide
Mule - beginners guideMule - beginners guide
Mule - beginners guideSindhu VL
 
Core concepts - mule
Core concepts - muleCore concepts - mule
Core concepts - muleSindhu VL
 
Error handling with respect to mule
Error handling with respect to muleError handling with respect to mule
Error handling with respect to muleSindhu VL
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in muleSindhu VL
 
Basics of mule for beginners
Basics of mule for beginnersBasics of mule for beginners
Basics of mule for beginnersSindhu VL
 
Mule securing
Mule   securingMule   securing
Mule securingSindhu VL
 
Service orchestration by using flows
Service orchestration by using flowsService orchestration by using flows
Service orchestration by using flowsSindhu VL
 
Using mule configuration patterns
Using mule configuration patternsUsing mule configuration patterns
Using mule configuration patternsSindhu VL
 
Component bindings in mule
Component bindings in muleComponent bindings in mule
Component bindings in muleSindhu VL
 
Mule requestor component
Mule requestor componentMule requestor component
Mule requestor componentSindhu VL
 
Encrption in mule
Encrption in muleEncrption in mule
Encrption in muleSindhu VL
 
Mule esb for beginners
Mule esb for beginnersMule esb for beginners
Mule esb for beginnersSindhu VL
 
Design flows in mule
Design flows in muleDesign flows in mule
Design flows in muleSindhu VL
 
Flows in mule
Flows in muleFlows in mule
Flows in muleSindhu VL
 
Flows and subflows in mule
Flows and subflows in muleFlows and subflows in mule
Flows and subflows in muleSindhu VL
 

More from Sindhu VL (17)

Mule - error handling
Mule - error handling Mule - error handling
Mule - error handling
 
Mule - beginners guide
Mule - beginners guideMule - beginners guide
Mule - beginners guide
 
Core concepts - mule
Core concepts - muleCore concepts - mule
Core concepts - mule
 
Error handling with respect to mule
Error handling with respect to muleError handling with respect to mule
Error handling with respect to mule
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in mule
 
Basics of mule for beginners
Basics of mule for beginnersBasics of mule for beginners
Basics of mule for beginners
 
Mule securing
Mule   securingMule   securing
Mule securing
 
Service orchestration by using flows
Service orchestration by using flowsService orchestration by using flows
Service orchestration by using flows
 
Using mule configuration patterns
Using mule configuration patternsUsing mule configuration patterns
Using mule configuration patterns
 
Component bindings in mule
Component bindings in muleComponent bindings in mule
Component bindings in mule
 
Mule requestor component
Mule requestor componentMule requestor component
Mule requestor component
 
Encrption in mule
Encrption in muleEncrption in mule
Encrption in mule
 
Mule esb for beginners
Mule esb for beginnersMule esb for beginners
Mule esb for beginners
 
Design flows in mule
Design flows in muleDesign flows in mule
Design flows in mule
 
Xslt mule
Xslt   muleXslt   mule
Xslt mule
 
Flows in mule
Flows in muleFlows in mule
Flows in mule
 
Flows and subflows in mule
Flows and subflows in muleFlows and subflows in mule
Flows and subflows in mule
 

Recently uploaded

Introduction-to-Canva-and-Graphic-Design-Basics.pptx
Introduction-to-Canva-and-Graphic-Design-Basics.pptxIntroduction-to-Canva-and-Graphic-Design-Basics.pptx
Introduction-to-Canva-and-Graphic-Design-Basics.pptxnewslab143
 
ARt app | UX Case Study
ARt app | UX Case StudyARt app | UX Case Study
ARt app | UX Case StudySophia Viganò
 
Revit Understanding Reference Planes and Reference lines in Revit for Family ...
Revit Understanding Reference Planes and Reference lines in Revit for Family ...Revit Understanding Reference Planes and Reference lines in Revit for Family ...
Revit Understanding Reference Planes and Reference lines in Revit for Family ...Narsimha murthy
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Rndexperts
 
call girls in Harsh Vihar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Harsh Vihar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Harsh Vihar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Harsh Vihar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一Fi sss
 
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一F La
 
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Gariahat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Roomdivyansh0kumar0
 
Call Girls Meghani Nagar 7397865700 Independent Call Girls
Call Girls Meghani Nagar 7397865700  Independent Call GirlsCall Girls Meghani Nagar 7397865700  Independent Call Girls
Call Girls Meghani Nagar 7397865700 Independent Call Girlsssuser7cb4ff
 
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...babafaisel
 
Abu Dhabi Call Girls O58993O4O2 Call Girls in Abu Dhabi`
Abu Dhabi Call Girls O58993O4O2 Call Girls in Abu Dhabi`Abu Dhabi Call Girls O58993O4O2 Call Girls in Abu Dhabi`
Abu Dhabi Call Girls O58993O4O2 Call Girls in Abu Dhabi`dajasot375
 
Design Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryDesign Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryWilliamVickery6
 
WAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsWAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsCharles Obaleagbon
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpmainac1
 
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130Suhani Kapoor
 
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...Amil baba
 
shot list for my tv series two steps back
shot list for my tv series two steps backshot list for my tv series two steps back
shot list for my tv series two steps back17lcow074
 
3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdf3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdfSwaraliBorhade
 
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)jennyeacort
 
NATA 2024 SYLLABUS, full syllabus explained in detail
NATA 2024 SYLLABUS, full syllabus explained in detailNATA 2024 SYLLABUS, full syllabus explained in detail
NATA 2024 SYLLABUS, full syllabus explained in detailDesigntroIntroducing
 

Recently uploaded (20)

Introduction-to-Canva-and-Graphic-Design-Basics.pptx
Introduction-to-Canva-and-Graphic-Design-Basics.pptxIntroduction-to-Canva-and-Graphic-Design-Basics.pptx
Introduction-to-Canva-and-Graphic-Design-Basics.pptx
 
ARt app | UX Case Study
ARt app | UX Case StudyARt app | UX Case Study
ARt app | UX Case Study
 
Revit Understanding Reference Planes and Reference lines in Revit for Family ...
Revit Understanding Reference Planes and Reference lines in Revit for Family ...Revit Understanding Reference Planes and Reference lines in Revit for Family ...
Revit Understanding Reference Planes and Reference lines in Revit for Family ...
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025
 
call girls in Harsh Vihar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Harsh Vihar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Harsh Vihar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Harsh Vihar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
 
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
 
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Gariahat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
 
Call Girls Meghani Nagar 7397865700 Independent Call Girls
Call Girls Meghani Nagar 7397865700  Independent Call GirlsCall Girls Meghani Nagar 7397865700  Independent Call Girls
Call Girls Meghani Nagar 7397865700 Independent Call Girls
 
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
 
Abu Dhabi Call Girls O58993O4O2 Call Girls in Abu Dhabi`
Abu Dhabi Call Girls O58993O4O2 Call Girls in Abu Dhabi`Abu Dhabi Call Girls O58993O4O2 Call Girls in Abu Dhabi`
Abu Dhabi Call Girls O58993O4O2 Call Girls in Abu Dhabi`
 
Design Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryDesign Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William Vickery
 
WAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsWAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past Questions
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUp
 
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
 
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...
 
shot list for my tv series two steps back
shot list for my tv series two steps backshot list for my tv series two steps back
shot list for my tv series two steps back
 
3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdf3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdf
 
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
 
NATA 2024 SYLLABUS, full syllabus explained in detail
NATA 2024 SYLLABUS, full syllabus explained in detailNATA 2024 SYLLABUS, full syllabus explained in detail
NATA 2024 SYLLABUS, full syllabus explained in detail
 

Testing mule

  • 2. Testing : • This section describes how to test your Mule application. • Introduction to Testing Mule • Unit Testing • Functional Testing • Testing Strategies • MUnit
  • 3. 1. Introduction to Testing Mule : • Typically, existing, bundled tests can fill many of your testing requirements. Thesrc/test/ directory in every Mule ESB Maven project incorporates both unit and functional tests. The included Maven tests project contains additional useful functional and integration tests.
  • 4. Types of Testing : • You can leverage the following bundled tests when configuring and customizing Mule: • Unit testing of your simple extensions and customizations • Functional testing of your Mule configuration and setup • Functional and unit testing of your custom modules and transports • Integration testing of multiple modules, transports, and transformers, etc. • System testing of transports that connect to embedded or external services • Stress and performance testing
  • 5. Performance Tests : • After you have ensured that your setup and configuration are correct and that your customizations work correctly, verify that your system is performing as intended. RunJapex benchmark tests to test individual packages. Additionally, the Mule Profiler Packcan identify memory leaks in your customizations.
  • 6. Using MuleForge for Continuous Integration Testing : • If you host your Mule project on MuleForge, you can take advantage of continuous integration testing. MuleForge automatically builds hosted projects using Bamboo, a Continuous Integration Build Server from Atlassian. The build frequency for source code is every 30 minutes, while the snapshot build frequency is once per day. You can request different frequencies for your individual project. • For more information on hosting your project, visit MuleForge.
  • 7. 2. Unit Testing : • Mule ESB provides a Test Compatibility Kit (TCK) of unit tests that you can use to test your simple extensions as well as your custom modules and transports. The unit tests are located in the -tests.jar file, such as mule-core- 3.0.0-tests.jar for Mule version 3.0.0. All unit tests inherit from org.mule.tck.AbstractMuleTestCase • These unit tests are beneficial for the following reasons:
  • 8. • Components tested with a TCK test case ensure that the common behavior of the component is compatible with the Mule framework. • Using a TCK test case allows the developer to concentrate on writing tests for specific behavior of their component. • Where testing of a method in the Component API cannot be tested by the TCK test case, the test cases provides an abstract method for the test, ensuring the developer tests all areas of the component. • The TCK provides a default test model that is a simple set of test classes. The developer doesn’t need to worry about writing new test classes for their test cases each time. • The abstract test cases in the TCK use JUnit’s TestCase, so they are compatible with other test cases.
  • 9. unit tests in the Mule TCK: Testing Component : Description : • AbstractMuleTestCase • A helper test case providing methods for creating test and mock object types. This is the base class for all other abstract TCK classes.
  • 10. unit tests in the Mule TCK: Testing Component : Description : • AbstractConnectorTestCase • Used to test the common behavior of a connector. This tests dispatching and sending events using mock objects.
  • 11. unit tests in the Mule TCK: Testing Component : Description : • AbstractMuleMessageFactoryT estCase • Provides tests for all the standard methods defined in theMuleMessageFactory interf ace. Add specific tests for converting your transport message to a MuleMessage in your subclass.
  • 12. unit tests in the Mule TCK: Testing Component : Description : • AbstractMessageReceiverTest Case • Used to test the common behavior of aMessageReceiver. This tests receiving messages using mock objects.
  • 13. unit tests in the Mule TCK: Testing Component : Description : • AbstractComponentTestCase • This is the base class for unit tests that test custom component implementations. Concrete subclasses of this base class includeDefaultJavaComponentTest Case,PooledJavaComponentTestCas e, andSimpleCallableJavaComponentT estCase, each of which contains methods for testing that component type. For example, theDefaultJavaComponentTestCasei ncludes methods for testing the creation, lifecycle, and disposal of a basic Java component.
  • 14. unit tests in the Mule TCK: Testing Component : Description : • AbstractTransformerTestCase • Used to test transformers. This class defines a number of tests that ensures that the transformer works in single scenarios as well as in round trip scenarios. There are many concrete sub-classes of this abstract class that test specific types of transformers, such asStringByteArrayTransformer sTestCase.
  • 15. unit tests in the Mule TCK: Testing Component : Description : • DefaultMuleContextTestCase • Tests the creation and disposal of the Mule context.
  • 16. 3. Functional Testing : • Because Mule ESB is light-weight and embeddable, it is easy to run a Mule Server inside a test case. Mule provides an abstract JUnit test case calledorg.mule.tck.junit4.FunctionalTestCase that runs Mule inside a test case and manages the lifecycle of the server. The org.mule.tck.functional package contains a number of supporting classes for functionally testing Mule code, includingFunctionalTestComponent. These classes are described in more detail in the following sections.
  • 17. FunctionalTestComponent : • The previous example of FunctionalTestCase covers many common (synchronous) test scenarios, where the flow responds directly to the caller. FunctionalTestComponent can help support richer tests, such as: • Simulating asynchronous communication • Returning mock data to the caller • Common scenarios such as forced exceptions, storing message history, appending text to responses, and delayed responses.
  • 18. 4. Testing Strategies : • Building a comprehensive suite of automated tests for your Mule project is the primary factor that will ensure its longevity: you’ll gain the security of a safety net catching any regression or incompatible change in your applications before they even leave your workstation. • We’ll look at testing under three different aspects: • *Unit testing: these tests are designed to be fast, with a very narrow system under test. Mule is typically not run for unit tests. *Functional testing: these tests usually involve running Mule, though with a limited configuration, and should run fast enough to be executed on each build. *Integration testing: these tests exercise a full Mule application with settings that are as close to production as possible. They are usually slower to run and not part of the regular build
  • 19. Unit Testing : • In a Mule application, unit testing is limited to the code that can be realistically exercised without the need to run it inside Mule itself. As a rule of thumb, code that is Mule aware (for example, code that relies on the registry), will better be exercised with a functional test • With this in mind, the following are good candidates for unit testing: • *Custom transformers *Custom components *Custom expression evaluators *All the Spring beans that your Mule application will use. Typically, these beans come as part of a dependency JAR and are tested while being built, alleviating the need for re-retesting them in your Mule application project
  • 20. Functional Testing : • Functional tests are those that most extensively exercise your application configuration. In these tests, you’ll have the freedom and tools for simulating happy and unhappy paths. • The "paths" that you will be interested to cover include: • *Message flows *Rule-based routing, including validation handling within these flows *Error handling
  • 21. 5. Munit : • Munit is Beta-version Mule testing framework that allows you to: • mock the output of your message processors • write tests in XML or Java • create tests in the Anypoint Studio drag-and-drop interface • insert spy functionality to track what happens before and after a message processor is called • view coverage reports in Studio • run tests with your plugins • access detailed Mule stacktraces that pinpoint message processor failures • integrate with Maven and Surefire for continuous integration support