SlideShare a Scribd company logo
MULE –Connector Testing Framework - CTF
-RajeshKumar
1
Connector Testing Framework - CTF
 The Connector Testing Framework eases the creation of connector functional tests,
where the developer is not necessarily involved with Mule’s internals, such as
flows, configurations and Spring beans. The objective of this framework is
twofold. On the one hand, we decouple how Mule works and how functional
tests are written. On the other hand, we enable a runtime platform to run
connector functional tests with multiple Mule versions by executing the tests in
remote Mule instances, achieving a decoupled runtime environment.
2
Overview of CTF
This framework is the default testing framework to write connector functional tests. It
has evolved from a previous testing framework, where the notion of Mule flows and
Spring beans were used. We now have a simple and well-defined interface to run
functional tests in different ways: Embedded or Remote.
The overall approach is to decouple the test itself from where it is executed, thus
enabling a developer to determine whether a test runs in different Mule execution
environments. For instance, a connector written for Mule 3.5.x can now be
automatically tested in Mule releases 3.x and determine backward-compatibility and
forward-compatibility issues, as well as class-loading problems.
3
CTF Interfaces
1. ConnectorTestContext<T>: Main class of the framework, providing an interface for
the other important class, the ConnectorDispatcher. It contains the following
methods:
a) initialize(Class<T> connectorClass): A class method to initialise the entire framework.
It requires the class of the connector under test.
b) shutDown(): A class method to shut down the entire framework.
c) getInstance(): A class method that returns the only instance of the connector
context prior to initialisation. Otherwise, it will throw and exception if the
framework has not been initialised.
d) getPlatformManager(): Returns the only instance of the platform manager in charge
of dealing with the framework life cycle.
e) getConnectorDispatcher(): Returns the only instance of the connector dispatcher,
which is in charge of executing the connector operations.
4
CTF Interfaces
2. ConnectorDispatcher<T>: An interface enabling the execution of connector
operations, including paginated, DataSense and WSDL operations. It contains the
following methods:
1. createMockup(): Returns an instance of the connector being tested, which is the
same class type as used as the only argument in the initialisation of the framework
through ConnectorTestContext.initialize(connectorClass). Tests operations are
executed through this instance, except for operations annotated with @Paged.
2. runPaginatedMethod(String methodName, Object[] args): Connector operations
annotated with @Paged are executed through this method, which requires the
operation name (camel-like) and the array of arguments for that specific
operation.
3. fetchMetaDataKeys(): Returns a Result (from org.mule.commons package) containing
a list of MetaDataKeys (from org.mule.common.metadata package) in order to test
MetaData.
4. fetchMetaData(MetaDataKey key): Returns a MetaData object
(from org.mule.common.metadata package) for a particular MetaDataKey
(from org.mule.common.metadata package).
5. invokeWSDLOperation(XMLStreamReader input, String WSDLID, String operationName):
Dispatcher operation to test WSDL operations.
5
Framework Configuration
Maven Dependencies
CTF is packed within DevKit 3.7+ and therefore no dependency is further required.
Properties
We can inject framework properties through Maven options or VM arguments (in
Eclipse, for instance). If no configurable parameters are desired, you can just add
these properties with System.setProperty(key,value) within your code. The following
CTF parameters are configurable:
6
Framework Configuration
Automations Credentials Properties File: Optional. This file includes the required
credentials to run a test suite and it is specified as -Dautomation-
credentials.properties=FILENAME. If no option is given and no file named automation-
credentials.properties exists, a default file will be created within src/test/resources and
an exception will be thrown. If a file already exists with this name, it will be used by
default and a warning will be issued. It is mandatory to specified the file as follows:
configName1.configurationAttribute1=value
configName1.configurationAttribute2=value
...
configName2.configurationAttribute1=value
configName2.configurationAttribute2=value
...
7
Installing CTF locally
The framework can be locally installed by cloning its repository and running mvn clean
install. Integration tests will not work out of the box, since they required the same
configuration as previously detailed.
You will need to include the following Maven options if integration tests are ran:
mvn clean install -Dtest=FullTestSuite -DfailIfNoTests=false -Dmuledirectory=<Mule
directory>
8
THANK YOU
9
THANK YOU
9
Ad

More Related Content

What's hot (20)

Flows in mule
Flows in muleFlows in mule
Flows in mule
Sindhu VL
 
Mule mule agent
Mule  mule agentMule  mule agent
Mule mule agent
D.Rajesh Kumar
 
Mule api
Mule  apiMule  api
Mule api
D.Rajesh Kumar
 
Mule esb
Mule esbMule esb
Mule esb
charan teja R
 
Mule security
Mule  securityMule  security
Mule security
charan teja R
 
Telling the world why we love mule soft!
Telling the world why we love mule soft!Telling the world why we love mule soft!
Telling the world why we love mule soft!
Sudha Ch
 
Mule security
Mule  securityMule  security
Mule security
D.Rajesh Kumar
 
Create Account in Salesforce using Mule ESB
Create Account in Salesforce using Mule ESBCreate Account in Salesforce using Mule ESB
Create Account in Salesforce using Mule ESB
Sanjeet Pandey
 
Mule mule management console
Mule  mule management consoleMule  mule management console
Mule mule management console
D.Rajesh Kumar
 
Mule reference
Mule referenceMule reference
Mule reference
himajareddys
 
Mule cloud hub
Mule  cloud hubMule  cloud hub
Mule cloud hub
D.Rajesh Kumar
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
kishore ippili
 
Applying UX principles and methods to APIs
Applying UX principles and methods to APIs Applying UX principles and methods to APIs
Applying UX principles and methods to APIs
MuleSoft
 
Mule for beginners
Mule for beginnersMule for beginners
Mule for beginners
Sindhu VL
 
Integration with Sercice-Now using Mule ESB
Integration with Sercice-Now using Mule ESBIntegration with Sercice-Now using Mule ESB
Integration with Sercice-Now using Mule ESB
Sanjeet Pandey
 
MUnit - Testing Mule
MUnit - Testing MuleMUnit - Testing Mule
MUnit - Testing Mule
Shanky Gupta
 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
Mohammed246
 
Mule Microsoft Share Point 2013 Connector
Mule Microsoft Share Point 2013 ConnectorMule Microsoft Share Point 2013 Connector
Mule Microsoft Share Point 2013 Connector
Ankush Sharma
 
Mule any pointstudio
Mule any pointstudioMule any pointstudio
Mule any pointstudio
D.Rajesh Kumar
 
Mule esb
Mule esbMule esb
Mule esb
Sindhu VL
 
Flows in mule
Flows in muleFlows in mule
Flows in mule
Sindhu VL
 
Telling the world why we love mule soft!
Telling the world why we love mule soft!Telling the world why we love mule soft!
Telling the world why we love mule soft!
Sudha Ch
 
Create Account in Salesforce using Mule ESB
Create Account in Salesforce using Mule ESBCreate Account in Salesforce using Mule ESB
Create Account in Salesforce using Mule ESB
Sanjeet Pandey
 
Mule mule management console
Mule  mule management consoleMule  mule management console
Mule mule management console
D.Rajesh Kumar
 
Applying UX principles and methods to APIs
Applying UX principles and methods to APIs Applying UX principles and methods to APIs
Applying UX principles and methods to APIs
MuleSoft
 
Mule for beginners
Mule for beginnersMule for beginners
Mule for beginners
Sindhu VL
 
Integration with Sercice-Now using Mule ESB
Integration with Sercice-Now using Mule ESBIntegration with Sercice-Now using Mule ESB
Integration with Sercice-Now using Mule ESB
Sanjeet Pandey
 
MUnit - Testing Mule
MUnit - Testing MuleMUnit - Testing Mule
MUnit - Testing Mule
Shanky Gupta
 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
Mohammed246
 
Mule Microsoft Share Point 2013 Connector
Mule Microsoft Share Point 2013 ConnectorMule Microsoft Share Point 2013 Connector
Mule Microsoft Share Point 2013 Connector
Ankush Sharma
 

Similar to Mule ctf (20)

Testing mule
Testing   muleTesting   mule
Testing mule
Sindhu VL
 
Mule testing
Mule   testingMule   testing
Mule testing
Sindhu VL
 
ASP.Net MVC 4 [Part - 2]
ASP.Net MVC 4 [Part - 2]ASP.Net MVC 4 [Part - 2]
ASP.Net MVC 4 [Part - 2]
Mohamed Abdeen
 
Automating Software Communications Architecture (SCA) Testing with Spectra CX
Automating Software Communications Architecture (SCA) Testing with Spectra CXAutomating Software Communications Architecture (SCA) Testing with Spectra CX
Automating Software Communications Architecture (SCA) Testing with Spectra CX
ADLINK Technology IoT
 
Mxunit
MxunitMxunit
Mxunit
VIkas Patel
 
System verilog important
System verilog importantSystem verilog important
System verilog important
elumalai7
 
JMockit Framework Overview
JMockit Framework OverviewJMockit Framework Overview
JMockit Framework Overview
Mario Peshev
 
Automation Framework 042009 V2
Automation Framework   042009  V2Automation Framework   042009  V2
Automation Framework 042009 V2
Devukjs
 
An Introduction To Unit Testing and TDD
An Introduction To Unit Testing and TDDAn Introduction To Unit Testing and TDD
An Introduction To Unit Testing and TDD
Ahmed Ehab AbdulAziz
 
Testing mule
Testing   muleTesting   mule
Testing mule
Sindhu VL
 
.NET TECHNOLOGIES
.NET TECHNOLOGIES.NET TECHNOLOGIES
.NET TECHNOLOGIES
Prof Ansari
 
Introduction to testing mule
Introduction to testing muleIntroduction to testing mule
Introduction to testing mule
Ramakrishna kapa
 
systemverilog-interview-questions.docx
systemverilog-interview-questions.docxsystemverilog-interview-questions.docx
systemverilog-interview-questions.docx
ssuser1c8ca21
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules Restructured
DoiT International
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructured
Ami Mahloof
 
Apache commons chain in Spring Framework
Apache commons chain in Spring FrameworkApache commons chain in Spring Framework
Apache commons chain in Spring Framework
Nivedita Mondal
 
Hybrid framework
Hybrid frameworkHybrid framework
Hybrid framework
Sudhakar Mangi
 
Diversified AT Framework - Initial Version
Diversified AT Framework - Initial VersionDiversified AT Framework - Initial Version
Diversified AT Framework - Initial Version
Yu Tao Zhang
 
Snow Leopard
Snow LeopardSnow Leopard
Snow Leopard
Rohan Kachewar
 
What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2
Santosh Singh Paliwal
 
Testing mule
Testing   muleTesting   mule
Testing mule
Sindhu VL
 
Mule testing
Mule   testingMule   testing
Mule testing
Sindhu VL
 
ASP.Net MVC 4 [Part - 2]
ASP.Net MVC 4 [Part - 2]ASP.Net MVC 4 [Part - 2]
ASP.Net MVC 4 [Part - 2]
Mohamed Abdeen
 
Automating Software Communications Architecture (SCA) Testing with Spectra CX
Automating Software Communications Architecture (SCA) Testing with Spectra CXAutomating Software Communications Architecture (SCA) Testing with Spectra CX
Automating Software Communications Architecture (SCA) Testing with Spectra CX
ADLINK Technology IoT
 
System verilog important
System verilog importantSystem verilog important
System verilog important
elumalai7
 
JMockit Framework Overview
JMockit Framework OverviewJMockit Framework Overview
JMockit Framework Overview
Mario Peshev
 
Automation Framework 042009 V2
Automation Framework   042009  V2Automation Framework   042009  V2
Automation Framework 042009 V2
Devukjs
 
An Introduction To Unit Testing and TDD
An Introduction To Unit Testing and TDDAn Introduction To Unit Testing and TDD
An Introduction To Unit Testing and TDD
Ahmed Ehab AbdulAziz
 
Testing mule
Testing   muleTesting   mule
Testing mule
Sindhu VL
 
.NET TECHNOLOGIES
.NET TECHNOLOGIES.NET TECHNOLOGIES
.NET TECHNOLOGIES
Prof Ansari
 
Introduction to testing mule
Introduction to testing muleIntroduction to testing mule
Introduction to testing mule
Ramakrishna kapa
 
systemverilog-interview-questions.docx
systemverilog-interview-questions.docxsystemverilog-interview-questions.docx
systemverilog-interview-questions.docx
ssuser1c8ca21
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules Restructured
DoiT International
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructured
Ami Mahloof
 
Apache commons chain in Spring Framework
Apache commons chain in Spring FrameworkApache commons chain in Spring Framework
Apache commons chain in Spring Framework
Nivedita Mondal
 
Diversified AT Framework - Initial Version
Diversified AT Framework - Initial VersionDiversified AT Framework - Initial Version
Diversified AT Framework - Initial Version
Yu Tao Zhang
 
What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2
Santosh Singh Paliwal
 
Ad

More from D.Rajesh Kumar (20)

Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0
D.Rajesh Kumar
 
Meetup bangalore-sept5th 2020 (1)
Meetup bangalore-sept5th 2020 (1)Meetup bangalore-sept5th 2020 (1)
Meetup bangalore-sept5th 2020 (1)
D.Rajesh Kumar
 
Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020
D.Rajesh Kumar
 
Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10
D.Rajesh Kumar
 
Meetup bangalore 9_novupdated
Meetup bangalore 9_novupdatedMeetup bangalore 9_novupdated
Meetup bangalore 9_novupdated
D.Rajesh Kumar
 
Meetup bangalore aug31st2019
Meetup bangalore aug31st2019Meetup bangalore aug31st2019
Meetup bangalore aug31st2019
D.Rajesh Kumar
 
Meetup bangalore june29th2019
Meetup bangalore june29th2019Meetup bangalore june29th2019
Meetup bangalore june29th2019
D.Rajesh Kumar
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangalore
D.Rajesh Kumar
 
Meetup_Bangalore_Rajesh
Meetup_Bangalore_RajeshMeetup_Bangalore_Rajesh
Meetup_Bangalore_Rajesh
D.Rajesh Kumar
 
Calico and container
Calico and containerCalico and container
Calico and container
D.Rajesh Kumar
 
Calico docker+ipam
Calico docker+ipamCalico docker+ipam
Calico docker+ipam
D.Rajesh Kumar
 
Calico architecture
Calico architectureCalico architecture
Calico architecture
D.Rajesh Kumar
 
Calico to secure host interfaces
Calico to secure host interfacesCalico to secure host interfaces
Calico to secure host interfaces
D.Rajesh Kumar
 
Calico and how interprets neutron api
Calico and how interprets neutron apiCalico and how interprets neutron api
Calico and how interprets neutron api
D.Rajesh Kumar
 
Calico with open stack and chef
Calico with open stack and chefCalico with open stack and chef
Calico with open stack and chef
D.Rajesh Kumar
 
Calico with open stack
Calico with open stackCalico with open stack
Calico with open stack
D.Rajesh Kumar
 
Calico with docker
Calico with dockerCalico with docker
Calico with docker
D.Rajesh Kumar
 
Object Store in Mule
Object Store in MuleObject Store in Mule
Object Store in Mule
D.Rajesh Kumar
 
MuleSoft Offers a Data Migration Solution
MuleSoft Offers a Data Migration SolutionMuleSoft Offers a Data Migration Solution
MuleSoft Offers a Data Migration Solution
D.Rajesh Kumar
 
Mule version-crowd highlights
Mule version-crowd highlightsMule version-crowd highlights
Mule version-crowd highlights
D.Rajesh Kumar
 
Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0
D.Rajesh Kumar
 
Meetup bangalore-sept5th 2020 (1)
Meetup bangalore-sept5th 2020 (1)Meetup bangalore-sept5th 2020 (1)
Meetup bangalore-sept5th 2020 (1)
D.Rajesh Kumar
 
Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020
D.Rajesh Kumar
 
Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10
D.Rajesh Kumar
 
Meetup bangalore 9_novupdated
Meetup bangalore 9_novupdatedMeetup bangalore 9_novupdated
Meetup bangalore 9_novupdated
D.Rajesh Kumar
 
Meetup bangalore aug31st2019
Meetup bangalore aug31st2019Meetup bangalore aug31st2019
Meetup bangalore aug31st2019
D.Rajesh Kumar
 
Meetup bangalore june29th2019
Meetup bangalore june29th2019Meetup bangalore june29th2019
Meetup bangalore june29th2019
D.Rajesh Kumar
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangalore
D.Rajesh Kumar
 
Meetup_Bangalore_Rajesh
Meetup_Bangalore_RajeshMeetup_Bangalore_Rajesh
Meetup_Bangalore_Rajesh
D.Rajesh Kumar
 
Calico to secure host interfaces
Calico to secure host interfacesCalico to secure host interfaces
Calico to secure host interfaces
D.Rajesh Kumar
 
Calico and how interprets neutron api
Calico and how interprets neutron apiCalico and how interprets neutron api
Calico and how interprets neutron api
D.Rajesh Kumar
 
Calico with open stack and chef
Calico with open stack and chefCalico with open stack and chef
Calico with open stack and chef
D.Rajesh Kumar
 
Calico with open stack
Calico with open stackCalico with open stack
Calico with open stack
D.Rajesh Kumar
 
MuleSoft Offers a Data Migration Solution
MuleSoft Offers a Data Migration SolutionMuleSoft Offers a Data Migration Solution
MuleSoft Offers a Data Migration Solution
D.Rajesh Kumar
 
Mule version-crowd highlights
Mule version-crowd highlightsMule version-crowd highlights
Mule version-crowd highlights
D.Rajesh Kumar
 
Ad

Recently uploaded (20)

RFID in Supply chain management and logistics.pdf
RFID in Supply chain management and logistics.pdfRFID in Supply chain management and logistics.pdf
RFID in Supply chain management and logistics.pdf
EnCStore Private Limited
 
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdfGoogle DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
derrickjswork
 
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More MachinesRefactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Leon Anavi
 
Breaking it Down: Microservices Architecture for PHP Developers
Breaking it Down: Microservices Architecture for PHP DevelopersBreaking it Down: Microservices Architecture for PHP Developers
Breaking it Down: Microservices Architecture for PHP Developers
pmeth1
 
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
UXPA Boston
 
Cybersecurity Tools and Technologies - Microsoft Certificate
Cybersecurity Tools and Technologies - Microsoft CertificateCybersecurity Tools and Technologies - Microsoft Certificate
Cybersecurity Tools and Technologies - Microsoft Certificate
VICTOR MAESTRE RAMIREZ
 
TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc Webinar: Cross-Border Data Transfers in 2025TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc
 
Computer Systems Quiz Presentation in Purple Bold Style (4).pdf
Computer Systems Quiz Presentation in Purple Bold Style (4).pdfComputer Systems Quiz Presentation in Purple Bold Style (4).pdf
Computer Systems Quiz Presentation in Purple Bold Style (4).pdf
fizarcse
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Building a research repository that works by Clare Cady
Building a research repository that works by Clare CadyBuilding a research repository that works by Clare Cady
Building a research repository that works by Clare Cady
UXPA Boston
 
Secondary Storage for a microcontroller system
Secondary Storage for a microcontroller systemSecondary Storage for a microcontroller system
Secondary Storage for a microcontroller system
fizarcse
 
Best 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat PlatformsBest 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat Platforms
Soulmaite
 
DNF 2.0 Implementations Challenges in Nepal
DNF 2.0 Implementations Challenges in NepalDNF 2.0 Implementations Challenges in Nepal
DNF 2.0 Implementations Challenges in Nepal
ICT Frame Magazine Pvt. Ltd.
 
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptxUiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
anabulhac
 
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Gary Arora
 
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
ICT Frame Magazine Pvt. Ltd.
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
HusseinMalikMammadli
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
RFID in Supply chain management and logistics.pdf
RFID in Supply chain management and logistics.pdfRFID in Supply chain management and logistics.pdf
RFID in Supply chain management and logistics.pdf
EnCStore Private Limited
 
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdfGoogle DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
derrickjswork
 
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More MachinesRefactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Leon Anavi
 
Breaking it Down: Microservices Architecture for PHP Developers
Breaking it Down: Microservices Architecture for PHP DevelopersBreaking it Down: Microservices Architecture for PHP Developers
Breaking it Down: Microservices Architecture for PHP Developers
pmeth1
 
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
UXPA Boston
 
Cybersecurity Tools and Technologies - Microsoft Certificate
Cybersecurity Tools and Technologies - Microsoft CertificateCybersecurity Tools and Technologies - Microsoft Certificate
Cybersecurity Tools and Technologies - Microsoft Certificate
VICTOR MAESTRE RAMIREZ
 
TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc Webinar: Cross-Border Data Transfers in 2025TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc
 
Computer Systems Quiz Presentation in Purple Bold Style (4).pdf
Computer Systems Quiz Presentation in Purple Bold Style (4).pdfComputer Systems Quiz Presentation in Purple Bold Style (4).pdf
Computer Systems Quiz Presentation in Purple Bold Style (4).pdf
fizarcse
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Building a research repository that works by Clare Cady
Building a research repository that works by Clare CadyBuilding a research repository that works by Clare Cady
Building a research repository that works by Clare Cady
UXPA Boston
 
Secondary Storage for a microcontroller system
Secondary Storage for a microcontroller systemSecondary Storage for a microcontroller system
Secondary Storage for a microcontroller system
fizarcse
 
Best 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat PlatformsBest 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat Platforms
Soulmaite
 
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptxUiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
anabulhac
 
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Gary Arora
 
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
ICT Frame Magazine Pvt. Ltd.
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
HusseinMalikMammadli
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 

Mule ctf

  • 1. MULE –Connector Testing Framework - CTF -RajeshKumar 1
  • 2. Connector Testing Framework - CTF  The Connector Testing Framework eases the creation of connector functional tests, where the developer is not necessarily involved with Mule’s internals, such as flows, configurations and Spring beans. The objective of this framework is twofold. On the one hand, we decouple how Mule works and how functional tests are written. On the other hand, we enable a runtime platform to run connector functional tests with multiple Mule versions by executing the tests in remote Mule instances, achieving a decoupled runtime environment. 2
  • 3. Overview of CTF This framework is the default testing framework to write connector functional tests. It has evolved from a previous testing framework, where the notion of Mule flows and Spring beans were used. We now have a simple and well-defined interface to run functional tests in different ways: Embedded or Remote. The overall approach is to decouple the test itself from where it is executed, thus enabling a developer to determine whether a test runs in different Mule execution environments. For instance, a connector written for Mule 3.5.x can now be automatically tested in Mule releases 3.x and determine backward-compatibility and forward-compatibility issues, as well as class-loading problems. 3
  • 4. CTF Interfaces 1. ConnectorTestContext<T>: Main class of the framework, providing an interface for the other important class, the ConnectorDispatcher. It contains the following methods: a) initialize(Class<T> connectorClass): A class method to initialise the entire framework. It requires the class of the connector under test. b) shutDown(): A class method to shut down the entire framework. c) getInstance(): A class method that returns the only instance of the connector context prior to initialisation. Otherwise, it will throw and exception if the framework has not been initialised. d) getPlatformManager(): Returns the only instance of the platform manager in charge of dealing with the framework life cycle. e) getConnectorDispatcher(): Returns the only instance of the connector dispatcher, which is in charge of executing the connector operations. 4
  • 5. CTF Interfaces 2. ConnectorDispatcher<T>: An interface enabling the execution of connector operations, including paginated, DataSense and WSDL operations. It contains the following methods: 1. createMockup(): Returns an instance of the connector being tested, which is the same class type as used as the only argument in the initialisation of the framework through ConnectorTestContext.initialize(connectorClass). Tests operations are executed through this instance, except for operations annotated with @Paged. 2. runPaginatedMethod(String methodName, Object[] args): Connector operations annotated with @Paged are executed through this method, which requires the operation name (camel-like) and the array of arguments for that specific operation. 3. fetchMetaDataKeys(): Returns a Result (from org.mule.commons package) containing a list of MetaDataKeys (from org.mule.common.metadata package) in order to test MetaData. 4. fetchMetaData(MetaDataKey key): Returns a MetaData object (from org.mule.common.metadata package) for a particular MetaDataKey (from org.mule.common.metadata package). 5. invokeWSDLOperation(XMLStreamReader input, String WSDLID, String operationName): Dispatcher operation to test WSDL operations. 5
  • 6. Framework Configuration Maven Dependencies CTF is packed within DevKit 3.7+ and therefore no dependency is further required. Properties We can inject framework properties through Maven options or VM arguments (in Eclipse, for instance). If no configurable parameters are desired, you can just add these properties with System.setProperty(key,value) within your code. The following CTF parameters are configurable: 6
  • 7. Framework Configuration Automations Credentials Properties File: Optional. This file includes the required credentials to run a test suite and it is specified as -Dautomation- credentials.properties=FILENAME. If no option is given and no file named automation- credentials.properties exists, a default file will be created within src/test/resources and an exception will be thrown. If a file already exists with this name, it will be used by default and a warning will be issued. It is mandatory to specified the file as follows: configName1.configurationAttribute1=value configName1.configurationAttribute2=value ... configName2.configurationAttribute1=value configName2.configurationAttribute2=value ... 7
  • 8. Installing CTF locally The framework can be locally installed by cloning its repository and running mvn clean install. Integration tests will not work out of the box, since they required the same configuration as previously detailed. You will need to include the following Maven options if integration tests are ran: mvn clean install -Dtest=FullTestSuite -DfailIfNoTests=false -Dmuledirectory=<Mule directory> 8
  翻译: