start*aut

The start*aut programs start an AUT that Squish will attach to:

See Attaching to Running Applications for an example of starting AUTs.

startaut

Usage

startaut [--verbose] [--wrapper=toolkit] [--cwd=working-directory] [--capture-output] --port=port aut [aut-command-line-options]

or:

startaut [--verbose] [--wrapper=toolkit] [--cwd=working-directory] --uses-builtin-hook aut [aut-command-line-options]

  • --verbose is used to get Squish internal log messages shown in the command line.

    Log messages are output to the standard error channel.

  • --wrapper is used to specify the AUT's GUI toolkit, which must be one of Qt, Mac, or Tk.

    If --wrapper is not specified, Qt is assumed.

  • --cwd is used to specify the working directory for the AUT.
  • --capture-output is used to suppress all AUT output.

    When the environment variable SQUISH_NO_CAPTURE_OUTPUT is set to something other than 0 this switch has no effect.

    This has no effect when used in combination with --uses-builtin-hook.

  • --port is used to specify the port number that Squish should use for communicating with the AUT.

    This must not be used in combination with --uses-builtin-hook.

  • --uses-builtin-hook is used to specify that the AUT uses the attachable built-in Hook.

    This must not be used in combination with --port.

  • aut is used to specify the AUT executable.
  • Any aut-command-line-options options are passed to the AUT.

androidobserver

Usage

androidobserver [--device serialNumber] [--port port] [--clear-app-settings] [--force-rotation rotation] [--attach-port attachPort] [--no-autostart-observer] [--no-ui-automation] [--web-hookup-timeout msec] [-e key value]* aut

aut

The aut is the Android package name, and is a required argument. The package must have been instrumented and deployed previously by the squishide or Using a separate test package. The aut is started using adb.

--device

The --device option is required when more than one Android devices connected and/or emulators running, but otherwise optional.

--clear-app-settings

The --clear-app-settings runs Android package manager clear command for the AUT before launching it.

--force-rotation

The --force-rotation is a workaround in case screenshots are rotated or upside down. The rotation value must be either 0, 1, 2 or 3, representing resp. zero, 90, 180 or 270 degrees.

--port

The --port option is used when multiple simultaneous tests are started from the commandline. Each androidobserver forwards this TCP port to the device or emulator. The default value is 37090.

--attach-port

The --attach-port option is used to specify the port number that Squish should use for communicating with the AUT.

--no-autostart-observer

This option will considerably speed-up the Android app launch time. It skips part of the hook-up process. The test script must contain startObserver() in order to complete it. It can be used to overcome a start-up timeout. Between ApplicationContext startApplication(autName) and startObserver() the object recognition is limited.

--no-ui-automation

This option will disable Android UIAutomation support (technically, run the Squish instrumentation runner without the wait option). Before Squish version 6.1 this was the default. Squish version 6.1 automatically enables UiAutomation when available (Android-4.3 or later).

--web-hookup-timeout

This option sets the time Squish will wait after a page-finished event to do a WebView control hook-up.

-e key value

This option allows passing key/value pairs to the Android Intent.

Example

androidobserver.exe --attach-port 4444 com.froglogic.addressbook

Port 4444 must be registered with the Squish Server as an attachable AUT.

startjavaaut

Usage

startjavaaut [--verbose] [--cwd=directory] --port=port aut [aut-command-line-options]

The --verbose option is only useful for debugging the tool itself and is not normally used. The --cwd option is used to specify the AUT's working directory. The --port option is used to specify the port number that Squish should use for communicating with the AUT. Naturally, the aut must be specified and must be a Mapped AUT name. Any aut-command-line-options options are passed to the AUT when the startjavaaut program starts it.

startwinaut

Use startwinaut to start an AUT as a child process or to attach to an already running AUT, depending on the options you set.

Usage

startwinaut --port=port [--aut-timeout=seconds] (--window-title=title of window | --pid=Process ID of AUT | [--cwd=directory] command [{command-line-options}])

  • --port is required to specify the port number that Squish should use for communicating with the AUT.
  • --aut-timeout can be used to specify the number of seconds to wait for the given program to show any GUI. Increasing this can be useful for applications which take longer than 20s to show a main window.
  • --pid option is used to specify the process ID of the AUT to attach to.
  • --window-title option is used to specify the window caption of the AUT to attach to. The value may use simple glob-style wildcards (* for zero or more of any character, ? for any single character). It is not possible to escape the special meaning of the * and ? characters at this point.
  • The command may be an AUT or a batch file that starts the AUT. Any command-line-options options are passed to the command if the startwinaut program starts it this way.
  • --cwd is used to specify the command's working directory.

When startwinaut is started in a console window, such as the one of cmd.exe, with the --window-title option and wildcards, it is possible that the console window is found instead of the desired target window. This is because the console window title may change to the executed command. It is possible to overcome this by using the start command built into cmd.exe to start startwinaut with a new, separate console window which does not have a dynamic window title:

c:\> start $SQUISHDIR/bin/startwinaut --window-title=somewindow

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Search Results