2008年4月27日
Marathon Java Swing GUI automation Test
Marathon 是一个基于JAVA的自动化测试软件,不用安装,解压缩zip,or tar.gz包即可。
解压缩后,将解压缩后的所有文件拷贝到C盘(其它的盘也可以)。并在“path”中append marathon的根目录。
打开cmd,change dir to marathon root directory. Type:
C:/Program Files/marathon-1.1.3>marathon
C:/Program Files/marathon-1.1.3>echo %errorlevel%
0
Current working directory has “marathon” file, and it is a DOS batch file. This file will export variable for the java program, such as classpath.
Then it is running.
Marathon 默认不会将example添加到这个启动窗口中的,不过可以通过“new”创建,然后选择marathon root中example的目录,然后确定即可。因为example中已经存在“.project”文件,所以其他的所有设置也会设置好。比如说: classpath, java executable directory, etc。
在测试dialogue demo (dialoguedemo.py)时候,如果你的系统是中文环境,Marathon会stop在click(‘OK’)处,因为弹出的对话框显示的是中文的“确定”。这个可以通过设置系统的locale或者设置Java 的locale解决。
下一步就看如何田间新的测试project。很多的project都是.class格式,如何直接运行class文件呢?
我测试了,java –cp . namefile.class貌似不行,而且之前已经输出了classpath的变量。