One of the most powerful features of the Fiddler Everywhere client is the Rules tab - a tool for mocking server responses and simulating various real-life scenarios. With Rule Builder, you can create rules, automatically triggering a specific request (covering the criteria set in the rule). Mocking a server response is as easy as enabling the Rules tab, setting a rule, and executing the request (that will trigger the rule).
To create and test your first rule, follow these steps:
- Select the Rules tab and click the Add New Rule button. This will open the Rule Builder.
- Enter a descriptive rule name. The rule name will later appear in the Rules Queue.
- Add a condition or a set of conditions to match sessions.
- Add an action or a set of actions to modify the matched sessions.
- Press Save to save and add the created rule in the Rules Queue.
- Switch the Live traffic to Capturing mode..
- If testing with Live Traffic, make sure to enable the main Rules toggle. Then open the application (for example, the Chrome browser) and execute a request that matches the set conditions. The rule is immediately applied to the ongoing captured traffic.
- If testing with saved sessions, select the rule and use the Execute button. The rule is immediately applied to the loaded saved sessions.