Mule esb munit

Embed Size (px)

Citation preview

Emerging Tech Series E: Knowledge Management automation of impacts

MULE ESB- Munit

Objectives

Learn about Munit

Test Driven Development with MUnit

Why Testing ?

Iterate comfortably

Tests act as descriptors of application-interaction

Fast root cause analysis

Less time debugging

Confidence in your work

Test Driven Development

Software development process that relies on repetitions of very short

development cycles

1. Write an initially failing test that defines desired behavior2. Write the smallest / simplest solution to make the test pass3. Re-run the test and verify it passes4. Refactor into new code to acceptable standards5. Repeat

Tools for testing

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

Test suites written in MUnit and JUnit can be included in Maven builds

Supports continuous integration

About MUnit

Testing framework that allows you to easily build automated tests for

your integrations and APIs Create your Mule test by writing Mule code

Create your Mule test by writing Java code

Fully integrated with Anypoint Studio, allowing you to create, design

and run MUnit tests just like you would Mule applicationsFully integrated with Maven

libraries are available within MuleSoft public nexus

Placed as a test scope within Maven dependencies

Triggered on the test phase

Works with surefire-reports

Munit use-

Integration

Write test flows in Mule and/or Java code: Engage quickly

Fully integrated with Maven: MUnit tests can be added to CI process

Fully integrated with Surefire: Allows the generation of Surefire reports

Mocking

Selected inbound endpoints: i.e. AMQP, JMS, FTP

Selected message processors: i.e. by defining the namespace and name

(jira:create-group)

Mock outbound endpoints: Enabling complete encapsulation of the flow unit test

MUnit Anypoint Studio integration

Requirement: MUnit Studio plugin installed

Provides graphical tooling for building MUnit tests

Available from http://studio.mulesoft.org/r5/munit

Click to edit Master title style

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

1/16/2017

Click to edit Master title style

Click to edit Master subtitle style

1/16/2017

Click to edit Master title style

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

1/16/2017

Click to edit Master title style

Click to edit Master text styles

1/16/2017

Click to edit Master title style

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

1/16/2017

Click to edit Master title style

Click to edit Master text styles

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Click to edit Master text styles

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

1/16/2017

Click to edit Master title style

1/16/2017

1/16/2017

Click to edit Master title style

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Click to edit Master text styles

1/16/2017

Click to edit Master title style

Click icon to add picture

Click to edit Master text styles

1/16/2017

Click to edit Master title style

Click to edit Master text styles

1/16/2017

Click to edit Master title style

Click to edit Master text styles

Click to edit Master text styles

1/16/2017

Click to edit Master title style

Click to edit Master text styles

1/16/2017

Click to edit Master title style

Click to edit Master text styles

Click to edit Master text styles

1/16/2017

Click to edit Master title style

Click to edit Master text styles

Click to edit Master text styles

1/16/2017

Click to edit Master title style

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

1/16/2017

Click to edit Master title style

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

1/16/2017