1. 09th Oct 2021
11:00 AM IST
Delhi MuleSoft Meetup
Functional Monitoring on Anypoint Platform
https://meetups.mulesoft.com/
2. 2
● Introductions
● Functional Monitoring
● White Box Testing
● Black Box Testing
● Runtime Monitoring
● Quiz Time
● Networking time
Agenda
3. 3
●About The Speaker:
Nikhil Baliyan
Solution Consultant at Apisero Inc.
https://www.linkedin.com/in/nikhil-990601a2/
Introductions
4. 4
● Ankit Lawaniya: https://www.linkedin.com/in/ankit-lawaniya/
● Anurag Sharma : https://www.linkedin.com/in/anurag-sharma-59745b20/
● Abhay Aggarwal: https://www.linkedin.com/in/abhay-agarwal-851121112/
● Pryank Gupta: https://www.linkedin.com/in/gupta-pryank-24a1293b/
Organizers
A SHOW OF HANDS:
Who is new to this Meetup?
6. Why Functional Monitoring?
● Are you the one who get to know about the issues/errors from the testers or business people.
● Are you the one who wants to give the Mule work to the MuleSoft and give back more time to
the interesting things.
● Are you the one who has sleepless nights thinking if your api’s are functional or not.
6
7. 7
● API Functional Monitoring is a framework for assuring the quality and reliability of public and
private API’s that are being used in application network.
● This framework ensures the consistent testing of the functional behaviour and performance of
their API’s, throughout the API lifecycle, in testing and production environments.
● This type of testing helps us carry out the following tasks
● White-box testing.
● Black-box testing.
● Runtime monitoring.
API Functional Monitoring
8. Performing Functional Testing
● There are two ways to perform functional testing
○ Write tests manually and then schedule them with the Blackbox Automated Testing(BAT) CLI.
○ Create monitors in the Functional Monitoring section of Anypoint Monitoring, we can upload as
monitors any testing projects that we wrote manually.
8
9. Monitoring the Endpoints of Public APIs
● A public location is a region(which we can think of as a resource pool) that is shared with
other MuleSoft customers.
● Examples of such regions are us-east-1, us-east-2 and eu-central-1.
9
11. Features of Monitoring Endpoints of Public APIs
from Public location
● AFM prevents tests from executing for more than 120 seconds.
● Each test is associated with a schedule and AFM sets limitation on the following aspects of
scheduling:-
○ Number of schedules:- By default, our organization can run up to five schedules at one time of
testing from public locations.
○ Duration of Intervals Between Execution of Tests:- Five minutes is the shortest interval that we
can schedule, configurable via a cron expression.
NOTE: We can monitor public API’s from private locations but not the private API from the public
location
11
12. Monitoring Endpoints of Private APIs
● AFM let us monitor private APIs, if we have a subscription to Anypoint Virtual Private
Cloud(Anypoint VPC).
12
13. Features of Monitoring Endpoints of
Private APIs from Private location
● Private Location can test the publicly hosted api’s.
● When tests are run by private locations in an instance of Anypoint VPC, the workers do not
share resources with other MuleSoft customers. Therefore, AFM allows tests to wait for a
default of thirty minutes for a response from an endpoint. We can increase this time in
Anypoint Runtime Manager.
13
16. Hands on Creating a Monitor - 1
● We can create a Functional Monitor using following ways:-
○ Functional Monitoring UI.
○ Uploading test suites written in BAT.
■ Based on BDD
16
17. Hands on Creating a Monitor - 2
Commands used for the creation of Functional Monitoring project.
● bat init :- to initialize a hello world project for the functional Monitoring.
● bat idea :- to initialize the repo as an Intellij repo.
17
19. Ways to schedule tests in Functional Monitoring
● Fixed Frequency
○ Every 10 minutes, 15 minutes, 20 minutes and so on...
● Cron Expression
○ 0 0 0 1/1 * ? * (starts every day at 12 o clock)
19
20. Test Keywords - 1
20
Keyword Description
Describe For grouping, which you can nest as deep to add contextual
information for reports
scenario Same as describe
suite Same as describe
given Test step, used for preparation
when Test step, normally used when to create side effects
while Test step
21. Test Keyword - 2
21
it Test step, validations
should Test step
must Test step
it should “str” Test step
it must “” Test step
until Test step
30. 30
● Share:
○ Next Meetup 20th November 6:00 P.M.
○ See Virtual | MuleSoft Delhi 11th Meet - JSON Logger & Datadog Logging for MuleSoft
at MuleSoft Meetups Delhi
○ RSVP asap and learn something new about Logging
● Feedback:
○ Tweet using the hashtag #MuleSoftMeetups
○ Fill out the survey feedback and suggest topics for upcoming events
○ Join Delhi Mulesoft Meetup Group - https://meetups.mulesoft.com/delhi/
○ Contact Organizers for any new topic suggestion
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
○ Invite your network to join: https://meetups.mulesoft.com/
What’s next?