Both - Traffic Object - What is the input?

When adding an extension tool for scripting, what is the actual input if I select Both - Traffic Object? Is that the entire request and response?
Thanks,
JT
Comments
-
Hi,
From a quick inspection of the two arguments passed into the script it appears that the first is a "map" and the second is the "context"
Using the example below these are the following keys in the map that point to various different objects
Request HTTP Headers
Request MIME
Response HTTP Headers
Response MIME
Test Name
XML Request
XML Request Time in Nanoseconds
XML Response
XML Response Time in NanosecondsThis is the code that was used to check what the argument types are
import com.parasoft.api.Application
def checkClass(one, two) {
Application.showMessage(one.getClass().toString())
Application.showMessage(two.getClass().toString())
map = one
map.each{ key, value -> Application.showMessage(key) }
}0 -
-
Would it be possible to capture the Request components, swap out the host and port and then forward the request using Groovy (similar to how the Message Forward client works) ?
JT
0 -
I had a HUGE ah-ha! moment today WRT scripting. I just figured out how important it is to write script in VAs on your local server and monitor the Console using the available tools, especially Application.showMessage(). This opens up a whole new world WRT scripting. I have already written the code to do what I asked in my question above. Very nice product you have in Virtualize.
0 -
Yes! Developing the script locally makes it so that you can see all those print/show message statements which I also have found very helpful.
0