Overview
In Login Enterprise, effectively managing application behavior is essential for simulating real-world scenarios with accuracy. The "Leave Application Running" feature enables applications to remain active in the background between script executions, replicating user behavior where applications are left open rather than closed after use.
This feature does not apply to web scripts; it is only applicable to application scripts.
This article provides essential guidelines for leveraging the "Leave Application Running" option within your testing environment. Learn how to ensure precise application identification, optimize script configurations, handle multiple instances of the same application, and manage resource usage effectively.
Run once
The "Run once" option is intended for executing tasks that are only required once, such as configuring registry keys or performing specific automation setups at the beginning of a test.
Load Test
In a Load Test scenario, you may attach multiple application scripts such as Excel and Word. For Excel, you can enable the "Run once" option, while Word follows its default behavior.
During user sessions, actions will initiate with Excel first, followed by a 10-second pause, then Word. This sequence repeats until the user logs off.
Continuous Test
In a Continuous Test, enabling "Run once" is effective only when "Repeat all steps above" is configured to 2 or higher.
If disabled or set to 1, "Run once" has no effect, as the default behavior runs everything once. When enabled with a setting of 2 or higher, in a continuous test setup with Excel set to "Run once" and Word set to default, the behavior is as follows:
The user logs on, runs Excel once, waits 10 seconds, runs Word, waits 10 seconds, runs Word again, and then logs off.
Application Test
In Application testing, there is no "Run once" option for applications. Application tests execute each application once and do not repeat.
Leave application running
The "Leave Application Running" option ensures that the application specified in the configured application script continues to run in the background as Login Enterprise moves to the next application script. This behavior mimics real user interactions where applications are often left open rather than closed after use. This feature operates consistently across all use cases of Login Enterprise. Here are some important considerations for successful use:
Application title
Each command sent to an application within Login Enterprise scripts requires identification of the application. Typically, this identification is based on the application's title. When using "Leave Application Running," it is crucial that the title of the focused action within a script is as unique as possible. This prevents commands from being sent to the wrong application inadvertently open in the background.
Repeat cycle
In Continuous Testing, there is an option to repeat steps, while in load testing, all actions are repeated by default. When "Leave Application Running" is enabled for an application script, it may result in the same script (e.g., Excel) running multiple times without closing. Therefore, it's essential that the script is designed to handle subsequent runs seamlessly. For instance, if the first action in an Excel script is to open a file, ensure this action can be repeated at the script's end.
Process started vs process running
Sometimes, the process you start, e.g. "start.exe" differs from the process that is running, e.g. "App.exe". If an application is left running and the script is rerun, the script may attempt to start the initial process again, potentially causing unintended behavior.
Multiple Application scripts of the same app
When multiple application scripts use the same application and "Leave Application Running" is enabled, Login Enterprise may struggle to differentiate between application instances. For example, if a script starts Word and another script attempts to start Word again, the appliance may recognize that "word.exe" is already running and refrain from starting a new instance. Leaving multiple instances running concurrently can lead to unpredictable behavior. Consider launching the application using a specific file, e.g. starting Word using a Word document to manage instances effectively.
Resource usage
Leaving applications open consumes more resources during testing compared to closing them. Be mindful of resource utilization when opting to keep applications running after a script completes. Make sure you do not end up in a situation where you have 5 apps open that each take 25% of your memory.