login vsi company logo login vsi company logo 250x40
header-03.jpg
  • Home
  • Blog
  • Customizing Workloads: Extending the Login VSI and Login PI scripting language

Customizing Workloads: Extending the Login VSI and Login PI scripting language

Customizing Workloads: Extending the Login VSI and Login PI scripting language

When you want to customize workloads, the workload scripting language for Login VSI and Login PI already contain a lot of common pre-defined variables to help you to do so (a full list of variables can be found in our documentation). But if a situation requires functionality that isn’t available in the existing scripting language, then the workload scripting language can be easily extended with additional functionality. In this blog post I will explain how to do this.

To extend the functionality of the scripting language the following is needed:

  • An external script or program that can perform the actions required. In this example I am using an external program that sends text from a specific column in a CSV file to the application that is currently active. Scripts can also be used.
  • A basic understanding of scripting and/or the workload scripting language used by Login VSI and Login PI (though this blog focuses on Login VSI).

The magic

The way to extend the scripting language is by using VSI_ShellExecuteWait(). ShellExecuteWait simply executes an external file or program and waits until the program (associated with the file) exits.

Placing the files

To make the script or program that is executed by ShellExecuteWait easily accessible, place it in the VSIshare under _VSI_Binaries > Target. This folder will be copied to the temp directory when the Login VSI user logs on. By placing the file in the target folder there is no contention for access to the program (or script) during the test.

customizing workloads extending the login vsi and login pi scripting language target folder

Making workload changes

In the workload add VS_ShellExecuteWait("logname","path to external program or script", "command line parameters").

In my example that is:

VSI_ShellExecuteWait("ExtendExample", "%temp%\vsi\runtime\typefromcsv.exe","1 \\win-32tlo3go24m\VSIShare4\users.csv Username 1")

customizing workloads extending the login vsi and login pi scripting language workload example

The test it looks like this when running. I have enabled debugging so that the workload line currently being executed is visible. Do you want to debug Login PI workloads? This blog explains how to enable debugging for Login PI.

customizing workloads extending the login vsi and login pi scripting language workload running

The CSV file looks like this:

customizing workloads extending the login vsi and login pi scripting language csv

Conclusion

This example is a fairly simple program that reads from a CSV file and sends those keystrokes to the currently active application. I have also used the same technique to, for example, find images on the screen, automate Google Chrome and complete conditional tasks. As you can see, it’s pretty straightforward to extend the Login VSI and Login PI scripting language using external scripts or programs. This allows the scripting language to handle any task.

About the author

Dennis Geerlings started at Login VSI about 4 years ago and worked as a consultant within Login Consultants. He supported multiple customers in migration projects. Presently, Dennis is support manager and lead consultant at Login VSI. In these roles he supports customers and partners in the US and Canada, co-develops the Login VSI product, and serves as a pre-sales engineer for enterprise customers. 


Tags: How-to, Login VSI, Login PI, Workloads, Best Practices, Support

What our customers are saying

Akio Kawaguchi - Networld

"Login VSI is the only tool for benchmarking VDI with high level accuracy. We use Login VSI to verify the performance of our internal VDI system and to verify the performance of VDI systems that we integrate for our customers."

Akio Kawaguchi, Deputy General Manager of International Alliance Sector at Networld Corporation


Paul Bray - Computacenter

"We needed a robust method of evaluating multiple different platforms in a systematic and consistent manner. We chose Login VSI as it is the best of breed and met all of our requirements. Login VSI helps us to address one key aim - How can we exploit new technologies to deliver the best Virtual Desktop user experience possible?"

Paul Bray, Chief Technologist – Workplace & Mobile at Computacenter


Todd Mace - PernixData

"Login VSI has been a great partner for us. Customers use PernixData with Login VSI to help validate their user experience. Login VSI helps to see what their performance bottlenecks are and our software helps to mediate some of that. Login VSI has been a kind of defacto standard to be able to help that validation and help the customer to be able to come up with a solution to fix it."

Todd Mace, Product Manager at PernixData

Login VSI, Inc.

300 Tradecenter

Suite 3460
Woburn, MA 01801

Phone: +1 844 828 3693

Login VSI B.V.

De Entree 85
1101 BH Amsterdam
The Netherlands

Phone: +31 20 705 1200