测试违反多个JDKS

最后编辑了

基本

配置的粗糙安装只能与选定的JRE一起使用。

要使用不同的Java版本测试应用程序,必须在其自己的目录中安装多个版本的Quish。然后,在运行任何这些柔软之前’ setup or squish executables, make sure that the environment variable SQUISH_USER_SETTINGS_DIR is set differently for each Squish installation.

可以使用批处理文件或shell脚本简化该过程。例如:

set SQUISH_USER_SETTINGS_DIR=C:\squish\jre-1.5
C:\squish\jre-1.5\bin\squish

先进的

需要解决以下几点以获取此方法的工作:

  1. For Squish 3, Squish generates a small JRE-specific rt.jar file during setup (SQUISHDIR/lib/squishrt.jar).

  2. squ sets the location of the JRE-specific libjvm.so file in the AUT environment.

Two exports are needed to override the ones from the setup: SQUISH_JAVA_DEF_1 (to address point 1) and SQUISH_LIBJVM (to address point 2).

When using the command line hooking, i.e. skipping the alternative jvm lib, the other SQUISH_JAVA_DEF_X needs to be added to the java executable. Note that for jre-1.4, the SquishClassLoader setting is an extra SQUISH_JAVA_DEF_N when using SWT.