HP Quality Center starts application but receives startApplication() failed error

Last edited on

Error

RuntimeError: startApplication() failed

Reason

The Squish Platform Wrapper must be specified in QC Test Lab > Execution Grid > Test Instance Details (for each test). Without the Wrapper property, the AUT will launch; however the script will fail. The resulting error is: RuntimeError: startApplication() failed.

Solution

froglogic is currently working on an enhancement to specify the Wrapper property upon test import using the qcimporter utility.

Workarounds

  1. Set the wrapper inside the test script via the Squish API function testSettings.setWrappersForApplication().

    1. setWrappersForApplication options: "Qt", "Web", "Java", "Mac", "Windows", "XView", "Tk", "iOS", "Android"

      testSettings.setWrappersForApplication("MyApp", ["Web"]);
      startApplication("MyApp");
    2. Supplemental documentation: testSettings.setWrappersForApplication-function

  2. Create the file "squish_defaults.ini" and make it either available by setting the environment variable QC_SQUISH_PLUGIN_DEFAULTS before starting the QC client e.g.

    set QC_SQUISH_PLUGIN_DEFAULTS=C:\Users\foo\qc\squish_defaults.ini
    start "C:\Program Files\Internet Explorer\iexplore.exe" http://frog-vm:8080/qcbin/

    or by placing it into a default path. The plugin will look on the QC client at the following paths:

    %CommonProgramFiles%\Mercury Interactive\Quality Center\squish_defaults.ini
    %ProgramFiles(x86)%\Common Files\Mercury Interactive\Quality Center\squish_defaults.ini
    %ProgramFiles%\Common Files\Mercury Interactive\Quality Center\squish_defaults.ini
    %USERPROFILE%\Local Settings\Application Data\Mercury Interactive\Quality Center\squish_defaults.ini

    The format of the squish_defaults.ini file is very simple, each line consists of a key and a value separated by an equals sign. Valid keys are:

    PRECOMMAND
    POSTCOMMAND
    WRAPPERS
    AUT
    EXTRAARGS
    SQUISHSERVER_HOST
    SQUISHSERVER_PORT

    An example can look like this:

    WRAPPERS=Qt canvas
    AUT=addressbook
    SQUISHSERVER_HOST=192.168.1.42
    SQUISHSERVER_PORT=4711
  3. Manual Workaround: After specifying a Squish test case to run in the Test Lab Execution Grid, specify the wrapper using the following steps:

    1. Right-click a Squish Test Case in the Execution Grid and select Test Instance Details. The Test Instance Details window appears.

    2. Select Execution Settings.

    3. Select the Automated tab.

    4. Enter the applicable wrapper in the Wrapper to use box.

      • Wrapper options: Qt, Web, Java, Mac, Windows, XView, Tk, iOS, Android
    5. Click OK.