As one of the longest running MuleSoft Meetups globally, Pace Integration have hosted hundreds of professionals with an interest in MuleSoft and APIs.
Featured topic: Unit Testing - How to test Transform components in a Mule Flow
There is more to writing MUnit Tests than mere code coverage. If we are going to test our code, as we should, the tests we write need to be meaningful. A proper Test-Driven approach may impact not only the tests we write, as developers, but also the very structure of the code within the Mule Flows we aim to test.
There are many ways to write a bad test. These can range from pointless to downright dangerous tests that offer developers and stakeholders a false sense of security. Here, we will delve into the art of testing Transforms, specifically. This is often where the lion’s share of a Mule project’s work is done, and yet it is an area often overlooked when writing MUnit tests.
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
TDD and MUnits for API-led Integration
1. Wed, 27th July 2022
London MuleSoft Meetup Group
Test Driven Development
Hosted by
2. Housekeeping
● All slides of this presentation will be uploaded on event page within 24 hours, along
with a recording of this meetup.
● Questions can be submitted/asked at any time in the Chat tab. Proper Q&A time will
be assigned at the end of our presentation. Make it Interactive!
● Give us feedback! Rate this meetup session by filling the feedback form at the end of
the day. We love feedback!
● At the end of the presentation, there will be a quiz where you will get a chance to
win a training voucher from MuleSoft!
2
3. 3
● 17:10 - Introducing tonight's host – Pace Integration
● 17:20 - Ice breaker quiz
● 17:30 - Introduction to TDD by May Jieamtarvorn
● 17:45 - TDD with MUnits by Sean Young
● 18:10 - Q&A
● 18:20 - Quiz and Giveaways
● 18:30 - Closing and in-person meetup suggestions
Agenda
4. Today’s Moderator and Host
4
Rajesh Rajmangal
Host
PACE INTEGRATION
Co-Founder & Strategic
Integration Architect
Smita Ramgolam
Moderator
PACE INTEGRATION
MuleSoft Capability Lead &
MuleSoft Mentor
6. About
● Pace Integration is a British technology consultancy that
solves your integration challenge – focused on enabling your
journey from strategy & operating model, platform
architecture that is key to the connected enterprise.
● We accelerate your digital change goals by partnering with
you to design, deliver and operate your integration solutions.
This enables you to unlock further value from your data assets
and create seamless business processes.
● We have tangible experience in delivering
Integration value aligned to your strategy - unique in our
market we provide skills to deliver solutions at the
highest quality and speed.
6
7. London Meetups
7
● As one of the longest running MuleSoft
Meetups globally, Pace Integration have
hosted hundreds of professionals with an
interest in MuleSoft and APIs.
● Thanks to all of those who supported the
London Meetup, helping us keep our
Meetup at a very high standard, by
presenting numerous interesting topics and
providing great engagement!
Please get in touch with Nicoleta@paceintegration.com
where you would like to volunteer as a presenter within the
London Community
9. Connect with us!
Engage on LinkedIn by mentioning @PaceIntegration and tagging #MuleSoftMeetup
Don’t forget to follow us so that you don’t miss the latest updates!
9
All meetup attendees will receive an email linking to today’s slides and session’s recording.
10. PRIZES!
10
OFFICIAL MULESOFT TRAINING
MuleSoft Training and
Certification vouchers for TOP 3
winners from the end-of-
presentation quiz!
Stay tuned and take part at our
end-of-presentation quiz around
TDD and MuleSoft to win one of the
three training and certification
vouchers for a MuleSoft course of
your choice.
11. It’s time for the Ice breaker Quiz!!!
Join the link in the chat…
12. Today’s Speakers
12
May Jieamtarvorn
PACE INTEGRATION
MuleSoft Developer
May is a Developer at Pace who has worked across a wide range
of industries wearing different hats; most recently creating
integration solutions for product management within Unilever
and Diageo and HR for Roche.
May enjoys working to make software development accessible
to all.
13. Today's Speakers
13
Sean Young
PACE INTEGRATION
Integration Consultant
Sean began building Integration solutions in 2007. Working with a
Reverse Logistics company, he built a solution that spanned the
entire supply chain for warranty returns on parts for major
technology hardware manufacturers, through the wholesale
distribution company and on to retail clients.
He started working with MuleSoft in 2009 and has followed this
product's journey through several major releases. Sean's MuleSoft
experience includes Pharmaceutical, Financial Services and Public
Sector projects. He has also worked as part of a team that delivered
business-critical solutions in the UK and Europe for a household
name in the broadcast media industry.
15. 15
Test Driven Development
Modern era termed as a more agile approach to software development.
Formally introduced back in the early 90s by Kent Beck.
The principle of “fake it till you make it” – Kent Beck
16. Benefits of a TDD approach
16
● "Fail fast" approach
● Code design is improved
○ Manageable, readable, code cohesion and coupling of concerns
● Reduced number of defects
● Aid in requirements refinement
○ Better understanding of what implementation should do
○ Often forgotten scenarios are uncovered
● Low-level regression testing
17. Drawbacks of a TDD approach
● Hard to start working this way
○ Not conventional programming
● Not suitable for tight deadlines
● Perception of more effort to maintain code
○ Changes made to the code need to be reflected in the tests
● Time consuming but helps in the long run
○ Less defects in the future
17
18. When and where to use TDD
When:
○ Traditionally unit testing would be performed after code is built
○ In a TDD approach tests are written as we write functional code
○ In MuleSoft
■ After developing RAML
Where:
○ All types of projects except for UI based
18
19. How do we do TDD
3 repeatable steps:
○ Write a test for the next bit of
functionality you want to add
○ Write functional code until the test
passes
○ Refactor both new and old code to
make it well structured
19
25. Congratulations!
Top 3 with the highest score will receive a FREE MuleSoft Training
and Certification Voucher!
26. 26
What’s next?
● Share:
○ LinkedIn post using the hashtag #MuleSoftMeetups and @Pace Integration
● Feedback:
○ Tell us any future Meetup topics you would like us to present to
nicoleta@paceintegration.com
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program