Using a CSV file

From Login VSI Documentation
Jump to: navigation, search

There are situations where data, used in your connection commandline, (found in the Management Console > Test setup > Connection tab) is too variable to create a default commandline for all the sessions. These situations can be an environment where there are a lot of different target servers, or the usernames and or passwords are not the same in every situation. If this is the case you are able to use a CSV file filled with all the variables that are needed for a successfull test. You can then, via a special variable name, use the data from the CSV file in your connection commandline.

How this works is explained below.

Basic concept

VSI will read the CSV file and will consider the first line as titles the rest of the file is considered to be data. VSI will use these titles to replace variables used in the command line. For example:

User

Password

Resource

LoginVSI1

Password!

192.168.0.1

LoginVSI2

Welcome123

192.168.0.2

LoginVSI3

12345

192.168.0.3

LoginVSI4

qwerty

192.168.0.4


VSI will create the variables using this template.

{CSV_title}

Using the above CSV I have access to the following variables. Since the columns in the first line are considered the titles.

{CSV_User}

{CSV_Password}

{CSV_Resource}

Using these variables in the command line will cause them to be replaced by the corresponding data line. For example the command line below will result in the following command lines being executed by the launchers

"{VSISHARE}\_VSI_Binaries\Connectors\RDPConnect.exe" /server {CSV_Resource} /user {domain}\{CSV_User} /password {CSV_password}

Session 1

"{VSISHARE}\_VSI_Binaries\Connectors\RDPConnect.exe" /server 192.168.0.1 /user {domain}\LoginVSI1 /password Password!

Session 2

"{VSISHARE}\_VSI_Binaries\Connectors\RDPConnect.exe" /server 192.168.0.2 /user {domain}\LoginVSI2 /password Welcome123

Session 3

"{VSISHARE}\_VSI_Binaries\Connectors\RDPConnect.exe" /server 192.168.0.3 /user {domain}\LoginVSI3 /password 12345

Session 4

"{VSISHARE}\_VSI_Binaries\Connectors\RDPConnect.exe" /server 192.168.0.4 /user {domain}\LoginVSI4 /password qwerty

Examples

Example.jpg

"{VSISHARE}\_VSI_Binaries\Connectors\RDPConnect.exe" /server {CSV_Resource} /user {domain}\{CSV_User} /password {CSV_Password}

Connecting to different VMware Horizon View desktop pools in a single test

This example will show how to configure VSI to connect to different desktop pools in a single test.

   Do be aware that the test will go down the list that they are ordered in on the CSV file.

Typical VMware Horizon View command line

"C:\Program Files\VMware\VMware View\Client\bin\wswc.exe" -serverURL ViewCS1.MyDomain.local -username LoginVSI{count} -password Password! -domainName MyDomain.local -desktopName SantaClaraDesktops -standAlone -logInAsCurrentUser False –nonInteractive

CSV file content

Username

DesktopPool

LoginVSI1

SantaClaraDesktops

LoginVSI2

AmsterdamDesktops

LoginVSI3

SantaClaraDesktops

LoginVSI4

AmsterdamDesktops

(…)

(…)

LoginVSI499

SantaClaraDesktops

LoginVSI500

AmsterdamDesktops


Command line with CSV file

"C:\Program Files\VMware\VMware View\Client\bin\wswc.exe" -serverURL ViewCS1.MyDomain.local -username {CSV_Username} -password Password! -domainName MyDomain.local -desktopName {CSV_DesktopPool} -standAlone -logInAsCurrentUser False –nonInteractive

Result

Session1

"C:\Program Files\VMware\VMware View\Client\bin\wswc.exe" -serverURL ViewCS1.MyDomain.local -username LoginVSI1 -password Password! -domainName MyDomain.local -desktopName SantaClaraDesktops -standAlone -logInAsCurrentUser False –nonInteractive

Session2

"C:\Program Files\VMware\VMware View\Client\bin\wswc.exe" -serverURL ViewCS1.MyDomain.local -username LoginVSI2 -password Password! -domainName MyDomain.local -desktopName AmsterdamDesktops -standAlone -logInAsCurrentUser False –nonInteractive

Session3

"C:\Program Files\VMware\VMware View\Client\bin\wswc.exe" -serverURL ViewCS1.MyDomain.local -username LoginVSI3 -password Password! -domainName MyDomain.local -desktopName SantaClaraDesktops -standAlone -logInAsCurrentUser False –nonInteractive

Session4

"C:\Program Files\VMware\VMware View\Client\bin\wswc.exe" -serverURL ViewCS1.MyDomain.local -username LoginVSI4 -password Password! -domainName MyDomain.local -desktopName AmsterdamDesktops -standAlone -logInAsCurrentUser False –nonInteractive

(…)

Session499

"C:\Program Files\VMware\VMware View\Client\bin\wswc.exe" -serverURL ViewCS1.MyDomain.local -username LoginVSI499 -password Password! -domainName MyDomain.local -desktopName SantaClaraDesktops -standAlone -logInAsCurrentUser False –nonInteractive

Session500

"C:\Program Files\VMware\VMware View\Client\bin\wswc.exe" -serverURL ViewCS1.MyDomain.local -username LoginVSI500 -password Password! -domainName MyDomain.local -desktopName AmsterdamDesktops -standAlone -logInAsCurrentUser False –nonInteractive