meant to send this to the list ...
Chang Su wrote:
thaks Paul for your reply.
Could you explain in more detail since I am really new
to webtest and know nothing about groovy yet.
what is the "hostname" in "hostname".execute().text
that you suggested?
hostname is a shell/console command you can "exec" in
a unix shell/dos window. execute() is a special groovy
add-on for strings which effectively does something like
python's os.system() or os.execXX() on the string.
On my system:
println "hostname".execute().text.trim() // => LYREBIRD
println InetAddress.localHost // => LYREBIRD/192.168.0.22
You'll of course want to store it in a property to check against.
Cheers, Paul.
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest