With the release of Login Enterprise 4.6 new settings were added to Applications scripts. This article will explain the features and how they work together and separate.
Important Note:
These features does not apply to web scripts, only Application scripts.
Run Once
The run once option is designed for when you only need to run things once. For example it can be used for specific automation configurations such as registry keys which only need to be configured once at the start of a test.
Load test
For example you have two application scripts attached to a Load test, Excel and Word. For Excel you configured Run Once to be enabled, for Word is set to default behavior.
When a user logs in and the session starts with its actions it will run Excel, wait 10 seconds, and then Word after that it will again wait 10 seconds and run Word again. The last process will continue until the user is asked to logoff.
Continuous test
Run Once for a continuous test is also possible but only effective if you have configured the "Repeat all steps above" to 2 or higher.
If it is disabled or set to 1 the Run Once has no effect as the default behavior is to run everything once anyway. If you do enable it and set it to 2 or higher, have a continuous test setup with Excel set to Run once, and Word set to default the just like the setting below. The behavior is as follows.
What will happen is the user will log on, run Excel once, wait 10 seconds, run Word, wait 10 seconds and run Word again, and then logoff.
Application Test
For application test there is no Run Once option for applications as it application tests will never do a second run.
Leave Application Running
The Leave Application Running option will allow you to make sure to keep the application, of the configured application script, running in the background as it moves to the next Application script. It has been designed so you can get closer to a real user behavior where applications are not closed after use but rather placed on the background. The behavior of the configuration is the same among all use-cases utilized by Login Enterprise. There are a few things you need to know to make successful use of this feature.
Application Title
As you might know Login Enterprise scripts revolves around an application scripts. For each command sent to the application the application identification is required. Application identification can be done in different ways but most commonly is the Title name of the Application. When using "Leave Application Running" it is important that the title of the focus action within a script is as unique as possible. So we do not end up in a situation that a command is sent to the wrong application because it was open in the background.
Repeat cycle
In Continuous testing there is an option to repeat the steps, and in Load testing it is default behavior to repeat all actions. Using Leave Application Running for an application script you will get in to a scenario that the same Excel script is run twice. However Excel is never closed due to the Leave Application Running option. At some point in the configuration Excel script is initiated again, it is then of paramount importance that the end of the script is ready for the beginning of the script. i.e. if the first action in the Excel script is to open a file, make sure that this action is possible at the end of the script.
Process started vs process running
In some cases the process (or executable) you start is not the same as that is running. Sometimes you need to start the app with "start.exe" but the process is "App.exe". If you leave the application running, on the next run, the application script will again start the "start.exe". This can then result in unintended or unexpected behavior.
Multiple Application scripts of the same app
If you are running multiple application scripts that make use of the same application, and you have enabled the Leave Application Running option it can be difficult for Login Enterprise to differentiate between application instances. For example if you start word, and a new application script also starts word, it notices word.exe already exists and then does not start a new instance. And if you leave them running it can cause all kinds of chaos. In those cases you can decide to start the app using the file i.e. start Word using a Word document.
Resource usage
Keeping applications open will consume more resources during a test than closing them. Keep this in mind when you allow applications to run after the script has finished. Make sure you do not end up in the situation where you have 5 apps open that each take 25% of your memory!
Comments
0 comments
Please sign in to leave a comment.