Synthetic Monitoring Explained: Best Practices, Examples, and Tools

what is synthetic monitoring

Synthetic monitoring uses scripted transactions that mimic real users to catch performance issues before customers do. Learn how it compares with real user monitoring, see examples, and set it up with Selenium or Katalon.

Key takeaways
The 30-second version of this article
Synthetic monitoring runs scripted transactions that simulate real users to detect issues proactively.
It fills gaps that real user monitoring can't cover, such as unreleased features and rare extreme scenarios.
Use both: synthetic monitoring for controlled, repeatable checks and RUM for real-world behavior.
You can script it yourself with Selenium or schedule and report on checks in Katalon Studio and Katalon TestOps.

Modern applications are expected to be up 24/7, and that puts certain pressure on the performance testing team. One of their goals is to continuously monitor real users’ interactions with the site and develop a performance benchmark based on that information.        

However, there’s a catch: sometimes real user monitoring doesn't allow you to observe the system's behavior in extreme scenarios (such as sudden spike in traffic or abnormal user behaviors). After all, those are extreme scenarios, and they don’t happen that often. That’s why synthetic monitoring is created to fill in the gap that real user monitoring can’t provide.        
 

In this article, we will dive deep into the concept of synthetic monitoring, present the key components of this approach, as well as best practices you should follow to better implement it. You can even jump straight to our comprehensive guide on how to do synthetic monitoring.

What is Synthetic Monitoring?

Synthetic monitoring is a process where testers create automated scripts that simulate real users' interactions with an application or website to proactively detect performance issues and assess overall system health. These automated scripts are called synthetic transactions, and they help testers gauge the system's performance when real user data is not yet available or is too hard to capture.

Benefits of Synthetic Monitoring

Real user data doesn't always tell the full story of the software's performance. It's great to have data captured directly from real users to provide actual user experience metrics, but *what if* the feature is still under development and not yet released to real users? How can you proactively capture the data to build a performance benchmark for it?

Even if the feature is already released, user activity tends to be quite limited in the early stage. Performance testing teams have no choice but to passively wait until enough data has been gathered so their test results can be statistically significant.       
 

Similarly, to ensure the highest level of coverage, testers also need to look at more extreme cases, such as sudden traffic spikes or server outages, and you don’t usually have data for such outlier scenarios. To know how the system behaves under such pressures, testers can create synthetic transactions that mimic large volumes of users, send them to the website, and document the results.       
 

When it comes to dependencies, the need for synthetic monitoring becomes even more pronounced. There are so many variables at play that can mess with the final test result. Having a controlled environment exclusively built for the testing of that specific feature is a must if you want the test results to be more reliable. It also reduces the risk of unintentionally breaking other features.        
 

In short, you need synthetic monitoring for two primary reasons:

  1. Real user data is not yet available, or difficult to acquire.
  2. Testers want to have greater control and less risk over the testing process.       
     

There are so many other benefits of synthetic testing, not because of its synthetic nature, but rather because of its automated nature:

  1. Scheduled testing: You can schedule your synthetic transactions to run at specific times, preferably during peak usage periods, maintenance windows, or any time periods suitable for your test strategy.
  2. Improved analytics: Historical data generated by synthetic monitoring allows you to dive deep into the testing effort and uncover underlying patterns which you can turn into valuable insights for future decision-making.
  3. Customization: Synthetic monitoring can be tailored to your specific testing requirements, allowing you to send traffic on specific journeys through the website to address your unique testing needs.

Synthetic Monitoring vs. Real User Monitoring

Have a look at the table below to better understand the differences between synthetic monitoring and real user monitoring:       
 

Aspect

Synthetic Monitoring

Real User Monitoring (RUM)

Data Source

Simulated transactions executed by monitoring tools

Data collected from actual user interactions with the application

Proactive or Reactive

Proactive: identifies issues before they impact real users

Reactive: provides insights into actual user experiences

Controlled Environment

Testing is performed in a controlled, predefined space for higher test reliability

Reflects the diversity of real user interactions, but results can be affected by external dependencies

Consistency

Consistent and repeatable test scenarios

Data can vary based on user devices, locations, and network conditions

Performance Benchmarking

Establishes performance benchmarks for the application

May not offer explicit performance benchmarks

Custom Scenarios

Test scenarios can be customized to cover specific use cases

Scenarios are generated based on user behavior

Maintenance and Updates

Requires periodic script updates to adapt to application changes

Continuously captures changes in user behavior and application performance

Simulation Scope

Can simulate a wide range of user journeys and interactions

Represents actual user actions but may not cover all possible interactions

Testing Scale

Scalable for load testing and simulating extreme conditions

Reflects the application's usage patterns, including both low and peak traffic

Seasonal Variations

Can simulate load during specific periods but requires adjustment

Reflects seasonal and event-driven variations in user behavior

Monitoring Complexity

Relatively simpler setup and less complex data collection

More complex data collection and analysis, considering user diversity

User Segment Analysis

Limited ability to differentiate user segments

Provides insights into different user segments and behaviors

Cost and Resource Usage

Typically more predictable and controllable costs

May incur variable costs based on user volume and data collection

Examples of Synthetic Monitoring

Have a look at some examples for synthetic monitoring below. You should notice a pattern: all of them have a fairly specific set of requirements that would be quite challenging to capture if you go with real user monitoring:

  1. Regularly test the load time of your website's homepage from different geographic locations.
  2. Simulate user searches for products on your e-commerce site to confirm that search results load quickly and accurately.
  3. Automate the registration process by creating test accounts to verify that users can successfully register and log in.
  4. Test the submission of forms on your website to ensure that data is processed correctly and validation messages appear when necessary.
  5. Simulate the entire e-commerce checkout process from adding items to the cart, selecting shipping options, to completing a purchase.
  6. Create synthetic tests that send HTTP requests to specific API endpoints to measure response times and identify potential issues.
  7. Automate user logins, providing credentials and checking that the authentication process is secure and efficient.
  8. Automate the launch of your mobile app and simulate various user interactions like screen transitions, selections, and form inputs to ensure a smooth user experience.
  9. Generate specific error conditions to verify that error pages are correctly displayed and provide useful information to users.
  10. Monitor images/videos to ensure they are available and load quickly for users.

A Comprehensive Guide to Do Synthetic Monitoring

Before you start, make sure you choose the right approach:

Each approach has its own advantages. Writing your own test scripts gives you a great degree of customization, but you have to update them all when the application changes. Automation testing tools, on the other hand, often come with features that support you throughout the entire testing life cycle, but they may require an initial investment.

1. Synthetic Monitoring With Selenium

Synthetic monitoring with Selenium tutorial

Scenario: In this example, we'll create a Selenium test script in JavaScript to automate the process of checking a website's homepage for its availability and response time.       
 

Dependencies:

  1. Node.js: Download here
  2. Selenium WebDriver: You'll need the Selenium WebDriver library for Node.js, which you can install using npm (Node Package Manager). Open your terminal or command prompt and run the following command:
npm install selenium-webdriver

You don't need to install ChromeDriver separately: with selenium-webdriver 4.6 or later, Selenium Manager downloads a matching driver automatically.

Test steps:

  1. Open a web browser.
  2. Navigate to the website's homepage.
  3. Measure the response time of the homepage.
  4. Verify that the page loads successfully (HTTP status code 200).
  5. Close the browser.       
     

Test script:

The following script performs the test steps we mentioned above. Make sure to change the URL from https://www.example.com to the website you want to test.       
 

const { Builder, By, until } = require('selenium-webdriver');
const assert = require('assert');

(async function () {
  const driver = await new Builder().forBrowser('chrome').build();
  try {
    const url = 'https://www.example.com'; // Replace with the URL you want to monitor

    // Measure how long the page takes to load and show a key element
    const startTime = Date.now();
    await driver.get(url);
    await driver.wait(until.elementLocated(By.css('body')), 10000); // Use an element that signals the page is ready
    const responseTime = Date.now() - startTime;

    // Read the page's HTTP status from the Navigation Timing API
    // (responseStatus is available in Chromium-based browsers 109+)
    const statusCode = await driver.executeScript(
      "return performance.getEntriesByType('navigation')[0].responseStatus;"
    );
    assert.strictEqual(statusCode, 200, `Expected HTTP status 200 but got ${statusCode}`);

    console.log(`Response time: ${responseTime} ms`);
  } catch (error) {
    console.error(`Test failed: ${error.message}`);
    process.exitCode = 1;
  } finally {
    await driver.quit();
  }
})();

That was a basic example of how to use Selenium WebDriver to measure a page's response time and check that it loads successfully. To turn it into synthetic monitoring, run the script on a schedule (for example, with cron or a CI pipeline) and send failures to your alerting tool. Make sure you understand the pros and cons of synthetic monitoring with Selenium:

Pros

Cons

Selenium supports multiple programming languages, giving you the flexibility to write tests in a language you're comfortable with.

Minor changes to the website's structure can break the test, so Selenium tests need a lot of maintenance.

Features and integrations can be tailored to fit your team's technical requirements, which matters when you want a fully customized tech stack.

There's no built-in framework for synthetic monitoring, so you need to build one from scratch for web, desktop, mobile, or API testing.

You need to set up scheduling, result storage, alerting, and test environment integrations (local, CI, or cloud) yourself.

2. Synthetic Monitoring With Katalon

With automation testing tools, synthetic monitoring is much simpler. You don't have to script much thanks to low-code test authoring features such as Record-and-Playback, which records your on-screen activities and turns them into a script you can execute on the environments of your choice.

Automation testing platforms take this to an even higher level when centralizing all stages of the testing life cycle, so that you can plan your synthetic monitoring, write scripts based on that plan, schedule them to be executed locally or on-cloud for web, desktop, mobile, and even API, then generate detailed reports to help you understand your testing effectiveness, all in one place.

Here’s how you can do synthetic monitoring with Katalon, a comprehensive software testing platform for web, desktop, API, mobile:

  1. Create a new test case or test suite in Katalon Studio.
  2. Use the built-in WebUI keywords to create scripts that simulate user interactions with your web application.
  3. Schedule the tests to run at regular intervals, such as every hour or every day.
  4. Use Katalon TestOps to view the results of your tests and identify performance issues.
  5. Send results to your monitoring or APM tools through Katalon's integrations if you need them alongside other production metrics.

Step 1: Sign up and download Katalon Studio. This will primarily be where you create your test cases.

Download Katalon Studio

Step 2: Once you've downloaded Katalon Studio, launch it and click the Create new Test Case button.

Let’s call this test case “synthetic_monitoring”. After you name it and write some description, click OK.

Name a test case in Katalon Studio

You are now ready to create your test case. Katalon offers a wide variety of keywords (which are essentially automation code snippets for specific actions) that you can use to craft a full on test case. 

Katalon Studio includes hundreds of built-in keywords, plenty for your synthetic monitoring needs. You can also create your own custom keywords or use the Record-and-Playback feature to record your on-screen actions and turn them into a full script that can be executed across environments.

built-in keywords in Katalon Studio for keyword-driven testing

But it's not just about quickly creating test cases for web (and also desktop, mobile, or API), without having to write any code, but also about scheduling, executing, and viewing reports for them in one place. Here you can see how to schedule a specific test case and test suite to run on specific environments, at specific times, and at regular intervals.

Katalon TestOps for test management and test planning

After that, you can check the results in Katalon TestOps, with detailed information on passed/failed tests, before diving deep into the granularity. 

Katalon Analytics for test reporting

Start Testing With Katalon       
 

Read More: Enabling Synthetic Monitoring with Katalon

Challenges of Synthetic Monitoring

  • Limited visibility: Be aware of your assumptions for user behavior. Synthetic monitoring is usually based on speculations on what your users do, especially in earlier stages of testing where usage data is not yet available. Can you be sure that they are representative enough for real-world usage? Is it too simplistic? Also, you should note that user behavior is not static: it evolves over time. That is why you need to complement synthetic monitoring with some real-user monitoring or live testing to add some realism.
  • Adjustment for growth: As your website grows over time, it is essential to also adjust your performance benchmark accordingly. What was seen as “traffic spikes” in your outdated test script can actually become “normal traffic” after a long enough period of time. If the assertions in your test scripts are not frequently updated, you will see false positives being reported. These script maintenance tasks can occur alongside infrastructure upgrades.
  • Scalability: As your organization grows, your synthetic monitoring infrastructure also needs to evolve accordingly. This introduces additional costs and technical challenges.

Frequently asked questions

Huyen Nguyen
Huyen NguyenTechnical Writer, Katalon

Huyen Nguyen is an experienced technical writer in the software testing industry. With strong technical expertise and a deep understanding of Katalon products, she creates clear, practical guides that support testers at every skill level.

Connect on LinkedIn →
Get started

Test everything. Ship with confidence.

From generating test cases to spotting failures, Katalon's AI works across your entire pipeline, automatically.

Live webinar

The Next Evolution of Manual Testing: Introducing Katalon AI Test Runner

Learn how to grow your QA team's capacity in the age of AI, then watch Katalon AI Test Runner turn manual test cases into automated runs, live.

2:00 to 3:00 PM IST
Almas AhmedSenior Account Manager
Sumit WankhedeSolutions Engineer Manager
Register now