sstars 发表于 2005-9-15 15:25:37

请教如何以命令行的方式执行robot的脚本

想写个批处理的文件自动执行一套录制好的脚本。不知道robot里有没有类似的功能,还是必须自己写个.bat的批处理文件。

DontTest 发表于 2005-9-15 15:53:56

rtrobo.exe yourscriptfile /user admin /project D:\projectname.rsp /play/nolog /close

上面是例子..运行projectname.rsp中的yourscriptfile 脚本..run完后,关闭robot.
当然还有更全的参数,你可以看看资料,我这里不多说了, 51testing里面好象也有的,你找找.

sstars 发表于 2005-9-15 18:02:52

谢谢!

ilovejolly 发表于 2005-9-15 20:54:59

/user -> followed by user name (case-sensitive)
/password -> followed by password (if no password exists, do not include
this option)
/project -> followed by name of the project that contains the script
referenced in scriptname preceded by its full path.
/play -> tells Robot to play the script (w/o this parameter, Robot will open
the script)
/nolog -> does not log any output while playing back the script.
/close -> closes Robot after playing back the script.

The following options are only available from Robot 2001a onwards:
/build -> followed by the name of the build associated with the script.
/logfolder -> followed by the name of the log folder where the test log is
located. The log folder is associated with the build.
/log -> followed by the name of the log

Separate each field by spaces. If the project path includes spaces, either
surround the entire path in double-quotes or obey the 8-letter DOS limitation.
The order of the options does not matter (just ensure that rtrobo.exe is
immediately followed by the script name).

Example:
rtrobo.exe script123 /user Admin /Project
\\machine1\share1\Projects\Project1\Project1.rsp /play

以上转自IBM网站
页: [1]
查看完整版本: 请教如何以命令行的方式执行robot的脚本