Applies to LoadNinja 1.0, last modified on October 31, 2019

You can command LoadNinja to block requests to certain resources while replaying scripts in the recorder or during load test runs. These resources may include unwanted advertisement banners, tools you use to gather visitor statistics (such as Google Analytics), and so on.

To provide a list of unwanted resources:

  1. Select Add > URLs to block on the script recorder’s toolbar.

  2. In the subsequent dialog, specify the URL of the resource you need to block, then click Add URL.

    Note: You can use regular expressions instead of generic URLs. To learn more, see below.

    The Block URLs button

    Click the image to enlarge it.

  3. Repeat this action to add more URLs, if needed.

    To edit a URL, click .

    To remove a URL from the list, click .

  4. Once done, click Done.

To modify this list later, simply click # blocked URL(s) in the script recorder.

Resource syntax

LoadNinja allows to block both URLs and IP addresses:

  • Block by URL – Use this to block requests by hosts and domains.

    For example: google.com, test.com.

    You can use wildcards to block multiple URLs at once:

    • *example.com blocks every host and domain on example.com, including both example.com or test.example.com
    • *:3000 blocks every request from any resource sent via port 3000, including example.com:3000 or test.org:3000
  • Block by IP – Use this to block requests from IP addresses you know to be unwanted, like metric tools.

    For example: 8.8.8.8, 12.34.56.78.

See Also

Script Recorder
Test Web Apps in Local Network With Endpoint
Use Cases

Highlight search results