Meticulous automatically stubs network requests during replay to ensure deterministic test results. However, some third-party scripts and services may still cause non-determinism by executing outside of the normal request flow (e.g. via service workers, WebSockets, or inline script tags).
You can configure blocked request patterns to abort these requests during replay, preventing them from interfering with your tests.
Use blocked requests when a third-party service causes flaky diffs or non-deterministic behavior during replay. Common examples include:
- Analytics and tracking scripts (e.g. Segment, Amplitude, Google Analytics)
- Error monitoring (e.g. Sentry, Datadog, LogRocket)
- Payment processors (e.g. Stripe)
- CAPTCHAs (e.g. reCAPTCHA, hCaptcha)
- Chat widgets (e.g. Intercom, Zendesk)
- Ad scripts
- Navigate to your project's Settings page.
- Scroll to the Blocked Requests section.
- Click Add Entry to add a new pattern.
- Fill in one or more of the following fields:
- Root Domain: Match requests to a specific domain (e.g.
stripe.com). This matches the domain and all of its subdomains. - Resource Type: Filter by the type of resource being requested (e.g. Script, Document, Image).
- URL Regex: A regular expression to match against the full request URL. Use this for more granular control.
- Root Domain: Match requests to a specific domain (e.g.
- Click Save Changes.
You can combine multiple fields in a single entry to create more specific rules. For example, setting both a root domain and a resource type will only block requests that match both conditions.
A request is blocked if it matches any of the entries in your blocked requests list. Within a single entry, all specified fields must match:
Root Domain: The request URL's hostname must be the domain itself or a subdomain of it. For example,
stripe.commatchesjs.stripe.comandapi.stripe.com.Resource Type: The request's resource type must exactly match (e.g.
script,fetch,xhr).URL Regex: The regular expression must match somewhere in the full request URL. The regex is tested against the complete URL string.
Reach out to eng@meticulous.ai and we'll be happy to help.