Virtual Machine
A virtual machine lets you repeatedly test your setup on a clean or specifically prepared environment, until desired performance and stability is achieved in your target scenarios. Since virtual machines may be easily set to return to a particular clean or specifically prepared environmental "snapshot" upon powering off, they are a great and invaluable aid in application development. To access your virtual machine settings:
- Press SHIFT+CTRL+F11.
- On the tab, in the group, click .
- On the tab, in the group, click .
Virtual Machine Node
This page lets you configure your virtual machine settings.
The
setting is mandatory before you may launch your setups inside virtual machines for automated testing and deployment. If your project does not contain this setting, you will be offered to automatically set it to a recommended value.Once you have configured these settings, you may run your setups inside virtual machines in your repository directly from the window.
Installation Command Line
Enter any command line parameters you wish to test with your installation in this field. These command line parameters will not be used if you are testing MSI outputs instead of EXE outputs.
Leave this field blank if you do not wish to test your first-time installation inside a virtual machine.
Type a space in this field if you wish to test your first-time installation without any specific command line parameters.
For automated testing of your setup inside a virtual machine, set this field to /s which indicates a silent installation.
Please note that due to
design limitations, if your setup requires elevated privileges, you will need to manually approve each elevation request - even if you are silently running setup.Uninstallation Command Line
Enter any command line parameters you wish to test with your uninstallation in this field. These command line parameters will not be used if you are testing MSI outputs instead of EXE outputs.
Leave this field blank if you do not wish to test your uninstallation inside a virtual machine.
Type a space in this field if you wish to test your uninstallation without any specific command line parameters.
For automated testing of your setup inside a virtual machine, set this field to /s MODIFY=FALSE REMOVE=TRUE which indicates a silent uninstallation.
Please note that due to
design limitations, if your setup requires elevated privileges, you will need to manually approve each elevation request - even if you are silently running setup.Guest Folder for Installer
Enter the target folder on the virtual machine for your setup binary files to be copied to.
environment variables are allowed (and recommended) for use in this field.
You may also use hard-coded, literal path strings in this field. However, this may limit your ability to test your setup project on different virtual machines which may not all have the same hard-coded path. For this reason, it is recommended that you use environment variables instead.
This field is mandatory. If it is missing, it may be automatically populated with %TEMP% indicating the temporary folder inside the target virtual machine.
Unit Test Package
Unit testing allows you to run any custom executable file on the target virtual machine after an installation or uninstallation, to verify that each specific installation and uninstallation task has completed as designed.
The default unit test binary is supplied inside your InstallAware main installation folder as unit.exe. The InstallAware source codes of the default unit test binary is supplied inside your main InstallAware installation folder, within the unit subfolder. You may type, for example, the following path in this field to utilize the default unit test binary that ships with InstallAware: C:\Program Files (x86)\InstallAware X3\unit.exe. However, keep in mind that you may specify any binary in this field, not just a package that has been built with InstallAware. Your custom binary may run any kind of checks, in addition to or in place of the default checks in the default unit test scripts, to validate successful processing of your setup tasks.
The default unit test checks the 0 unless specifically coded otherwise, this approach guarantees maximum true positives and minimum false positives when testing InstallAware setups based on built-in samples, templates and wizards. Review the supplied MSIcode source code for more technical information on the registry checks involved.
to determine if an installation or uninstallation completed successfully. Since a setup which has been cancelled or failed may return the success code ofIf an installation or uninstallation does not return a success code of 0, the unit test will not be run. You may of course use the Terminate with Exit Code command to specifically indicate failure conditions during your setup's execution as an alternative to unit testing.
Please note that MSI packages created with the Group Policy Wizard are not supported for unit testing. If you wish to unit test MSI packages, please use the
Unit Testing Command Line Parameters
Your unit testing binary will always be invoked with two or three hard-coded command line parameters: The Product Code of your setup project will be supplied as the first command line parameter (always enclosed within curly braces), and the value /s as the second command line parameter for installations, or the values /u /s as the second and third command line parameters for uninstallations.
These command line parameters are automatically parsed inside the default unit test MSIcode source scripts, helping the default unit test script determine when to check for product presence and when to check for product absence, as well as how to uniquely identify the product being checked for. When using a custom unit testing binary, ensure to correctly parse these command line parameters as necessary to evaluate the success of installations and uninstallations.
Unit Testing Return Values
Your unit testing binary must return 0 to indicate successful test results, 1 to indicate a failure during one or more unit tests, and 2 to indicate incorrect command line parameters specified during testing (the last of which could indicate an internal InstallAware error). Other return values from unit testing binaries are not recognized, and may be misinterpreted if returned.