Automating Qt Jambi Application on Windows

Last edited on

Requirements

For Qt Jambi VersionQt Jambi Default Qt ConfigurationRequired Squish Package ConfigurationAdditional Setup Steps?
4.5.2_01 (32-bit, 64-bit)Qt 4.5.x, without Qt3SupportSquish for Qt, Qt 4.5.x, Pure Qt 4Yes: Apply manifests to Squish package

Additional Requirement #1 - Test Suite with Hierarchical Naming Scheme

Step 1 - Create a new Qt test suite with the Squish IDE.

Step 2 - Close the Squish IDE.

Step 3 - In file TEST_SUITE/suite.conf add this line:

NAMINGSCHEME=HIERARCHICAL

Additional Requirement #2 - Use Batch File as AUT

Example batch file for the wigglytext example (place in the folder with qtjambi-4.5.2_01.jar - this should be chosen in the test suite settings for "Application:":

:: Ensure that the folder of this batch file is
:: the working directory:
pushd "%~dp0"

:: Ensure that the folder with the Qt libraries of the
:: AUT is in PATH:
set PATH=%cd%\bin;%PATH%

:: Only define a prefix when started from Squish:
set _prefix=
if defined SQUISH_PREFIX set _prefix="%SQUISH_PREFIX%\bin\dllpreload.exe"



:: Configure which Java executable to use:

:: 32-bit Java on 64-bit Windows:
::set _java=%ProgramFiles(x86)%\Java\jre8\bin\java.exe

:: 32-bit Java on 32-bit Windows:
::set _java=%ProgramFiles%\Java\jre8\bin\java.exe

:: 64-bit Java on 64-bit Windows:
set _java=%ProgramW6432%\Java\jre8\bin\java.exe


:: Start the AUT:
%_prefix% "%_java%" -cp qtjambi-4.5.2_01.jar;qtjambi-examples-4.5.2_01.jar com.trolltech.examples.Wiggly



:: Pause in case of interactive start, to see
:: possibly output of the AUT or so:
pause
wigglytext.bat