Closed snorrebrandstadmoen closed 6 years ago
Glad you like TesTcl, @snorrebrandstadmoen. Have you tried defining this as a global variable?
@landro - I guess the log_level
variable could be global, but this was just an example. Typically I want to log ie. session based information like HTTP:uri
or HTTP:host
in the HTTP_RESPONSE
event, and these are unavailable in the "response context" and must therefore be set as an variable in the incoming HTTP_REQUEST
event.
F5 has redefined the behavior of the set command - right now TesTcl uses a standard set implementation, where variables go out of scope as you would expect in any programming language. They should have used/defined some kind of exchange/context similar to what you find in SOAP/REST frameworks. Well - whatever - right now you're left with two options:
I noticed by the way #34 is a similar open issue
closed in a5c289d30481cb6a17ba9c196aa4b1f34bfe3545
Thanks!
Hi mr. Landrø,
I'm using your excellent tool to test drive our BIG-IP development. One question on variable support:
The following (valid BIG-IP) iRule:
When testing the
event HTTP_RESPONSE
, thelog_level
variable is never set, and thus not available in the HTTP_RESPONSE clause. Is there a way to achieve this?Is there any way I can use variables, or does the test runner currently not support this?
Regards, Snorre