login vsi company logo login vsi company logo 250x40
header-01.jpg

Login VSI Workload Customization - eDrawings

Login VSI Workload Customization - eDrawings

Login VSI supports workload customization, this way you can add your own applications to a workload to generate load on your environment. But how does workload customization work? In this blog post I will describe how to start and how to create a custom workload with the application eDrawings.

Define your goal

What do you want to achieve with the workload customization? There are different scenarios, you can add an application to the workload and measure the impact compared to workload without the application. This way you can guarantee you have enough recourses to run the application on a large scale. It is also possible to measure the application start time and if possible improve the start time. Another case is measuring the impact on the back-end, do I have enough recourses on the back-end to deliver the information? Define what you want to achieve with workload customization, this can help you with creating the workload. In this blog post my goal is to measure the impact of an application and collect the application start time.

The average user

What does the average user do in the application you are going to add to the workload? That is a hard question but let’s start simple. In this blog post I will use SolidWorks eDrawings as an example. My example users are using the application to review drawings that are created by another department. They will open a drawing rotate the 3D drawing, disassemble and finally close the application. Please remember, you can always extend the workload actions, so start simple.

Prepare segment

At first we need to make sure there are no unexpected pop-ups. With new users the application can provide messages about settings, auto updates or just help tips. If these pop-ups are always shown you can create this within the workload otherwise you need to prevent this.

edrawings product registration

We are going to prevent the registration pop-up. You can use tools like Regshot to detect which changes are made when you disable the pop-up. So in my example I need a registry value to be created to prevent the registration pop-up.

Within the prepare segment we will create a new VSI_RegWrite which will create the required registry value. It is recommended to add a comment so you remember why it is added.

VSI_RegWrite("Workload", "HKEY_CURRENT_USER\Software\eDrawings\e2014\General", "Activated", "REG_DWORD", "1")

Creating the library

eDrawing uses the file type association .easm. When we open an .easm file the drawing is opened directly. To get the file on the target machine we are going to create a library which contains .easm files. The example file can be found here.

Within the {VSIshare}\_VSI_Content\ directory we can create a new folder called easm. Here we are storing the files and rename those with numbers as seen in the screenshot.

edrawings content library easm files

The next step is to add the .easm file type association in the datalocation.ini. The .ini is located in the {VSIshare}\_VSI_Configuration\_CurrentTest\ directory. Create under the [Library] section a new entry as followed:

easm=<amount>

edrawings datalocation easm added

At the above screenshot we have defined 5 .eams files located on the VSIshare that we can use within the workload.

Creating the workload

So we are going to use the file type association to open the workload file. First we need to be sure the file is copied from the VSIshare to the target machine. For this action we can use the VSI_Random_File_Copy command which will copy a random file from the library we created earlier.

VSI_Random_File_Copy("eDraw1", "EASM", "%VSI_Userhome%\EASM1.easm")

Now that we have the file we can open the application with the following command.

App_Start("eDraw1", "", "%VSI_Userhome%\EASM1.easm", "Title", "eDrawings")

We need to make sure the application is started and active, this can be done by a App_Focus.

App_Focus("eDraw1", "Title", "eDrawings", "", "Maximize")

When we are sure the application is open we can send the keystrokes to rotate the drawing. Earlier on we have learned the example user is rotating and disassemble the drawing. We can achieve this by using the arrows keys and “e” to disassemble. We are adding this with the following commands:

VSI_Type_Fixed("eDraw1", "{left}{left}{left}{left}{left}{left}")
VSI_Type_Fixed("eDraw1", "{down}{down}{down}{down}{down}{down}")
VSI_Type_Fixed("eDraw1", "{left}{left}{left}{left}{left}{left}")
VSI_Type_Fixed("eDraw1", "{down}{down}{down}{down}{down}{down}")
VSI_Type_Fixed("eDraw1", "e")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
VSI_Type_Fixed("eDraw1", "e")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")

Finally we are going to close the application with the App_Close command.

App_Close("eDraw1", "Title", "eDrawings")

The next step will be testing this on a target machine. It is recommended to save this in a separate workload before combining this with an existing workload. This way we are sure the custom workload is working properly. Now it is possible to combine it with an existing workload.

Complete eDrawings workload:

#WLProp:Version#1.0.0
#WLProp:Date#2013-10-11
#WLProp:Description#The eDrawing Workload
##### Start segment Prepare
Segment("Workload", "Prepare")
 
# Skip eDrawing registration screen
VSI_RegWrite("Workload", "HKEY_CURRENT_USER\Software\eDrawings\e2014\General", "Activated", "REG_DWORD", "1")
 
# Random wait before starting workload
Workload_RandomIdle("Workload", 5, %VSI_RandomInitialWait%, "Waiting to start workload")
 
# Set mouse position
VSI_Mouse_Position("Workload")
 
##############################################################
##### Start segment 1 - eDrawing                         #####
##############################################################
Segment("Workload", 1)
 
VSI_Random_File_Copy("eDraw1", "EASM", "%VSI_Userhome%\EASM1.easm")
App_Start("eDraw1", "", "%VSI_Userhome%\EASM1.easm", "Title", "eDrawings")
App_Focus("eDraw1", "Title", "eDrawings", "", "Maximize")
VSI_Type_Fixed("eDraw1", "{left}{left}{left}{left}{left}{left}")
VSI_Type_Fixed("eDraw1", "{down}{down}{down}{down}{down}{down}")
VSI_Type_Fixed("eDraw1", "{left}{left}{left}{left}{left}{left}")
VSI_Type_Fixed("eDraw1", "{down}{down}{down}{down}{down}{down}")
VSI_Type_Fixed("eDraw1", "e")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
VSI_Type_Fixed("eDraw1", "e")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
VSI_Type_Fixed("eDraw1", "{up}{up}{up}{up}{up}{up}{up}{up}{up}")
VSI_Type_Fixed("eDraw1", "{right}{right}{right}{right}{right}")
App_Close("eDraw1", "Title", "eDrawings")

Please note: For the VSImax measurements the VSI_Timer() command needs to be added to the workload.

Conclusion

The Login VSI meta language lets you easily add custom applications to the workloads. Before starting these are some things to remember:

  • A Login VSI Pro license is required for workload customization.
  • Define your goal, what do you want to achieve with the customization?
  • Start with basic actions, you can always extend the workload.
  • Test the specific application before adding it to an existing workload.

This blog was originally published on Logit Blog.

About the author

Ryan Bijkerk (@Logitblog) is a Product Owner at Login VSI and a Microsoft MVP on Application Virtualization (App-V) technology. He is also involved in the independent research Project VRC and speaks at events. Besides working, Ryan enjoys writing for his blog and riding his MTB.


Tags: How-to, Login VSI, Workloads

Post comment as a guest

Attachments

0
  • No comments found

Start Delivering the Best End User Experience Today

Request a Demo

Login VSI, Inc.

3945 Freedom Circle
Suite 670
Santa Clara, CA 95054

Phone: +1 408 899 7418

Login VSI B.V.

De Entree 85
1101 BH Amsterdam
The Netherlands

Phone: +31 20 705 1200