Automating Testing using the AppV_Manage Command Line

 

Back to tool Introduction.

Overview

AppV_Manage has a command line interface intended for automation of some of the initial package testing.  Although it is not possible to determine if a package is completely working to the needs of end-users, it is possible to detect certain common issues, as well as perform some of the preliminary steps generally required automatically.

One example for the automation would be create a PowerShell script that starts a VM up at a known snapshot.  The snapshot could contain a configured App-V Client (stand-alone mode), along with the AppV_Manage Tool pre-configured.  After starting the VM, the script could use PsExec to remotely launch AppV_Manage and test the package.

Syntax

AppV_Manage.exe [ [/S | /SCAN] [/R | /RUN] FullPath/Filename.appv]

where:

FullPath/Filename.appv is an App-V 5.0 or above package.  The DeploymentConfig and UserConfig files are ignored.  The Add-AppVClientPackage and Publish-AppVClientPackage will be run.

/S[CAN] When specified, a load (mount) command is run, followed by whatever action would be taken by he AV Scan.  This may be a directory level scan, or may involve reading of all package files in to trigger detections.  A full system scan may be advised in some cases.  Hover the mouse over the detected AV Vendor (on the Tool Configuration tab) for a description of capabilities of your AV scanner product.

/R[UN] When specified, the target of each shortcut is parsed and Executed (including shortcut arguments).  A scan of all open windows is then performed, looking for certain text sequences that indicated errors.  All launches are left running, such that it is possible for a human to confirm if things are working.

Return Value

When AppV_Manage is given an AppV file with the /RUN option, the executable will exit after performing error detection.  The return values are:

Return Code  Meaning 
 0  No issues detected.
 -1  Scan of Window dialogs indicate potential problem with the package after launch.
 -2  Failure to launch the shortcut exe.
 -3  Failure to publish package
 -4  failure to add package

 If the /SCAN option is requested, some AV products will produce a dialog box that can be detected, but some do not.

Configuring the Window Error Detection

The window error detection looks at all text displayed in all windows (whether visible or not).  The detection logic is configurable via entries in two registry keys:

WindowParseExclusions Value names under this key are strings that, if detected in a window, cause the detection to ignore the window.

WindowParseErrors value names under this key are strings that, if detected in a window, cause the detection to declare an error.

The detection logic looks at each window, first checking for the exclusions, and then if no exclusion is detected it checks for the Errors.

The default installation configuration creates the following exclusion and error lists:

 WindowParseExclusions WindowsParseErrors 
ERROR LIST ERROR 
  WARNING
  FATAL
  ABORT
  REPAIR