Command Line Execution Option

AppPerfect products can also be used in the non-UI mode through use of the command prompt. However, this functionality is useful only after creating and configuring a project to suit your requirements in the UI mode.

After creating and saving your project, you can use the command prompt to run the Java Unit Test / Java Code Test / Web Test / App Test / Load test in the non-UI mode. The %project name%.bat/.sh file, is used to run the Java Unit Test / Java Code Test / Web Test / App Test / Load Test project. You can generate this file by exporting project as command line bat/sh file using menu option Tools -> Export Project As command line... There is not much difference between running project in the UI or the non-UI mode, as you can pass various parameters along with the command used.

Note: For help on how to create a AppPerfect project in the UI mode, refer to Creating a new project chapter in the documentation.

The command to be used to invoke product in non-ui mode from command line looks :-

For Windows:
For Linux

Note: Here JAVA_HOME, APPPERFECT_HOME, WORKSPACE_LOCATION, PROJECT_FILE and PRODUCT_TYPE needs to be replaced with corresponding values based on machine settings.

Here "org.eclipse.core.launcher.Main" is the main class which will internally invoke the application passed and will hand over the control to that application. The main application class is "com.appperfect.teststudio.nonuiRunner" which will be responsible for executing the project passed as "-projectfile" parameter. The parameter "-data" is to specify the workspace location which should be used for executing the application and "-producttype" is a constant integer value used to indicate which product to run from the project file. The supported product type values are 1 for Java Code Test, 2 for Java Unit Test, 4 for Load Test, 5 for Web Test and 8 for App Test.

To check the various parameters that can be passed as the command line arguments to the command open the exported command line batch file in Text Editor. It has all the supported parameters listed.