I want to compare the content of this policy, I want to use the whole policy as the token instead having it line by line. route-policy Policy_test if community matches-any (100) then drop else pass endif end-policy
There are methods to do this in iTest; however, I would argue that doing a multi-line comparison may not yield reliable results nor give you the ability to specifically tell what's not right with the policy. Multi-line comparisons often fail due to issues with spacing and tabs. This can often lead to false negatives in testing. Instead, checking each "part" of the policy not only eliminates this issue, but also provides you with a way to determine exactly why the failure occurred. To do this, use the response maps to parse the response and provide you with a list of policies. You can use the policy name as the key. Then, you can use a series of analysis rules to test each part of the policy to ensure it's accuracy. I'd be glad to create a mock up of this if you'd provide your 10 policy response.