SlideShare une entreprise Scribd logo
1  sur  8
What is Testing
Test Flavors
Test Tooling
 what is Munit and what are its uses in Relattion to Mule
What Test Driven Development and how it helps
M U N I T i n M u l e
What is Testing
In general, testing is finding out how well something works.
In terms of human beings, testing tells what level of knowledge or skill
has been acquired.
In computer hardware and software development, testing is used at key
checkpoints in the overall process to determine whether objectives are
being met.
For example, in software development, product objectives are sometimes
tested by product user representatives.
When the design is complete, coding follows and the finished code is
then tested at the unit or module level by each programmer;
at the component level by the group of programmers involved; and at
the system level when all components are combined together.
At early or late stages, a product or service may also be tested
for usability.
Testing Flavors
Unit tests
Tests 'units' of work
Fast, no external systems, always returns the same result
Considered portable, any developer can run them
Integration tests
Tests interactions between components.
Often using external resources in test, typically mocked in a unit test
Functional tests
Tests the functional requirement(s) of the application
Testing Benefits
Iterate comfortably
Tests act as descriptors of application-interaction
Fast root cause analysis
Less time debugging
Confidence in your work
Tools available for doing the Unit Test
Junit
Most used Java framework to write repeatable tests
Requires a mocking framework such as Mockito to perform unit tests
• Munit
Mule testing framework
Rich feature set built in, including mocking
Written in XML or Java
We'll be focusing on MUnit in this module; test cases written in MUnit and
Junit
can be included in your builds
Test Driven Development - TDD
1. Write a test
2. Run the test and verify it fails
3. Write the smallest / simplest solution to make the test pass
4. Re-run the test and verify it passes
5. Look for refactoring opportunities
Pros
Naturally creates a regression test suite
Resolving tests can bring visibility to subtle design
patterns
Less risk of (accidentally) changing functionality or
introducing bugs
Becomes inherent in the build life cycle
Developers ensure they don't break other features in
the project
Cons
Requires additional upfront time
Mule's abstraction can challenge purist TDD guidelines
Requires a buy in with engineering
MUnit libraries are available within MuleSoft
If Studio is doing POM maintenance for you, this dependency and others are
take care of
• Part of releases
• Placed as a test scope within Maven dependencies
• Package: org.mule.munit
• Artifact: munit
<dependency>
<groupId>org.mule.munit</groupId>
<artifactId>munit</artifactId>
<version>${munit.version}</version>
<scope>test</scope>
</dependency>
<plugin>
<groupId>org.mule.munit.tools</groupId>
<artifactId>munit-maven-plugin</artifactId>
<version>${munit.version}</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>Example Munit Test Case :
munit:config is expected for each test case
<munit:config/>
– Defines behavior of connectors and endpoints
• Spring is used to import configuration(s)
<spring:beans>
<spring:importresource="order6provisioning.xml"/>
<spring:importresource="order6retrieval.xml"/>
</spring:beans>
A truth about returned result(s) or execution context
• Expressive configuration using MEL
• Custom (Java) assertions supported
• Similar to assertions in *Unit frameworks
<munit:assert-truecondition="#[payloadisjava.util.Map]"/>
<munit:assert-on-equalsexpectedValue="#[string:'Hello']"
actualValue="#[payload.toString()]"/>
<munit:assert-falsecondition="#[payload.length=0]"/>
<munit:assert-not-null/>
<munit:assert-not-sameexpectedValue='#[string:]‘actualValue='#[payload]'/>

Contenu connexe

Tendances

Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategiesKrishna Sujeer
 
Upstate CSCI 540 Unit testing
Upstate CSCI 540 Unit testingUpstate CSCI 540 Unit testing
Upstate CSCI 540 Unit testingDanWooster1
 
Testing & continuous delivery
Testing & continuous deliveryTesting & continuous delivery
Testing & continuous deliveryNelson Melina
 
Object Oriented Analysis
Object Oriented AnalysisObject Oriented Analysis
Object Oriented AnalysisAMITJain879
 
Integration testing
Integration testingIntegration testing
Integration testingVaibhav Dash
 
Python: Object-oriented Testing
Python: Object-oriented TestingPython: Object-oriented Testing
Python: Object-oriented TestingDamian T. Gordon
 
Unit Testing vs Integration Testing
Unit Testing vs Integration TestingUnit Testing vs Integration Testing
Unit Testing vs Integration TestingRock Interview
 
Integration testing
Integration testingIntegration testing
Integration testingTechversant
 
SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)Amr E. Mohamed
 
Role of a Software Tester
Role of a Software TesterRole of a Software Tester
Role of a Software TesterQAI Global
 
Practical unit testing in c & c++
Practical unit testing in c & c++Practical unit testing in c & c++
Practical unit testing in c & c++Matt Hargett
 
Integration testing complete overview
Integration testing complete overviewIntegration testing complete overview
Integration testing complete overviewTestingXperts
 
Software Engineering- Types of Testing
Software Engineering- Types of TestingSoftware Engineering- Types of Testing
Software Engineering- Types of TestingTrinity Dwarka
 

Tendances (20)

Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategies
 
Upstate CSCI 540 Unit testing
Upstate CSCI 540 Unit testingUpstate CSCI 540 Unit testing
Upstate CSCI 540 Unit testing
 
Testing & continuous delivery
Testing & continuous deliveryTesting & continuous delivery
Testing & continuous delivery
 
Object Oriented Analysis
Object Oriented AnalysisObject Oriented Analysis
Object Oriented Analysis
 
Integration testing
Integration testingIntegration testing
Integration testing
 
Python: Object-oriented Testing
Python: Object-oriented TestingPython: Object-oriented Testing
Python: Object-oriented Testing
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Unit Testing vs Integration Testing
Unit Testing vs Integration TestingUnit Testing vs Integration Testing
Unit Testing vs Integration Testing
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
unit testing
unit testingunit testing
unit testing
 
Integration testing
Integration testingIntegration testing
Integration testing
 
SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)
 
Software testing
Software testingSoftware testing
Software testing
 
Role of a Software Tester
Role of a Software TesterRole of a Software Tester
Role of a Software Tester
 
Testing
TestingTesting
Testing
 
Regression testing
Regression testingRegression testing
Regression testing
 
Practical unit testing in c & c++
Practical unit testing in c & c++Practical unit testing in c & c++
Practical unit testing in c & c++
 
Integration testing complete overview
Integration testing complete overviewIntegration testing complete overview
Integration testing complete overview
 
Software Engineering- Types of Testing
Software Engineering- Types of TestingSoftware Engineering- Types of Testing
Software Engineering- Types of Testing
 

En vedette

Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...
Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...
Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...Ryft
 
Корупційні злочини та адміністративні правопорушення, пов'язані з корупцією
Корупційні злочини та адміністративні правопорушення, пов'язані з корупцієюКорупційні злочини та адміністративні правопорушення, пов'язані з корупцією
Корупційні злочини та адміністративні правопорушення, пов'язані з корупцієюЦентр громадського здоров'я МОЗ України
 
Brochure frans l. blomlaan 47
Brochure   frans l. blomlaan 47Brochure   frans l. blomlaan 47
Brochure frans l. blomlaan 47Woningadviseurs
 
Mlieko na opaľovanie SPF 30
Mlieko na opaľovanie SPF 30Mlieko na opaľovanie SPF 30
Mlieko na opaľovanie SPF 301tiande
 
Hotel Management System SRS
Hotel Management System SRS Hotel Management System SRS
Hotel Management System SRS Paras
 
MuleSoft Anypoint Studio - Essentials - Data Filtering
MuleSoft Anypoint Studio - Essentials - Data FilteringMuleSoft Anypoint Studio - Essentials - Data Filtering
MuleSoft Anypoint Studio - Essentials - Data FilteringVenkataNaveen Kumar
 
How to make innovation happen.
How to make innovation happen.How to make innovation happen.
How to make innovation happen.Dave Zamora
 
Java Components and their applicability in Mule Anypoint Studio
Java Components and their applicability in Mule Anypoint StudioJava Components and their applicability in Mule Anypoint Studio
Java Components and their applicability in Mule Anypoint StudioVenkataNaveen Kumar
 
Improving Schools With Social Media
Improving Schools With Social MediaImproving Schools With Social Media
Improving Schools With Social MediaEric Sheninger
 
Diagrama de V GOWIN.
Diagrama de V GOWIN.Diagrama de V GOWIN.
Diagrama de V GOWIN.Jose Quintero
 
A penfriend
A penfriendA penfriend
A penfriendM CP
 
Maroc, 2010-Programme du seminaire de cloture
Maroc, 2010-Programme du seminaire de clotureMaroc, 2010-Programme du seminaire de cloture
Maroc, 2010-Programme du seminaire de clotureExternalEvents
 

En vedette (20)

Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...
Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...
Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...
 
Корупційні злочини та адміністративні правопорушення, пов'язані з корупцією
Корупційні злочини та адміністративні правопорушення, пов'язані з корупцієюКорупційні злочини та адміністративні правопорушення, пов'язані з корупцією
Корупційні злочини та адміністративні правопорушення, пов'язані з корупцією
 
Brochure frans l. blomlaan 47
Brochure   frans l. blomlaan 47Brochure   frans l. blomlaan 47
Brochure frans l. blomlaan 47
 
Squad Tech event
Squad Tech eventSquad Tech event
Squad Tech event
 
Módulo Manejo de TIC
Módulo Manejo de TICMódulo Manejo de TIC
Módulo Manejo de TIC
 
Mlieko na opaľovanie SPF 30
Mlieko na opaľovanie SPF 30Mlieko na opaľovanie SPF 30
Mlieko na opaľovanie SPF 30
 
egergergerg
egergergergegergergerg
egergergerg
 
Hotel Management System SRS
Hotel Management System SRS Hotel Management System SRS
Hotel Management System SRS
 
Mule soft csv_toxml
Mule soft csv_toxmlMule soft csv_toxml
Mule soft csv_toxml
 
MuleSoft Anypoint Studio - Essentials - Data Filtering
MuleSoft Anypoint Studio - Essentials - Data FilteringMuleSoft Anypoint Studio - Essentials - Data Filtering
MuleSoft Anypoint Studio - Essentials - Data Filtering
 
Types of MessageRouting in Mule
Types of MessageRouting in MuleTypes of MessageRouting in Mule
Types of MessageRouting in Mule
 
Thread Management In Mule
Thread Management In MuleThread Management In Mule
Thread Management In Mule
 
V de gonwin
V de gonwinV de gonwin
V de gonwin
 
How to make innovation happen.
How to make innovation happen.How to make innovation happen.
How to make innovation happen.
 
Java Components and their applicability in Mule Anypoint Studio
Java Components and their applicability in Mule Anypoint StudioJava Components and their applicability in Mule Anypoint Studio
Java Components and their applicability in Mule Anypoint Studio
 
Improving Schools With Social Media
Improving Schools With Social MediaImproving Schools With Social Media
Improving Schools With Social Media
 
Diagrama de la neurolinguistica
Diagrama de la neurolinguisticaDiagrama de la neurolinguistica
Diagrama de la neurolinguistica
 
Diagrama de V GOWIN.
Diagrama de V GOWIN.Diagrama de V GOWIN.
Diagrama de V GOWIN.
 
A penfriend
A penfriendA penfriend
A penfriend
 
Maroc, 2010-Programme du seminaire de cloture
Maroc, 2010-Programme du seminaire de clotureMaroc, 2010-Programme du seminaire de cloture
Maroc, 2010-Programme du seminaire de cloture
 

Similaire à Munit_in_mule_naveen

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 throughout the software life cycle
Testing throughout the software life cycleTesting throughout the software life cycle
Testing throughout the software life cycleMusTufa Nullwala
 
Introduction to Unit Testing for Mule Flows using Munit(Java) - Part 1
Introduction to Unit Testing for Mule Flows using Munit(Java) - Part 1Introduction to Unit Testing for Mule Flows using Munit(Java) - Part 1
Introduction to Unit Testing for Mule Flows using Munit(Java) - Part 1Alex Fernandez
 
What is integration testing
What is integration testingWhat is integration testing
What is integration testingTestingXperts
 
Software Testing Strategies ,Validation Testing and System Testing.
Software Testing Strategies ,Validation Testing and System Testing.Software Testing Strategies ,Validation Testing and System Testing.
Software Testing Strategies ,Validation Testing and System Testing.Tanzeem Aslam
 
Ch 2 Apraoaches Of Software Testing
Ch 2 Apraoaches Of Software Testing Ch 2 Apraoaches Of Software Testing
Ch 2 Apraoaches Of Software Testing Prof .Pragati Khade
 
Testing Strategies in .NET: From Unit Testing to Integration Testing
Testing Strategies in .NET: From Unit Testing to Integration TestingTesting Strategies in .NET: From Unit Testing to Integration Testing
Testing Strategies in .NET: From Unit Testing to Integration TestingTyrion Lannister
 
SE Group H.pptx
SE Group H.pptxSE Group H.pptx
SE Group H.pptxStudyvAbhi
 
Software Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSoftware Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSrikanth Krishnamoorthy
 
Welingkar_final project_ppt_IMPORTANCE & NEED FOR TESTING
Welingkar_final project_ppt_IMPORTANCE & NEED FOR TESTINGWelingkar_final project_ppt_IMPORTANCE & NEED FOR TESTING
Welingkar_final project_ppt_IMPORTANCE & NEED FOR TESTINGSachin Pathania
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Mohamed Taman
 
Object Oriented Testing(OOT) presentation slides
Object Oriented Testing(OOT) presentation slidesObject Oriented Testing(OOT) presentation slides
Object Oriented Testing(OOT) presentation slidesPunjab University
 
5 Best Unit Test Frameworks to Automate Unit Tests
5 Best Unit Test Frameworks to Automate Unit Tests5 Best Unit Test Frameworks to Automate Unit Tests
5 Best Unit Test Frameworks to Automate Unit TestsSerena Gray
 
JUnit with_mocking
JUnit with_mockingJUnit with_mocking
JUnit with_mockingZeeshan Khan
 
Unit testing using Munit Part 1
Unit testing using Munit Part 1Unit testing using Munit Part 1
Unit testing using Munit Part 1Anand kalla
 

Similaire à Munit_in_mule_naveen (20)

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++
 
Test driven development(tdd)
Test driven development(tdd)Test driven development(tdd)
Test driven development(tdd)
 
Testing throughout the software life cycle
Testing throughout the software life cycleTesting throughout the software life cycle
Testing throughout the software life cycle
 
Introduction to Unit Testing for Mule Flows using Munit(Java) - Part 1
Introduction to Unit Testing for Mule Flows using Munit(Java) - Part 1Introduction to Unit Testing for Mule Flows using Munit(Java) - Part 1
Introduction to Unit Testing for Mule Flows using Munit(Java) - Part 1
 
What is integration testing
What is integration testingWhat is integration testing
What is integration testing
 
Software Testing Strategies ,Validation Testing and System Testing.
Software Testing Strategies ,Validation Testing and System Testing.Software Testing Strategies ,Validation Testing and System Testing.
Software Testing Strategies ,Validation Testing and System Testing.
 
Ch 2 Apraoaches Of Software Testing
Ch 2 Apraoaches Of Software Testing Ch 2 Apraoaches Of Software Testing
Ch 2 Apraoaches Of Software Testing
 
Unit testing, principles
Unit testing, principlesUnit testing, principles
Unit testing, principles
 
Testing Strategies in .NET: From Unit Testing to Integration Testing
Testing Strategies in .NET: From Unit Testing to Integration TestingTesting Strategies in .NET: From Unit Testing to Integration Testing
Testing Strategies in .NET: From Unit Testing to Integration Testing
 
SE Group H.pptx
SE Group H.pptxSE Group H.pptx
SE Group H.pptx
 
Software Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSoftware Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By Srikanth
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
 
software engineering
software engineeringsoftware engineering
software engineering
 
Welingkar_final project_ppt_IMPORTANCE & NEED FOR TESTING
Welingkar_final project_ppt_IMPORTANCE & NEED FOR TESTINGWelingkar_final project_ppt_IMPORTANCE & NEED FOR TESTING
Welingkar_final project_ppt_IMPORTANCE & NEED FOR TESTING
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.
 
Object Oriented Testing(OOT) presentation slides
Object Oriented Testing(OOT) presentation slidesObject Oriented Testing(OOT) presentation slides
Object Oriented Testing(OOT) presentation slides
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
5 Best Unit Test Frameworks to Automate Unit Tests
5 Best Unit Test Frameworks to Automate Unit Tests5 Best Unit Test Frameworks to Automate Unit Tests
5 Best Unit Test Frameworks to Automate Unit Tests
 
JUnit with_mocking
JUnit with_mockingJUnit with_mocking
JUnit with_mocking
 
Unit testing using Munit Part 1
Unit testing using Munit Part 1Unit testing using Munit Part 1
Unit testing using Munit Part 1
 

Dernier

A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 

Dernier (20)

A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 

Munit_in_mule_naveen

  • 1.
  • 2. What is Testing Test Flavors Test Tooling  what is Munit and what are its uses in Relattion to Mule What Test Driven Development and how it helps M U N I T i n M u l e
  • 3. What is Testing In general, testing is finding out how well something works. In terms of human beings, testing tells what level of knowledge or skill has been acquired. In computer hardware and software development, testing is used at key checkpoints in the overall process to determine whether objectives are being met. For example, in software development, product objectives are sometimes tested by product user representatives. When the design is complete, coding follows and the finished code is then tested at the unit or module level by each programmer; at the component level by the group of programmers involved; and at the system level when all components are combined together. At early or late stages, a product or service may also be tested for usability.
  • 4. Testing Flavors Unit tests Tests 'units' of work Fast, no external systems, always returns the same result Considered portable, any developer can run them Integration tests Tests interactions between components. Often using external resources in test, typically mocked in a unit test Functional tests Tests the functional requirement(s) of the application Testing Benefits Iterate comfortably Tests act as descriptors of application-interaction Fast root cause analysis Less time debugging Confidence in your work
  • 5. Tools available for doing the Unit Test Junit Most used Java framework to write repeatable tests Requires a mocking framework such as Mockito to perform unit tests • Munit Mule testing framework Rich feature set built in, including mocking Written in XML or Java We'll be focusing on MUnit in this module; test cases written in MUnit and Junit can be included in your builds
  • 6. Test Driven Development - TDD 1. Write a test 2. Run the test and verify it fails 3. Write the smallest / simplest solution to make the test pass 4. Re-run the test and verify it passes 5. Look for refactoring opportunities Pros Naturally creates a regression test suite Resolving tests can bring visibility to subtle design patterns Less risk of (accidentally) changing functionality or introducing bugs Becomes inherent in the build life cycle Developers ensure they don't break other features in the project Cons Requires additional upfront time Mule's abstraction can challenge purist TDD guidelines Requires a buy in with engineering
  • 7. MUnit libraries are available within MuleSoft If Studio is doing POM maintenance for you, this dependency and others are take care of • Part of releases • Placed as a test scope within Maven dependencies • Package: org.mule.munit • Artifact: munit <dependency> <groupId>org.mule.munit</groupId> <artifactId>munit</artifactId> <version>${munit.version}</version> <scope>test</scope> </dependency> <plugin> <groupId>org.mule.munit.tools</groupId> <artifactId>munit-maven-plugin</artifactId> <version>${munit.version}</version> <executions> <execution> <phase>test</phase> <goals> <goal>test</goal> </goals> </execution> </executions> </plugin>Example Munit Test Case :
  • 8. munit:config is expected for each test case <munit:config/> – Defines behavior of connectors and endpoints • Spring is used to import configuration(s) <spring:beans> <spring:importresource="order6provisioning.xml"/> <spring:importresource="order6retrieval.xml"/> </spring:beans> A truth about returned result(s) or execution context • Expressive configuration using MEL • Custom (Java) assertions supported • Similar to assertions in *Unit frameworks <munit:assert-truecondition="#[payloadisjava.util.Map]"/> <munit:assert-on-equalsexpectedValue="#[string:'Hello']" actualValue="#[payload.toString()]"/> <munit:assert-falsecondition="#[payload.length=0]"/> <munit:assert-not-null/> <munit:assert-not-sameexpectedValue='#[string:]‘actualValue='#[payload]'/>