Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Stockholm MuleSoft Meetup - Albin Kjellin, 15 Feb 2018

750 views

Published on

Presentation on MUnit and Automated Testing by Albin Kjellin used during the MuleSoft Meetup Event in Stockholm on 15th of February.
The presentation covers basic MUnit concepts and an overview of more advanced MUnit features.

Published in: Technology
  • Very Good its so helpful for me and again thank you please share us more mule content for further studies....
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Stockholm MuleSoft Meetup - Albin Kjellin, 15 Feb 2018

  1. 1. mUnit - MeetUp 2018 Feb Albin - MuleSoft
  2. 2. All contents © MuleSoft Inc. Agenda 2 ● Intro ● Basics ● Features
  3. 3. API Lifecycle
  4. 4. Flow Designer Mocking Service API Console Anypoint Studio MUnit Runtime Manager API Manager API Portals Anypoint Analytics Anypoint Exchange API Designer
  5. 5. 3rd Party Tools JUnit Anypoint Platform Runtime Manager API Manager Exchange Commit Ship Image Mgmt Agent
  6. 6. mUnit Basics
  7. 7. All contents © MuleSoft Inc. 7 What is MUnit? • MUnit is a Mule testing framework • Allows Mule developers to automate testing Mule applications • Provides the ability to mock different Mule components so that the tests cases can be constrained and isolated.
  8. 8. All contents © MuleSoft Inc. 8 • 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 How is MUnit used?
  9. 9. All contents © MuleSoft Inc. 9 • Testing and asserting - Enables common assertions: i.e. assert-not-null, assert-on-equals, assert-that - Test the # of times a certain MP has been called: i.e. exactly once, at least once, at most once - “Spy” on MP’s before and after their execution: i.e. Introspect the payload before and after calling a certain component - Custom Assertions: Allows to extend the framework to support custom assertions (i.e. for complex validation) How is MUnit used?
  10. 10. Feature list
  11. 11. All contents © MuleSoft Inc. Feature List 11 Mock Verify Assert Spy Matchers Set Message Run And Wait Fake Services (FTP, DB, etc) Maven Support
  12. 12. All contents © MuleSoft Inc. MUnit lets you define Mule Messages in a more powerful way. 12 Feature list - Set Message
  13. 13. All contents © MuleSoft Inc. Feature List - Mocks Mock wraps all message processors 13
  14. 14. All contents © MuleSoft Inc. Feature List - Verify Verify lets you validate a message processor call 14
  15. 15. All contents © MuleSoft Inc. Feature List - Assert Assert lets you validate the state of a Mule Message 15
  16. 16. All contents © MuleSoft Inc. Feature List - Spy Spy lets you see and take some actions before and after a message processor execution 16
  17. 17. All contents © MuleSoft Inc. Feature List - Matchers Matchers are a set of MEL functions that helps in the creation of mocks and validations 17
  18. 18. All contents © MuleSoft Inc. Synchronize lets you have your test waiting until all the asynchronous executions are done Feature List - Run & wait 18
  19. 19. All contents © MuleSoft Inc. MUnit provides a set of in-memory implementations for common services such as DB, FTP, Mails Feature list - Fake services 19
  20. 20. All contents © MuleSoft Inc. Feature List - Coverage report 20
  21. 21. Happy Testing!

×