Here’s what the big picture is.
I need to invoke eggplant scripts from Windows machines. I found this program called Say What that allows me to do just that.
However for me to invoke anything I need to be able to write Applescripts that will parse XML documents to figure out which scripts and suites need to opened and pass parameters to these scripts.
How would I do something like this?
I’m a complete newbie to Macs (Started using them 2 weeks back) and have dabbled a little with Applescript.
All I know how to do is to write
tell application "Eggplant"
end tell
For example how would I ask Eggplant to return all suites and scripts it knows about?
Would I be better off writing a Unix script and calling that to return my list of files?
Help would be much appreciated!!!
Unless, I’m missing something, Eggplant doesn’t have an AppleScript dictionary (one of the first things I did when I downloaded 2.0 was check). In order to have an app pay attention to AS, it needs to have a dictionary.
Shucks! I suppose it’s back to good ol’ Tcl or Shell scripts to run the eggplant scripts then.
How would I run Eggplant scripts from the command line or from scripts passing in the parameters for that script?
Bharathh:
Allen is correct: Eggplant is not Applescriptable. However, it’s very easy to run Eggplant from the command line; that facility is built-in. You can find information on doing this on pages 125-127 of the Eggplant Reference, but basically, you call a “runscript” command like so:
/Applications/Eggplant.app/runscript -repeat 2 -host 192.168.1.25 ~/Documents/ MyOtherSuite.suite/Scripts/MyScript.script -params "string1" "string2"
The command line functionality gives you the ability to run multiple instances of Eggplant at the same time, each running against a different system-under-test.