Can we test our actions before committing them?

In NetScaler appliance, Rewrite Action Evaluator is the only way we can actually evaluate the actions before executing them live in the deployment.

Rewrite Action Evaluator, helps validate the rewrite action in its entirety. It helps evaluate multiple expressions within an action. It evaluates the target and the replace/insert string expressions together unlike advanced expression evaluator.

Let me tell you something, this saves a lot of time. It saves your time from initial multiple configurations to generate a request and response using an HTTP client, just to evaluate your actions. It also adds the values of advanced expression evaluator to it. Rewrite action evaluator accords advanced expression evaluator with it to provide evaluation of those multiple expressions within actions individually as well.

The rewrite action evaluator brings down the evaluation steps to just one step!

You just need to create the rewrite action, write the request/response payload and click “Evaluate” to evaluate the action created.

This tool helps simulate a client inside the NetScaler appliance and process the request or response as the packet engine would have processed as a real request or response received by the appliance.

Use Case

Let’s walk through a use case and see how this process is made faster.

Once you have created a rewrite action, you need to select the action and click “Evaluate” as shown above. After this a “Rewrite Action Evaluator” window opens.

-Now, Select the “Flow Type” as Response mentioned at the top right corner of the window.

-You have an option of selecting the “Sample” request/response option provided on the mid-left side of the window. It displays a standard format on a request/response, which can be modified for testing.

-In this example, the action is supposed to replace all the occurrence of “July11” with “July10”.  Here, we modified the body of the response by inserting the string “July11” to test if the actions expressions replace the string “July11” with “July10” or not.

-Click Evaluate, mentioned in the middle of the window.

-Once evaluated, the evaluator replaces the Date “July11” to “July10”, highlighted in yellow and blue respectively.

– This “sample_rewrite_action” looks in the first 100,000 bytes of the body with “HTTP.RES.BODY(100000)” as the target, for “July11” string and replaces it with “July10” using the “Rewrite Action Evaluator”.

This use case concludes how fast and efficient it is to use Rewrite Action Evaluator rather than how we used to evaluate our actions using http clients!