SlideShare a Scribd company logo
1 of 26
[12th July 2020]: [MUnit Testing made easier in Mule]
FARIDABAD India, Mulesoft Group
#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
All contents © MuleSoft Inc.
Agenda
2
• Introduction
• MuleSoft for Beginners
• MUnit Testing made easier in Mule
• Fun Quiz ( Win certification voucher )
• Networking
• Next Event Announcement
#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
All contents © MuleSoft Inc.
Organizers
3
Welcome everyone! Thanks for joining us!
All contents © MuleSoft Inc.
Surprises!
4
• Participate in an online
Quiz to win the
instructor-led training
classes and certification
exam vouchers. (3
Winners!)
• Be geared up for the
quiz sessions at the end

Start your Mulesoft Journey
Mulesoft for beginners
#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
All contents © MuleSoft Inc. 6
• https://training.mulesoft.com/
• https://www.youtube.com/channel/UCHQ5feaAtOCEtis453_RYAg
(Tech Lightning) YouTube Channel
• https://www.youtube.com/c/SFDCPanther YouTubeChannel
• https://docs.mulesoft.com/general/
Resources
#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
All contents © MuleSoft Inc.
Speaker
7#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
What’s new in MUnit?
Easier MUnit testing in
Mule
All contents © MuleSoft Inc.
What will we be talking about?
9#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
All contents © MuleSoft Inc. 10
• MUnit is the Mule application testing framework that enables developers to create,
design, and run unit and integration tests on Mule applications created within Anypoint
Studio.
• It natively supports unit and integration testing on APIs and Mule apps in local and
CI/CD environments (via Maven).
Note: If this is your first time learning about MUnit, check out our tutorial on how to create your first MUnit
test in Anypoint Studio.
• Further we will learn how the MUnit test recorder works and how it can simplify the
testing process.
• The test recorder allows us to create tests for our application without the need of
writing any code, empowering us to build more robust applications and ensure their
quality to meet any test coverage requirements.
What is MUnit and Test Recorder?
All contents © MuleSoft Inc.
What is MUnit?
11
MUnit is divided into two
main sub-modules, one is
called MUnit and the other
MUnit Tools. Additionally,
there are Utilities available
for import such as a
Database Server, FTP
Server, or a Run and Wait
Scope. Here is an overview
of some of the different
MUnit features that you
can implement into your
unit testing.
All contents © MuleSoft Inc. 12
How do you use MUnit?
• Use MUnit to build
test flows (technically
called test suites in
the industry) focused
on executing Mule
flows. Each test is
essentially a Mule
flow.
• Use components from
MUnit and generic
Mule components to
build test flows.
• Test flows execute in
a Mule runtime and
report results.
1
2
3
All contents © MuleSoft Inc. 13
• A test flow is broken down into three sections:
1. Execution,
2. Behavior and
3. Validation.
• The behavior scope sets all the preconditions before executing the
test logic. The execution scope contains the testing logic which will
wait for all processes to finish before executing the next scope. The
validation scope contains all the validations for the results of the
execution scope.
How do you use MUnit?
All contents © MuleSoft Inc. 14
• Test: Creates a new test “flow” broken down into three sections: Execution, Behavior, and Validation. The
behavior scope sets all the preconditions before executing the test logic. The execution scope contains the
testing logic which will wait for all processes to finish before executing the next scope. The validation scope
contains all the validations for the results of the execution scope.
• Set Event: Allows you to define a Mule Event. Usually used at the beginning of an MUnit test to define the
first message to send to the flow being tested.
• Set null payload: Defines a null payload to test how your flow will handle a null value.
• After Suite: Runs after executing all of the MUnit tests and runs just once. For instance, let’s suppose you
have an MUnit Test Suite File with four tests. The code inside an MUnit After Suite, runs just once, after all
of your tests.
• After Test: Runs after executing an MUnit test. For instance, let’s suppose you have an MUnit Test Suite file
with four tests. The code inside an MUnit After Test runs after each of your four tests; it runs four times.
• Before Suite: Runs before executing all of the MUnit tests and runs just once. For example, suppose you
have an MUnit Test Suite file with four tests. The code inside an MUnit Before Suite runs just once, before all
of your four tests.
• Before Test: Runs before executing an MUnit test. For instance, let’s suppose you have an MUnit Test Suite
file with four tests. The code inside an MUnit Before test runs before each of your four tests; it runs four
times.
MUnit Operations:
All contents © MuleSoft Inc. 15
• Assert That: Allows you to run assertions to validate the state of a Mule event, such as checking to see
if a payload equals a certain value.
• Fail: Useful in validating that a test should fail if that point is reached in the flow. The processor throws
a java.lang.AssertionError.
• Mock When: Use this processor to mock an event, such as sending a mock POST request with a
mocked payload.
• Run Custom: Allows you to assert the Mule event content against a custom assertion.
• Verify Call: Allows you to verify if a processor was called.
• Spy: Allows you to see what happens before and after an event processor is called in your Flow.
Usually, you will tell the Spy processor to run a set of instructions before and after the execution.
MUnit Tools:
All contents © MuleSoft Inc. 16
Head-to-head comparison vs. legacy middleware
All contents © MuleSoft Inc. 17
The pain of testing today
#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
All contents © MuleSoft Inc. 18
Munit test recorder
Let us quickly go through a tutorial on how to record a test and generate a flow.
https://developer.mulesoft.com/tutorials-and-howtos/quick-start/getting-started-with-
the-munit-test-recorder
All contents © MuleSoft Inc. 19
Generally available from April 30th 2020
• Automate test creation: Capture flow
execution with the new Munit test
recorder to automatically generate
tests.
• Scale with confidence: Leverage
runtime performance improvements for
more efficient code execution.
• Collaborate on API Specs: Pull and
update API specifications within Studio
and merge them back to Design Center.
Anypoint Studio 7.5 and Mule 4.3
#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
All contents © MuleSoft Inc.
Where to go next?
20#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
Q & A
Quiz Time
All contents © MuleSoft Inc.
Take a stand !
23
• Nominate yourself for the
next meetup speaker and
suggest a topic as well.
• Either for our virtual meetup
speaker, or in-person
meetup speaker.
• Surprise swag for upcoming
Speakers.
• Fill this form -
https://bit.ly/speakar
All contents © MuleSoft Inc.
What’s next
24
• Share:
– Tweet/share in LinkedIn , facebook, Instagram with your pictures with the hashtag
#FaridabadMuleMeetup #MuleSoftMeetup
– Also use #BringMuleSoftConnectToFaridabad to reach our wish to MuleSoft 
– Invite your network to join: https://meetups.mulesoft.com/Faridabad/
• Feedback:
– Please fill out the slips with details like are you new to Mule? If so what technology you are
currently working , What makes you to think of adopting MuleSoft and what topic you are
expecting in future Meetups
– Contact MuleSoft at meetup@mulesoft.com for ways to improve the program
– Your Feedback is Food for us. https://bit.ly/f-mf
• Our next meetup:
– Date: TBD
– Location: Faridabad/Virtual
– Topic: TBD
THANK YOU 
#Everyone
for becoming a part of such a great
#community.
Mule Testing in Mulesfoft 4.X

More Related Content

What's hot

Hyd MuleSoft-Meetup-May 29,2021 | Migrating Mule 3 Java related code to Mule 4
Hyd MuleSoft-Meetup-May 29,2021 | Migrating Mule 3 Java related code to Mule 4Hyd MuleSoft-Meetup-May 29,2021 | Migrating Mule 3 Java related code to Mule 4
Hyd MuleSoft-Meetup-May 29,2021 | Migrating Mule 3 Java related code to Mule 4Sravan Lingam
 
Warsaw MuleSoft Meetup #6 - CI/CD
Warsaw MuleSoft Meetup  #6 - CI/CDWarsaw MuleSoft Meetup  #6 - CI/CD
Warsaw MuleSoft Meetup #6 - CI/CDPatryk Bandurski
 
Cómo generar e implementar monitoreo para aplicaciones de Mule
Cómo generar e implementar monitoreo para aplicaciones de MuleCómo generar e implementar monitoreo para aplicaciones de Mule
Cómo generar e implementar monitoreo para aplicaciones de MuleAlexandra N. Martinez
 
MuleSoft approach to the integration - Warsaw MuleSoft Meetup
MuleSoft approach to the integration - Warsaw MuleSoft MeetupMuleSoft approach to the integration - Warsaw MuleSoft Meetup
MuleSoft approach to the integration - Warsaw MuleSoft MeetupPatryk Bandurski
 
Special MuleSoft Meetup at London CONNECT
Special MuleSoft Meetup at London CONNECTSpecial MuleSoft Meetup at London CONNECT
Special MuleSoft Meetup at London CONNECTSabrina Marechal
 
MuleSoft CloudHub API Versioning
MuleSoft CloudHub API VersioningMuleSoft CloudHub API Versioning
MuleSoft CloudHub API VersioningPatryk Bandurski
 
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...Manish Kumar Yadav
 
Mulesoft KL Meetup 2
Mulesoft KL Meetup 2Mulesoft KL Meetup 2
Mulesoft KL Meetup 2NitushreeJena
 
Manila MuleSoft Meetup - August 2020
Manila MuleSoft Meetup - August 2020Manila MuleSoft Meetup - August 2020
Manila MuleSoft Meetup - August 2020Ryan Anthony Andal
 
Mulesoft Munit Testing
Mulesoft Munit TestingMulesoft Munit Testing
Mulesoft Munit Testingakshay yeluru
 
6th Manila MuleSoft Meetup May 2020
6th Manila MuleSoft Meetup May 20206th Manila MuleSoft Meetup May 2020
6th Manila MuleSoft Meetup May 2020Christopher Co
 
Warsaw mulesoft meetup #9 mastering integration with salesforce
Warsaw mulesoft meetup #9 mastering integration with salesforceWarsaw mulesoft meetup #9 mastering integration with salesforce
Warsaw mulesoft meetup #9 mastering integration with salesforcePatryk Bandurski
 
Ahmadabad mule soft_meetup_6march2021_azure_CICD
Ahmadabad mule soft_meetup_6march2021_azure_CICDAhmadabad mule soft_meetup_6march2021_azure_CICD
Ahmadabad mule soft_meetup_6march2021_azure_CICDShekh Muenuddeen
 
Testing strategies and best practices using MUnit
Testing strategies and best practices using MUnitTesting strategies and best practices using MUnit
Testing strategies and best practices using MUnitJimmy Attia
 
CI/CD at Atlassian using Anypoint Platform
CI/CD at Atlassian using Anypoint PlatformCI/CD at Atlassian using Anypoint Platform
CI/CD at Atlassian using Anypoint PlatformSabrina Marechal
 
Demystifying the use of circuit breakers with MuleSoft
Demystifying the use of circuit breakers with MuleSoftDemystifying the use of circuit breakers with MuleSoft
Demystifying the use of circuit breakers with MuleSoftSandeep Deshmukh
 

What's hot (18)

Hyd MuleSoft-Meetup-May 29,2021 | Migrating Mule 3 Java related code to Mule 4
Hyd MuleSoft-Meetup-May 29,2021 | Migrating Mule 3 Java related code to Mule 4Hyd MuleSoft-Meetup-May 29,2021 | Migrating Mule 3 Java related code to Mule 4
Hyd MuleSoft-Meetup-May 29,2021 | Migrating Mule 3 Java related code to Mule 4
 
Warsaw MuleSoft Meetup #6 - CI/CD
Warsaw MuleSoft Meetup  #6 - CI/CDWarsaw MuleSoft Meetup  #6 - CI/CD
Warsaw MuleSoft Meetup #6 - CI/CD
 
Online Spanish meetup #1
Online Spanish meetup #1Online Spanish meetup #1
Online Spanish meetup #1
 
Cómo generar e implementar monitoreo para aplicaciones de Mule
Cómo generar e implementar monitoreo para aplicaciones de MuleCómo generar e implementar monitoreo para aplicaciones de Mule
Cómo generar e implementar monitoreo para aplicaciones de Mule
 
MuleSoft approach to the integration - Warsaw MuleSoft Meetup
MuleSoft approach to the integration - Warsaw MuleSoft MeetupMuleSoft approach to the integration - Warsaw MuleSoft Meetup
MuleSoft approach to the integration - Warsaw MuleSoft Meetup
 
Special MuleSoft Meetup at London CONNECT
Special MuleSoft Meetup at London CONNECTSpecial MuleSoft Meetup at London CONNECT
Special MuleSoft Meetup at London CONNECT
 
MuleSoft CloudHub API Versioning
MuleSoft CloudHub API VersioningMuleSoft CloudHub API Versioning
MuleSoft CloudHub API Versioning
 
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
 
Mulesoft KL Meetup 2
Mulesoft KL Meetup 2Mulesoft KL Meetup 2
Mulesoft KL Meetup 2
 
Manila MuleSoft Meetup - August 2020
Manila MuleSoft Meetup - August 2020Manila MuleSoft Meetup - August 2020
Manila MuleSoft Meetup - August 2020
 
Mulesoft Munit Testing
Mulesoft Munit TestingMulesoft Munit Testing
Mulesoft Munit Testing
 
6th Manila MuleSoft Meetup May 2020
6th Manila MuleSoft Meetup May 20206th Manila MuleSoft Meetup May 2020
6th Manila MuleSoft Meetup May 2020
 
Warsaw mulesoft meetup #9 mastering integration with salesforce
Warsaw mulesoft meetup #9 mastering integration with salesforceWarsaw mulesoft meetup #9 mastering integration with salesforce
Warsaw mulesoft meetup #9 mastering integration with salesforce
 
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring BootBuilding APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
 
Ahmadabad mule soft_meetup_6march2021_azure_CICD
Ahmadabad mule soft_meetup_6march2021_azure_CICDAhmadabad mule soft_meetup_6march2021_azure_CICD
Ahmadabad mule soft_meetup_6march2021_azure_CICD
 
Testing strategies and best practices using MUnit
Testing strategies and best practices using MUnitTesting strategies and best practices using MUnit
Testing strategies and best practices using MUnit
 
CI/CD at Atlassian using Anypoint Platform
CI/CD at Atlassian using Anypoint PlatformCI/CD at Atlassian using Anypoint Platform
CI/CD at Atlassian using Anypoint Platform
 
Demystifying the use of circuit breakers with MuleSoft
Demystifying the use of circuit breakers with MuleSoftDemystifying the use of circuit breakers with MuleSoft
Demystifying the use of circuit breakers with MuleSoft
 

Similar to Mule Testing in Mulesfoft 4.X

MuleSoft Meetup Charlotte 2019 - Dec 10
MuleSoft Meetup Charlotte  2019 - Dec 10MuleSoft Meetup Charlotte  2019 - Dec 10
MuleSoft Meetup Charlotte 2019 - Dec 10Subhash Patel
 
Munit In Mule 4 | Patna MuleSoft Meetup #26
Munit In Mule 4 | Patna MuleSoft Meetup #26Munit In Mule 4 | Patna MuleSoft Meetup #26
Munit In Mule 4 | Patna MuleSoft Meetup #26shyamraj55
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVikalp Bhalia
 
MuleSoft Meetup Charlotte 2 - 2019
MuleSoft Meetup Charlotte 2 - 2019MuleSoft Meetup Charlotte 2 - 2019
MuleSoft Meetup Charlotte 2 - 2019Subhash Patel
 
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoft
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoftEngineering Student MuleSoft Meetup#4 - API Testing With MuleSoft
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoftJitendra Bafna
 
Mulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingMulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingManish Kumar Yadav
 
Sydney mule soft meetup 30 april 2020
Sydney mule soft meetup   30 april 2020Sydney mule soft meetup   30 april 2020
Sydney mule soft meetup 30 april 2020Royston Lobo
 
Stockholm MuleSoft Meetup - Albin Kjellin, 15 Feb 2018
Stockholm MuleSoft Meetup - Albin Kjellin, 15 Feb 2018Stockholm MuleSoft Meetup - Albin Kjellin, 15 Feb 2018
Stockholm MuleSoft Meetup - Albin Kjellin, 15 Feb 2018Ana Chiriţescu
 
Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Om Prakash
 
Mexico City Online Mulesoft Meetup - Quality Code with MUNIT - May 4, 2020
Mexico City Online Mulesoft Meetup - Quality Code with MUNIT - May 4, 2020Mexico City Online Mulesoft Meetup - Quality Code with MUNIT - May 4, 2020
Mexico City Online Mulesoft Meetup - Quality Code with MUNIT - May 4, 2020Ricardo Rodríguez
 
MuleSoft MUnit Test Recorder Meetup
MuleSoft MUnit Test Recorder MeetupMuleSoft MUnit Test Recorder Meetup
MuleSoft MUnit Test Recorder MeetupAngel Alberici
 
Mule soft meetup_virtual_ 3_charlotte_07july_2021__final
Mule soft meetup_virtual_ 3_charlotte_07july_2021__finalMule soft meetup_virtual_ 3_charlotte_07july_2021__final
Mule soft meetup_virtual_ 3_charlotte_07july_2021__finalSubhash Patel
 
Perth MuleSoft Meetup Feb 2019
Perth MuleSoft Meetup Feb 2019Perth MuleSoft Meetup Feb 2019
Perth MuleSoft Meetup Feb 2019Zubair Aslam
 
MuleSoft Singapore Meetup May 2020
MuleSoft Singapore Meetup May 2020MuleSoft Singapore Meetup May 2020
MuleSoft Singapore Meetup May 2020Julian Douch
 
MuleSoft Clustring, Okta, CI/CD Integration with Jenkins
MuleSoft Clustring, Okta, CI/CD Integration with JenkinsMuleSoft Clustring, Okta, CI/CD Integration with Jenkins
MuleSoft Clustring, Okta, CI/CD Integration with JenkinsManish Kumar Yadav
 
Mule soft meetup_tw_no1_june17
Mule soft meetup_tw_no1_june17Mule soft meetup_tw_no1_june17
Mule soft meetup_tw_no1_june17WendyTey4
 
Mule soft meetup_th_no1
Mule soft meetup_th_no1Mule soft meetup_th_no1
Mule soft meetup_th_no1WendyTey4
 

Similar to Mule Testing in Mulesfoft 4.X (20)

MuleSoft Meetup Charlotte 2019 - Dec 10
MuleSoft Meetup Charlotte  2019 - Dec 10MuleSoft Meetup Charlotte  2019 - Dec 10
MuleSoft Meetup Charlotte 2019 - Dec 10
 
Munit In Mule 4 | Patna MuleSoft Meetup #26
Munit In Mule 4 | Patna MuleSoft Meetup #26Munit In Mule 4 | Patna MuleSoft Meetup #26
Munit In Mule 4 | Patna MuleSoft Meetup #26
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-july
 
MuleSoft Meetup Charlotte 2 - 2019
MuleSoft Meetup Charlotte 2 - 2019MuleSoft Meetup Charlotte 2 - 2019
MuleSoft Meetup Charlotte 2 - 2019
 
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoft
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoftEngineering Student MuleSoft Meetup#4 - API Testing With MuleSoft
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoft
 
Mulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingMulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handling
 
Sydney mule soft meetup 30 april 2020
Sydney mule soft meetup   30 april 2020Sydney mule soft meetup   30 april 2020
Sydney mule soft meetup 30 april 2020
 
Stockholm MuleSoft Meetup - Albin Kjellin, 15 Feb 2018
Stockholm MuleSoft Meetup - Albin Kjellin, 15 Feb 2018Stockholm MuleSoft Meetup - Albin Kjellin, 15 Feb 2018
Stockholm MuleSoft Meetup - Albin Kjellin, 15 Feb 2018
 
Mule esb munit
Mule esb munitMule esb munit
Mule esb munit
 
Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020
 
Mexico City Online Mulesoft Meetup - Quality Code with MUNIT - May 4, 2020
Mexico City Online Mulesoft Meetup - Quality Code with MUNIT - May 4, 2020Mexico City Online Mulesoft Meetup - Quality Code with MUNIT - May 4, 2020
Mexico City Online Mulesoft Meetup - Quality Code with MUNIT - May 4, 2020
 
Mule m unit
Mule m unitMule m unit
Mule m unit
 
MuleSoft MUnit Test Recorder Meetup
MuleSoft MUnit Test Recorder MeetupMuleSoft MUnit Test Recorder Meetup
MuleSoft MUnit Test Recorder Meetup
 
Mule soft meetup_virtual_ 3_charlotte_07july_2021__final
Mule soft meetup_virtual_ 3_charlotte_07july_2021__finalMule soft meetup_virtual_ 3_charlotte_07july_2021__final
Mule soft meetup_virtual_ 3_charlotte_07july_2021__final
 
Perth MuleSoft Meetup Feb 2019
Perth MuleSoft Meetup Feb 2019Perth MuleSoft Meetup Feb 2019
Perth MuleSoft Meetup Feb 2019
 
MuleSoft Singapore Meetup May 2020
MuleSoft Singapore Meetup May 2020MuleSoft Singapore Meetup May 2020
MuleSoft Singapore Meetup May 2020
 
MuleSoft Clustring, Okta, CI/CD Integration with Jenkins
MuleSoft Clustring, Okta, CI/CD Integration with JenkinsMuleSoft Clustring, Okta, CI/CD Integration with Jenkins
MuleSoft Clustring, Okta, CI/CD Integration with Jenkins
 
Testing in mule
Testing in muleTesting in mule
Testing in mule
 
Mule soft meetup_tw_no1_june17
Mule soft meetup_tw_no1_june17Mule soft meetup_tw_no1_june17
Mule soft meetup_tw_no1_june17
 
Mule soft meetup_th_no1
Mule soft meetup_th_no1Mule soft meetup_th_no1
Mule soft meetup_th_no1
 

More from Amit Singh

CI CD Daridabad MuleSoft meetup
CI CD Daridabad MuleSoft meetupCI CD Daridabad MuleSoft meetup
CI CD Daridabad MuleSoft meetupAmit Singh
 
Custom MuleSoft connector using Java SDK
Custom MuleSoft connector using Java SDKCustom MuleSoft connector using Java SDK
Custom MuleSoft connector using Java SDKAmit Singh
 
External services low code integration
External services   low code integrationExternal services   low code integration
External services low code integrationAmit Singh
 
Faridabad Mulesoft Meetup Oct 10
Faridabad Mulesoft Meetup Oct 10Faridabad Mulesoft Meetup Oct 10
Faridabad Mulesoft Meetup Oct 10Amit Singh
 
Test setup methods in Salesforce Apex Class
Test setup methods in Salesforce Apex ClassTest setup methods in Salesforce Apex Class
Test setup methods in Salesforce Apex ClassAmit Singh
 
Apex trigger framework Salesforce #ApexTrigger #Salesforce #SFDCPanther
Apex trigger framework Salesforce #ApexTrigger #Salesforce #SFDCPantherApex trigger framework Salesforce #ApexTrigger #Salesforce #SFDCPanther
Apex trigger framework Salesforce #ApexTrigger #Salesforce #SFDCPantherAmit Singh
 
Apex trigger handler & helper
Apex trigger handler & helperApex trigger handler & helper
Apex trigger handler & helperAmit Singh
 
Rollup Summary Trigger for Lookup Relationship Salesforce #Salesforce #ApexTr...
Rollup Summary Trigger for Lookup Relationship Salesforce #Salesforce #ApexTr...Rollup Summary Trigger for Lookup Relationship Salesforce #Salesforce #ApexTr...
Rollup Summary Trigger for Lookup Relationship Salesforce #Salesforce #ApexTr...Amit Singh
 
Duplicate Contact Trigger || Trigger Logic Building || #ApexTrigger #Salesforce
Duplicate Contact Trigger || Trigger Logic Building || #ApexTrigger #SalesforceDuplicate Contact Trigger || Trigger Logic Building || #ApexTrigger #Salesforce
Duplicate Contact Trigger || Trigger Logic Building || #ApexTrigger #SalesforceAmit Singh
 
OAuth 2.0 an Overview
OAuth 2.0 an OverviewOAuth 2.0 an Overview
OAuth 2.0 an OverviewAmit Singh
 
All About Test Class in #Salesforce
All About Test Class in #SalesforceAll About Test Class in #Salesforce
All About Test Class in #SalesforceAmit Singh
 
Salesforce apex hours PayPal with Salesforce Integration
Salesforce apex hours   PayPal with Salesforce IntegrationSalesforce apex hours   PayPal with Salesforce Integration
Salesforce apex hours PayPal with Salesforce IntegrationAmit Singh
 
SOQL in salesforce || Salesforce Object Query Language || Salesforce
SOQL in salesforce || Salesforce Object Query Language || SalesforceSOQL in salesforce || Salesforce Object Query Language || Salesforce
SOQL in salesforce || Salesforce Object Query Language || SalesforceAmit Singh
 
Introduction to apex trigger context variables
Introduction to apex trigger context variablesIntroduction to apex trigger context variables
Introduction to apex trigger context variablesAmit Singh
 
Introduction to apex triggers
Introduction to apex triggersIntroduction to apex triggers
Introduction to apex triggersAmit Singh
 
Salesforce apex hours azure dev ops
Salesforce apex hours   azure dev opsSalesforce apex hours   azure dev ops
Salesforce apex hours azure dev opsAmit Singh
 
Lightning web components
Lightning web componentsLightning web components
Lightning web componentsAmit Singh
 
Salesforce apex hours azure active directory seamless single sign-on with s...
Salesforce apex hours   azure active directory seamless single sign-on with s...Salesforce apex hours   azure active directory seamless single sign-on with s...
Salesforce apex hours azure active directory seamless single sign-on with s...Amit Singh
 

More from Amit Singh (18)

CI CD Daridabad MuleSoft meetup
CI CD Daridabad MuleSoft meetupCI CD Daridabad MuleSoft meetup
CI CD Daridabad MuleSoft meetup
 
Custom MuleSoft connector using Java SDK
Custom MuleSoft connector using Java SDKCustom MuleSoft connector using Java SDK
Custom MuleSoft connector using Java SDK
 
External services low code integration
External services   low code integrationExternal services   low code integration
External services low code integration
 
Faridabad Mulesoft Meetup Oct 10
Faridabad Mulesoft Meetup Oct 10Faridabad Mulesoft Meetup Oct 10
Faridabad Mulesoft Meetup Oct 10
 
Test setup methods in Salesforce Apex Class
Test setup methods in Salesforce Apex ClassTest setup methods in Salesforce Apex Class
Test setup methods in Salesforce Apex Class
 
Apex trigger framework Salesforce #ApexTrigger #Salesforce #SFDCPanther
Apex trigger framework Salesforce #ApexTrigger #Salesforce #SFDCPantherApex trigger framework Salesforce #ApexTrigger #Salesforce #SFDCPanther
Apex trigger framework Salesforce #ApexTrigger #Salesforce #SFDCPanther
 
Apex trigger handler & helper
Apex trigger handler & helperApex trigger handler & helper
Apex trigger handler & helper
 
Rollup Summary Trigger for Lookup Relationship Salesforce #Salesforce #ApexTr...
Rollup Summary Trigger for Lookup Relationship Salesforce #Salesforce #ApexTr...Rollup Summary Trigger for Lookup Relationship Salesforce #Salesforce #ApexTr...
Rollup Summary Trigger for Lookup Relationship Salesforce #Salesforce #ApexTr...
 
Duplicate Contact Trigger || Trigger Logic Building || #ApexTrigger #Salesforce
Duplicate Contact Trigger || Trigger Logic Building || #ApexTrigger #SalesforceDuplicate Contact Trigger || Trigger Logic Building || #ApexTrigger #Salesforce
Duplicate Contact Trigger || Trigger Logic Building || #ApexTrigger #Salesforce
 
OAuth 2.0 an Overview
OAuth 2.0 an OverviewOAuth 2.0 an Overview
OAuth 2.0 an Overview
 
All About Test Class in #Salesforce
All About Test Class in #SalesforceAll About Test Class in #Salesforce
All About Test Class in #Salesforce
 
Salesforce apex hours PayPal with Salesforce Integration
Salesforce apex hours   PayPal with Salesforce IntegrationSalesforce apex hours   PayPal with Salesforce Integration
Salesforce apex hours PayPal with Salesforce Integration
 
SOQL in salesforce || Salesforce Object Query Language || Salesforce
SOQL in salesforce || Salesforce Object Query Language || SalesforceSOQL in salesforce || Salesforce Object Query Language || Salesforce
SOQL in salesforce || Salesforce Object Query Language || Salesforce
 
Introduction to apex trigger context variables
Introduction to apex trigger context variablesIntroduction to apex trigger context variables
Introduction to apex trigger context variables
 
Introduction to apex triggers
Introduction to apex triggersIntroduction to apex triggers
Introduction to apex triggers
 
Salesforce apex hours azure dev ops
Salesforce apex hours   azure dev opsSalesforce apex hours   azure dev ops
Salesforce apex hours azure dev ops
 
Lightning web components
Lightning web componentsLightning web components
Lightning web components
 
Salesforce apex hours azure active directory seamless single sign-on with s...
Salesforce apex hours   azure active directory seamless single sign-on with s...Salesforce apex hours   azure active directory seamless single sign-on with s...
Salesforce apex hours azure active directory seamless single sign-on with s...
 

Recently uploaded

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Mule Testing in Mulesfoft 4.X

  • 1. [12th July 2020]: [MUnit Testing made easier in Mule] FARIDABAD India, Mulesoft Group #MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
  • 2. All contents © MuleSoft Inc. Agenda 2 • Introduction • MuleSoft for Beginners • MUnit Testing made easier in Mule • Fun Quiz ( Win certification voucher ) • Networking • Next Event Announcement #MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
  • 3. All contents © MuleSoft Inc. Organizers 3 Welcome everyone! Thanks for joining us!
  • 4. All contents © MuleSoft Inc. Surprises! 4 • Participate in an online Quiz to win the instructor-led training classes and certification exam vouchers. (3 Winners!) • Be geared up for the quiz sessions at the end 
  • 5. Start your Mulesoft Journey Mulesoft for beginners #MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
  • 6. All contents © MuleSoft Inc. 6 • https://training.mulesoft.com/ • https://www.youtube.com/channel/UCHQ5feaAtOCEtis453_RYAg (Tech Lightning) YouTube Channel • https://www.youtube.com/c/SFDCPanther YouTubeChannel • https://docs.mulesoft.com/general/ Resources #MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
  • 7. All contents © MuleSoft Inc. Speaker 7#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
  • 8. What’s new in MUnit? Easier MUnit testing in Mule
  • 9. All contents © MuleSoft Inc. What will we be talking about? 9#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
  • 10. All contents © MuleSoft Inc. 10 • MUnit is the Mule application testing framework that enables developers to create, design, and run unit and integration tests on Mule applications created within Anypoint Studio. • It natively supports unit and integration testing on APIs and Mule apps in local and CI/CD environments (via Maven). Note: If this is your first time learning about MUnit, check out our tutorial on how to create your first MUnit test in Anypoint Studio. • Further we will learn how the MUnit test recorder works and how it can simplify the testing process. • The test recorder allows us to create tests for our application without the need of writing any code, empowering us to build more robust applications and ensure their quality to meet any test coverage requirements. What is MUnit and Test Recorder?
  • 11. All contents © MuleSoft Inc. What is MUnit? 11 MUnit is divided into two main sub-modules, one is called MUnit and the other MUnit Tools. Additionally, there are Utilities available for import such as a Database Server, FTP Server, or a Run and Wait Scope. Here is an overview of some of the different MUnit features that you can implement into your unit testing.
  • 12. All contents © MuleSoft Inc. 12 How do you use MUnit? • Use MUnit to build test flows (technically called test suites in the industry) focused on executing Mule flows. Each test is essentially a Mule flow. • Use components from MUnit and generic Mule components to build test flows. • Test flows execute in a Mule runtime and report results. 1 2 3
  • 13. All contents © MuleSoft Inc. 13 • A test flow is broken down into three sections: 1. Execution, 2. Behavior and 3. Validation. • The behavior scope sets all the preconditions before executing the test logic. The execution scope contains the testing logic which will wait for all processes to finish before executing the next scope. The validation scope contains all the validations for the results of the execution scope. How do you use MUnit?
  • 14. All contents © MuleSoft Inc. 14 • Test: Creates a new test “flow” broken down into three sections: Execution, Behavior, and Validation. The behavior scope sets all the preconditions before executing the test logic. The execution scope contains the testing logic which will wait for all processes to finish before executing the next scope. The validation scope contains all the validations for the results of the execution scope. • Set Event: Allows you to define a Mule Event. Usually used at the beginning of an MUnit test to define the first message to send to the flow being tested. • Set null payload: Defines a null payload to test how your flow will handle a null value. • After Suite: Runs after executing all of the MUnit tests and runs just once. For instance, let’s suppose you have an MUnit Test Suite File with four tests. The code inside an MUnit After Suite, runs just once, after all of your tests. • After Test: Runs after executing an MUnit test. For instance, let’s suppose you have an MUnit Test Suite file with four tests. The code inside an MUnit After Test runs after each of your four tests; it runs four times. • Before Suite: Runs before executing all of the MUnit tests and runs just once. For example, suppose you have an MUnit Test Suite file with four tests. The code inside an MUnit Before Suite runs just once, before all of your four tests. • Before Test: Runs before executing an MUnit test. For instance, let’s suppose you have an MUnit Test Suite file with four tests. The code inside an MUnit Before test runs before each of your four tests; it runs four times. MUnit Operations:
  • 15. All contents © MuleSoft Inc. 15 • Assert That: Allows you to run assertions to validate the state of a Mule event, such as checking to see if a payload equals a certain value. • Fail: Useful in validating that a test should fail if that point is reached in the flow. The processor throws a java.lang.AssertionError. • Mock When: Use this processor to mock an event, such as sending a mock POST request with a mocked payload. • Run Custom: Allows you to assert the Mule event content against a custom assertion. • Verify Call: Allows you to verify if a processor was called. • Spy: Allows you to see what happens before and after an event processor is called in your Flow. Usually, you will tell the Spy processor to run a set of instructions before and after the execution. MUnit Tools:
  • 16. All contents © MuleSoft Inc. 16 Head-to-head comparison vs. legacy middleware
  • 17. All contents © MuleSoft Inc. 17 The pain of testing today #MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
  • 18. All contents © MuleSoft Inc. 18 Munit test recorder Let us quickly go through a tutorial on how to record a test and generate a flow. https://developer.mulesoft.com/tutorials-and-howtos/quick-start/getting-started-with- the-munit-test-recorder
  • 19. All contents © MuleSoft Inc. 19 Generally available from April 30th 2020 • Automate test creation: Capture flow execution with the new Munit test recorder to automatically generate tests. • Scale with confidence: Leverage runtime performance improvements for more efficient code execution. • Collaborate on API Specs: Pull and update API specifications within Studio and merge them back to Design Center. Anypoint Studio 7.5 and Mule 4.3 #MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
  • 20. All contents © MuleSoft Inc. Where to go next? 20#MulesoftMeetup #FaridabadMulesoft @FaridaMulesoft @mulesoft
  • 21. Q & A
  • 23. All contents © MuleSoft Inc. Take a stand ! 23 • Nominate yourself for the next meetup speaker and suggest a topic as well. • Either for our virtual meetup speaker, or in-person meetup speaker. • Surprise swag for upcoming Speakers. • Fill this form - https://bit.ly/speakar
  • 24. All contents © MuleSoft Inc. What’s next 24 • Share: – Tweet/share in LinkedIn , facebook, Instagram with your pictures with the hashtag #FaridabadMuleMeetup #MuleSoftMeetup – Also use #BringMuleSoftConnectToFaridabad to reach our wish to MuleSoft  – Invite your network to join: https://meetups.mulesoft.com/Faridabad/ • Feedback: – Please fill out the slips with details like are you new to Mule? If so what technology you are currently working , What makes you to think of adopting MuleSoft and what topic you are expecting in future Meetups – Contact MuleSoft at meetup@mulesoft.com for ways to improve the program – Your Feedback is Food for us. https://bit.ly/f-mf • Our next meetup: – Date: TBD – Location: Faridabad/Virtual – Topic: TBD
  • 25. THANK YOU  #Everyone for becoming a part of such a great #community.