SlideShare a Scribd company logo
A unit test is an automated piece of code that invokes a unit of work in the system and then checks a single assumption about
the behavior of that unit of work.
A unit of work is a single logical functional use case in the system that can be invoked by some public interface (in most cases). A unit of
work can span a single method, a whole class or multiple classes working together to achieve one single logical purpose that can
be verified.
1. Able to be fully automated
2. Has full control over all the pieces running (Use mocks or stubs to achieve this isolation when needed)
3. Can be run in any order if part of many other tests
4. Runs in memory (no DB or File access, for example)
5. Consistently returns the same result (You always run the same test, so no random numbers, for example.
save those for integration or range tests)
6. Runs fast
7. Tests a single logical concept in the system
8. Readable
9. Maintainable
10.Trustworthy (when you see its result, you don’t need to debug the code just to be sure)
1. Tests Reduce Bugs in New Features
2. Tests Reduce Bugs in Existing Features
3. Tests Are Good Documentation
4. Tests Reduce the Cost of Change
5. Tests Improve Design
6. Tests Allow Refactoring
7. Tests Constrain Features
8. Tests Defend Against Other Programmers
Anypoint Studio (any Runtime)
● Junit
● Munit
● Hamcrest
JUnit is a simple framework to write
repeatable tests. It is an instance of the
xUnit architecture for unit testing
frameworks.
MUnit is a Mule application testing framework that allows you to easily build automated tests for your
integrations and APIs. It provides a full suite of integration and unit test capabilities, and is fully
integrated with Maven and Surefire for integration with your continuous deployment environment.
Create your Mule test by writing Mule code
Create your Mule test by writing Java code
Disable flow inbound endpoints
Disable endpoint connectors
Mock outbound endpoints
Mock message processors
Verify message processor calls
Create not only unit tests but also integration tests in a local environment — MUnit allows you to start a local
FTP/SFTP, DB server or mail server
Call the Mule client from Mule code
Assert flow exceptions
Enable or disable particular tests
See assertion/error reports with Mule stack trace
http://artofunittesting.com/definition-of-a-
unit-test/
http://junit.org/
https://docs.mulesoft.com/mule-user-
guide/v/3.7/munit
http://www.onjava.com/pub/a/onjava/2003/04/02/javaxpckbk.html

More Related Content

What's hot

Unit Testing with Python
Unit Testing with PythonUnit Testing with Python
Unit Testing with Python
MicroPyramid .
 
Beginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NETBeginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NET
Baskar K
 
Unit Testing in PHP
Unit Testing in PHPUnit Testing in PHP
Unit Testing in PHP
Radu Murzea
 
RIA 05 - Unit Testing by Ajinkya Prabhune
RIA 05 - Unit Testing by Ajinkya PrabhuneRIA 05 - Unit Testing by Ajinkya Prabhune
RIA 05 - Unit Testing by Ajinkya Prabhune
Johannes Hoppe
 
Unit Testing Using N Unit
Unit Testing Using N UnitUnit Testing Using N Unit
Unit Testing Using N Unit
Gaurav Arora
 
TestNG with selenium
TestNG with seleniumTestNG with selenium
TestNG with selenium
Gousalya Ramachandran
 
How and what to unit test
How and what to unit testHow and what to unit test
How and what to unit test
Eugenio Lentini
 
Nunit
NunitNunit
Nunit
Mahi Kumar
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration Testing
David Berliner
 
Selenium with java
Selenium with javaSelenium with java
Selenium with java
Gousalya Ramachandran
 
Test driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + EclipseTest driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + Eclipse
UTC Fire & Security
 
Introduction of TestNG framework and its benefits over Junit framework
Introduction of TestNG framework and its benefits over Junit frameworkIntroduction of TestNG framework and its benefits over Junit framework
Introduction of TestNG framework and its benefits over Junit framework
BugRaptors
 
Unit Testing in WordPress
Unit Testing in WordPressUnit Testing in WordPress
Unit Testing in WordPress
Barry Kooij
 
Intro To Unit and integration Testing
Intro To Unit and integration TestingIntro To Unit and integration Testing
Intro To Unit and integration Testing
Paul Churchward
 
Unit Tests And Automated Testing
Unit Tests And Automated TestingUnit Tests And Automated Testing
Unit Tests And Automated Testing
Lee Englestone
 
Unit Testing (C#)
Unit Testing (C#)Unit Testing (C#)
Unit Testing (C#)
Prashant Cholachagudd
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
Joe Tremblay
 
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Thomas Weller
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ide
Testertester Jaipur
 
Tdd & unit test
Tdd & unit testTdd & unit test
Tdd & unit test
GomathiNayagam S
 

What's hot (20)

Unit Testing with Python
Unit Testing with PythonUnit Testing with Python
Unit Testing with Python
 
Beginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NETBeginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NET
 
Unit Testing in PHP
Unit Testing in PHPUnit Testing in PHP
Unit Testing in PHP
 
RIA 05 - Unit Testing by Ajinkya Prabhune
RIA 05 - Unit Testing by Ajinkya PrabhuneRIA 05 - Unit Testing by Ajinkya Prabhune
RIA 05 - Unit Testing by Ajinkya Prabhune
 
Unit Testing Using N Unit
Unit Testing Using N UnitUnit Testing Using N Unit
Unit Testing Using N Unit
 
TestNG with selenium
TestNG with seleniumTestNG with selenium
TestNG with selenium
 
How and what to unit test
How and what to unit testHow and what to unit test
How and what to unit test
 
Nunit
NunitNunit
Nunit
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration Testing
 
Selenium with java
Selenium with javaSelenium with java
Selenium with java
 
Test driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + EclipseTest driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + Eclipse
 
Introduction of TestNG framework and its benefits over Junit framework
Introduction of TestNG framework and its benefits over Junit frameworkIntroduction of TestNG framework and its benefits over Junit framework
Introduction of TestNG framework and its benefits over Junit framework
 
Unit Testing in WordPress
Unit Testing in WordPressUnit Testing in WordPress
Unit Testing in WordPress
 
Intro To Unit and integration Testing
Intro To Unit and integration TestingIntro To Unit and integration Testing
Intro To Unit and integration Testing
 
Unit Tests And Automated Testing
Unit Tests And Automated TestingUnit Tests And Automated Testing
Unit Tests And Automated Testing
 
Unit Testing (C#)
Unit Testing (C#)Unit Testing (C#)
Unit Testing (C#)
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ide
 
Tdd & unit test
Tdd & unit testTdd & unit test
Tdd & unit test
 

Viewers also liked

Mule: Munit domain support
Mule: Munit domain supportMule: Munit domain support
Mule: Munit domain support
Shanky Gupta
 
Overview of MUnit
Overview of MUnitOverview of MUnit
Overview of MUnit
Manik S Magar
 
Mule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutesMule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutes
Gennaro Spagnoli
 
Munit Mule ESB
Munit Mule ESBMunit Mule ESB
Munit Mule ESB
Harish Kumar
 
Mule security - saml
Mule  security - samlMule  security - saml
Mule security - saml
vishnukanthro45
 
Mule anypoint workday-devkit
Mule  anypoint workday-devkitMule  anypoint workday-devkit
Mule anypoint workday-devkit
vishnukanthro45
 
Luis Cernuda Rúbrica de evaluación
Luis Cernuda Rúbrica de evaluación Luis Cernuda Rúbrica de evaluación
Luis Cernuda Rúbrica de evaluación
tomasrodriguezreyes
 
Conectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbcConectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbc
Jeison Barros
 
How to make ... Canva
How to make ... CanvaHow to make ... Canva
How to make ... Canva
Joanna Soltysiak
 
Resume of Mahesh Shingala
Resume of Mahesh ShingalaResume of Mahesh Shingala
Resume of Mahesh Shingala
Shingala Maheshkumar
 
Tugas so
Tugas soTugas so
Tugas so
Zacky Zacky
 
XYZ Stars y Solar System Pathway, una experiencia museística de divulgación ...
XYZ Stars y Solar System Pathway,  una experiencia museística de divulgación ...XYZ Stars y Solar System Pathway,  una experiencia museística de divulgación ...
XYZ Stars y Solar System Pathway, una experiencia museística de divulgación ...
jdomen44
 
MuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation languageMuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation language
fganora
 
Mulesoft API
Mulesoft APIMulesoft API
Mulesoft API
Kleverton Fortunato
 
Radiografia pulmonar
Radiografia pulmonarRadiografia pulmonar
Radiografia pulmonar
Daniela Samudio
 
παππούα
παππούαπαππούα
παππούα5odimkat
 
Gallstones on Ultrasound - Are Gallstones Always Innocent?
Gallstones on Ultrasound - Are Gallstones Always Innocent?Gallstones on Ultrasound - Are Gallstones Always Innocent?
Gallstones on Ultrasound - Are Gallstones Always Innocent?
Radiology Archives
 
Mule esb basics beginners
Mule esb basics beginnersMule esb basics beginners
Mule esb basics beginners
veena naresh
 
Mule esb munit
Mule esb munitMule esb munit
Mule esb munit
D.Rajesh Kumar
 
Mule esb basics
Mule esb basicsMule esb basics
Mule esb basics
Naresh Naidu
 

Viewers also liked (20)

Mule: Munit domain support
Mule: Munit domain supportMule: Munit domain support
Mule: Munit domain support
 
Overview of MUnit
Overview of MUnitOverview of MUnit
Overview of MUnit
 
Mule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutesMule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutes
 
Munit Mule ESB
Munit Mule ESBMunit Mule ESB
Munit Mule ESB
 
Mule security - saml
Mule  security - samlMule  security - saml
Mule security - saml
 
Mule anypoint workday-devkit
Mule  anypoint workday-devkitMule  anypoint workday-devkit
Mule anypoint workday-devkit
 
Luis Cernuda Rúbrica de evaluación
Luis Cernuda Rúbrica de evaluación Luis Cernuda Rúbrica de evaluación
Luis Cernuda Rúbrica de evaluación
 
Conectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbcConectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbc
 
How to make ... Canva
How to make ... CanvaHow to make ... Canva
How to make ... Canva
 
Resume of Mahesh Shingala
Resume of Mahesh ShingalaResume of Mahesh Shingala
Resume of Mahesh Shingala
 
Tugas so
Tugas soTugas so
Tugas so
 
XYZ Stars y Solar System Pathway, una experiencia museística de divulgación ...
XYZ Stars y Solar System Pathway,  una experiencia museística de divulgación ...XYZ Stars y Solar System Pathway,  una experiencia museística de divulgación ...
XYZ Stars y Solar System Pathway, una experiencia museística de divulgación ...
 
MuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation languageMuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation language
 
Mulesoft API
Mulesoft APIMulesoft API
Mulesoft API
 
Radiografia pulmonar
Radiografia pulmonarRadiografia pulmonar
Radiografia pulmonar
 
παππούα
παππούαπαππούα
παππούα
 
Gallstones on Ultrasound - Are Gallstones Always Innocent?
Gallstones on Ultrasound - Are Gallstones Always Innocent?Gallstones on Ultrasound - Are Gallstones Always Innocent?
Gallstones on Ultrasound - Are Gallstones Always Innocent?
 
Mule esb basics beginners
Mule esb basics beginnersMule esb basics beginners
Mule esb basics beginners
 
Mule esb munit
Mule esb munitMule esb munit
Mule esb munit
 
Mule esb basics
Mule esb basicsMule esb basics
Mule esb basics
 

Similar to Unit testing using Munit Part 1

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
Alex Fernandez
 
Implementing TDD in for .net Core applications
Implementing TDD in for .net Core applicationsImplementing TDD in for .net Core applications
Implementing TDD in for .net Core applications
Ahmad Kazemi
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2
Tricode (part of Dept)
 
Munit_in_mule_naveen
Munit_in_mule_naveenMunit_in_mule_naveen
Munit_in_mule_naveen
VenkataNaveen Kumar
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
Quontra Solutions
 
Unit testing, principles
Unit testing, principlesUnit testing, principles
Unit testing, principles
Renato Primavera
 
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
 
An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testing
Adam Stephensen
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
Facundo Farias
 
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
 
Unit Testing in Java
Unit Testing in JavaUnit Testing in Java
Unit Testing in Java
Ahmed M. Gomaa
 
Presentation
PresentationPresentation
Presentation
Igor Vlahek
 
JUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkJUnit- A Unit Testing Framework
JUnit- A Unit Testing Framework
Onkar Deshpande
 
Bt0081 software engineering2
Bt0081 software engineering2Bt0081 software engineering2
Bt0081 software engineering2
Techglyphs
 
Testing mule
Testing   muleTesting   mule
Testing mule
Sindhu VL
 
Mule testing
Mule   testingMule   testing
Mule testing
Sindhu VL
 
Hadoop testing workshop - july 2013
Hadoop testing workshop - july 2013Hadoop testing workshop - july 2013
Hadoop testing workshop - july 2013
Ophir Cohen
 
Unit & integration testing
Unit & integration testingUnit & integration testing
Unit & integration testing
Pavlo Hodysh
 
Introduction testingmule
Introduction testingmuleIntroduction testingmule
Introduction testingmule
Srikrishna k
 
SOFTWARE Engineering (SOFTWARE TESTING).pptx
SOFTWARE Engineering (SOFTWARE TESTING).pptxSOFTWARE Engineering (SOFTWARE TESTING).pptx
SOFTWARE Engineering (SOFTWARE TESTING).pptx
arthurtembo02
 

Similar to Unit testing using Munit Part 1 (20)

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
 
Implementing TDD in for .net Core applications
Implementing TDD in for .net Core applicationsImplementing TDD in for .net Core applications
Implementing TDD in for .net Core applications
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2
 
Munit_in_mule_naveen
Munit_in_mule_naveenMunit_in_mule_naveen
Munit_in_mule_naveen
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
 
Unit testing, principles
Unit testing, principlesUnit testing, principles
Unit testing, principles
 
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++
 
An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testing
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
 
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.
 
Unit Testing in Java
Unit Testing in JavaUnit Testing in Java
Unit Testing in Java
 
Presentation
PresentationPresentation
Presentation
 
JUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkJUnit- A Unit Testing Framework
JUnit- A Unit Testing Framework
 
Bt0081 software engineering2
Bt0081 software engineering2Bt0081 software engineering2
Bt0081 software engineering2
 
Testing mule
Testing   muleTesting   mule
Testing mule
 
Mule testing
Mule   testingMule   testing
Mule testing
 
Hadoop testing workshop - july 2013
Hadoop testing workshop - july 2013Hadoop testing workshop - july 2013
Hadoop testing workshop - july 2013
 
Unit & integration testing
Unit & integration testingUnit & integration testing
Unit & integration testing
 
Introduction testingmule
Introduction testingmuleIntroduction testingmule
Introduction testingmule
 
SOFTWARE Engineering (SOFTWARE TESTING).pptx
SOFTWARE Engineering (SOFTWARE TESTING).pptxSOFTWARE Engineering (SOFTWARE TESTING).pptx
SOFTWARE Engineering (SOFTWARE TESTING).pptx
 

More from Anand kalla

Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
Anand kalla
 
Java Fundamentals in Mule
Java Fundamentals in MuleJava Fundamentals in Mule
Java Fundamentals in Mule
Anand kalla
 
Java in Mule
Java in MuleJava in Mule
Java in Mule
Anand kalla
 
web services
web servicesweb services
web services
Anand kalla
 
SOAP Service in Mule Esb
SOAP Service in Mule EsbSOAP Service in Mule Esb
SOAP Service in Mule Esb
Anand kalla
 
UDDI in Mule Esb
UDDI in Mule EsbUDDI in Mule Esb
UDDI in Mule Esb
Anand kalla
 
WSDL in Mule Esb
WSDL in Mule EsbWSDL in Mule Esb
WSDL in Mule Esb
Anand kalla
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
Anand kalla
 
Mule oracle connectors
Mule oracle connectorsMule oracle connectors
Mule oracle connectors
Anand kalla
 
Mule google connectors
Mule google connectorsMule google connectors
Mule google connectors
Anand kalla
 
Mule execution
Mule executionMule execution
Mule execution
Anand kalla
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
Anand kalla
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
Anand kalla
 
Mule architecture
Mule architectureMule architecture
Mule architecture
Anand kalla
 
Mule anypoint exchange
Mule anypoint exchangeMule anypoint exchange
Mule anypoint exchange
Anand kalla
 
Mule soap
Mule soapMule soap
Mule soap
Anand kalla
 
Mule soa
Mule soaMule soa
Mule soa
Anand kalla
 
Mule security saml
Mule security samlMule security saml
Mule security saml
Anand kalla
 
Mule security jaas
Mule security jaasMule security jaas
Mule security jaas
Anand kalla
 
Mule for each scope header collection
Mule for each scope header collectionMule for each scope header collection
Mule for each scope header collection
Anand kalla
 

More from Anand kalla (20)

Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
 
Java Fundamentals in Mule
Java Fundamentals in MuleJava Fundamentals in Mule
Java Fundamentals in Mule
 
Java in Mule
Java in MuleJava in Mule
Java in Mule
 
web services
web servicesweb services
web services
 
SOAP Service in Mule Esb
SOAP Service in Mule EsbSOAP Service in Mule Esb
SOAP Service in Mule Esb
 
UDDI in Mule Esb
UDDI in Mule EsbUDDI in Mule Esb
UDDI in Mule Esb
 
WSDL in Mule Esb
WSDL in Mule EsbWSDL in Mule Esb
WSDL in Mule Esb
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 
Mule oracle connectors
Mule oracle connectorsMule oracle connectors
Mule oracle connectors
 
Mule google connectors
Mule google connectorsMule google connectors
Mule google connectors
 
Mule execution
Mule executionMule execution
Mule execution
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Mule architecture
Mule architectureMule architecture
Mule architecture
 
Mule anypoint exchange
Mule anypoint exchangeMule anypoint exchange
Mule anypoint exchange
 
Mule soap
Mule soapMule soap
Mule soap
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule security saml
Mule security samlMule security saml
Mule security saml
 
Mule security jaas
Mule security jaasMule security jaas
Mule security jaas
 
Mule for each scope header collection
Mule for each scope header collectionMule for each scope header collection
Mule for each scope header collection
 

Recently uploaded

Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 

Recently uploaded (20)

Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 

Unit testing using Munit Part 1

  • 1.
  • 2. A unit test is an automated piece of code that invokes a unit of work in the system and then checks a single assumption about the behavior of that unit of work. A unit of work is a single logical functional use case in the system that can be invoked by some public interface (in most cases). A unit of work can span a single method, a whole class or multiple classes working together to achieve one single logical purpose that can be verified.
  • 3. 1. Able to be fully automated 2. Has full control over all the pieces running (Use mocks or stubs to achieve this isolation when needed) 3. Can be run in any order if part of many other tests 4. Runs in memory (no DB or File access, for example) 5. Consistently returns the same result (You always run the same test, so no random numbers, for example. save those for integration or range tests) 6. Runs fast 7. Tests a single logical concept in the system 8. Readable 9. Maintainable 10.Trustworthy (when you see its result, you don’t need to debug the code just to be sure)
  • 4. 1. Tests Reduce Bugs in New Features 2. Tests Reduce Bugs in Existing Features 3. Tests Are Good Documentation 4. Tests Reduce the Cost of Change 5. Tests Improve Design 6. Tests Allow Refactoring 7. Tests Constrain Features 8. Tests Defend Against Other Programmers
  • 5. Anypoint Studio (any Runtime) ● Junit ● Munit ● Hamcrest
  • 6. JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.
  • 7. MUnit is a Mule application testing framework that allows you to easily build automated tests for your integrations and APIs. It provides a full suite of integration and unit test capabilities, and is fully integrated with Maven and Surefire for integration with your continuous deployment environment.
  • 8. Create your Mule test by writing Mule code Create your Mule test by writing Java code Disable flow inbound endpoints Disable endpoint connectors Mock outbound endpoints Mock message processors
  • 9. Verify message processor calls Create not only unit tests but also integration tests in a local environment — MUnit allows you to start a local FTP/SFTP, DB server or mail server Call the Mule client from Mule code Assert flow exceptions Enable or disable particular tests See assertion/error reports with Mule stack trace