Scripting with Login Enterprise: Tips and Tricks
One of the most valuable benefits of Login Enterprise is a scripting platform used to emulate user interactions.
These interactions are human-like and represent how an actual user would interact with applications, all the while gathering user-experience-related data.
These data-points are custom-defined timing metrics that show how long the application being tested is taking to perform functions.
Want to see how long it takes to launch your application and get to the landing page successfully?
Not only will Login Enterprise track how long this will take, but it will also save this metric to be viewed on the elegant Login Enterprise web interface or to be retrieved via the public API. Also, if the application doesn’t start in the maximum allowed time Login Enterprise will log an error and take a screenshot of the application, which can also be viewed in the Login Enterprise web interface.
Throughout my years of Professional Services engagements, I’ve come across several tips-and-tricks that help Login Enterprise workloads with stability and ease. Additionally, these tricks produce meaningful user-experience data-points, which is arguably the best feature of the Login Enterprise synthetic-user scripting platform. This blog, will cover three effective and practical examples.
Waits in between interactions
Adding waits in between interactions makes the Login Enterprise-driven application interaction humanlike.
START(mainWindowTitle:"Untitled - Notepad",processName:"notepad");
MainWindow.FindControl(className : "Document:Edit", title : "Text Editor").Click();
MainWindow.Type("The virtual user is typing this text. Pretty cool, right?");
In this example, the script will start the application, click on the text editor pane, wait a second, and type some text. This helps simulate an actual user performing tasks closer to how an average user would naturally – with pauses in between.
Using keyboard shortcuts to navigate
Instead of having the workload navigate around the application being tested by clicking on object, use keyboard shortcuts whenever possible. For example, it’s common for an application to have the keyboard shortcut of CTRL + O mapped to open the browse/open file dialog. This would look like this in the workload script:
Using keyboard shortcuts can help make a script faster to write and be more reliable.
Adding logging to script
This is an easy one but can also be easily overlooked! The following will produce a log both in text logs made by the synthetic user and in the scripting tool’s terminal output when running the script. Here’s an example how it looks in the workload script:
MainWindow.FindControl(className : "Document:Edit", title : "Text Editor"); Log("The text editor was found! Continuing on with the script…");
In this example the first line looks for the text editor pane in notepad then, if found, logs the fact it was found. It’s recommended to add logs throughout the script; it can help with troubleshooting by making it easy to determine where the script was if an error was encountered.
Check out the ever-growing Workload Templates collection, with workloads ready to be plugged into Login Enterprise and tested! The Login VSI technical team can assist with the Login Enterprise scripting platform training.
For more information on Login Enterprise, including the scripting platform, refer to the documentation.
Ready to maximize your end-user experience?
Start maximizing your end-user experience and make your VDI environments run better and operate smoother.
Start Free Trial Register for a Live Demo