login vsi company logo login vsi company logo 250x40

 

Get the best possible VDI performance, density and availability with Login VSI
Our Solutions

  • 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.

 


 

Start using Login VSI today

Our industry-standard software is built to help you avoid problems, lower costs and improve performance. Request a Quote or get your free Trial below, and benefit from our award-winning services.

Free Price Request  Your Free Trial

 


About the company Login VSI

The company Login VSI provides end-user performance insights for virtualized desktop and server-based computing environments. Enterprise IT departments use flagship product Login VSI (for load testing) and Login PI (for continuity testing) in all phases of their virtual desktop deployment—from planning to deployment to change management—to build and safeguard a good performance, a high availability, and (as a result) a good and consistent end-user experience. For more information about Login VSI or for a free test license contact us.

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

Popular Blogs

Login VSI Blog - Ongoing Effects CPU Flaws

The Ongoing Effects of Intel CPU Flaws

The Ongoing Effects of Intel CPU Flaws Over the last year, we’ve seen many Intel CPU hardware flaws come to light and when news first broke about Meltdown & Spectre there was a lot of panic: "should we patch?", "What’s the performance impact?", "Can we still rely on this hardware?" Continue Reading
Login VSI Blog - Updating to Windows 10 1903? Make Sure to Test!

Updating to Windows 10 1903? Make Sure to Test!

Updating to Windows 10 1903? Make Sure to Test! It’s that time of the year again. Microsoft have released their spring update and the first IT-Pro’s are getting ready to move their VDI environment over. Continue Reading
Login AT Express offers Application Compatibility Testing for up to 50 applications for FREE

[Press Release] Login VSI introduces free license for award winning solution, Login AT

Login AT Express offers Application Compatibility Testing for up to 50 applications for FREE Atlanta, USA, May 22, 2019: Login VSI, the industry standard for VDI and SBC performance testing, announced today the availability of a new, free version of Login AT for Bulk Application Compatibility Testing. Continue Reading
Login VSI Blog - LVTE 2109 - Technology Advocates & Experts

Login VSI Technology Advocates and Experts 2019

About a year ago Login VSI, the industry standard in VDI performance testing, announced a new program Recognizing those individuals that have built and displayed extensive knowledge of the Login VSI software solutions, and visibly contribute to the End-User Computing (EUC) Community. Continue Reading
Introducing Login PI 3.4

Introducing Version 3.4 of Login PI

What’s New & Different - Introducing Version 3.4 of Login PI We've updated Login PI, the benchmark in unplanned-change and gradual-deterioration detection for VDI. New features include improving the way information is collected & distributed, the way customized workloads are created & the way actual tests are executed. Continue Reading
Login VSI Blog - What's New in Login PI 3.5

What's New in Login PI 3.5?

What's New in Login PI 3.5? Netscaler, SLA Reporting, Event Logging features and so much more! At the end of June, we released a new version of Login PI 3 bursting with new features and enhancements. There are so many that I could write pages of blog about it, but let’s just keep it simple and focus on some of the big items. Continue Reading
Cookie Settings