VMware {code} Community
tfaron
Contributor
Contributor

Strategy for testing Web Client via GUI automation (inclusion of automation swc files)



My company has developed a Plugin to the Web Client and our intent it to do some GUI Automation on it. The recommended strategy for automating Flex is to have some adobe automation files (automation.swc, automation_client.swc, automation_spark.swc, automation_dmv.swc) compiled into the application. 

Obviously the Web Client does not have these compiled in, and we can compile our plugin with them, but for example the AdvancedDataGrid's on our custom pages are constructed with vmware grids classes so things that would help us with automation are not exposed.



There is also this idea of runtimeloading the files, however this seems like it's only valid on an application which is a single swc file.


This might not be the ideal place of this post but I have done some extensive searching and not come up with much.


Any suggestions, leads or other information would be greatly appreciated.


Thanks in advance


Reference:


http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ec5.html

16 Replies
laurentsd
VMware Employee
VMware Employee

What Web Client version/build are you using? (in Help > About vSphere)

I think we can provide a special version of container-app.war that supports automation.

0 Kudos
tfaron
Contributor
Contributor

Thanks for the reply.

Currently i am using 5.5.0 Build 1750595

0 Kudos
laurentsd
VMware Employee
VMware Employee

Please send me your email address (in a private message if you prefer) and I'll give you a link to download a version of container-app-war-5.5.0.war built with the Flex automation libraries.

0 Kudos
tushartambay
Contributor
Contributor

Hi Laurent,

My company (HyTrust) would also be interested in getting this flex automation capable build of vSphere (5.5 and soon 6.0) . It would help  in our UI automation effort. What would be the best way to get this?

BTW, we work closely with VMWare on several fronts and are part of the VMWare TAP program too. So if there's other channels we can pursue, please let  me know.

Regards,

0 Kudos
tushartambay
Contributor
Contributor


Hi Laurent,


Thanks for the impressively prompt response.


It took me a while to figure out why I was unable to reply. Turns out I need a minimum of 10 points in order to send a private email via vmware forums.


So, In the interests of time, here's the requested info:


* my email address: ttambay@hytrust.com 


* WCS 5.5.05100 build 1312297 


I have a followup question which I will ask when I hear from you.


Thanks again.


 

0 Kudos
tfaron
Contributor
Contributor

Hi Laurent,

we have now switched to testing Version 6.0.0 Build 2502243 ..

Is 6.0 new build with the Flex Automation Libraries or are special builds still required.

Thanks,

Tim

0 Kudos
tfaron
Contributor
Contributor

Just to elaborate on my previous post more.

We did automation using TestComplete via the debug flash player on vSphere Web Client 5.5. Via the debug flasher player we used

PreloadSWF=C:\Program Files (x86)\SmartBear\TestComplete 10\Open Apps\Flex\FlashInjector.swf

When look at 6.0, i see everything on the login screen, but then once the Flash application loads it tells me the Application is not setup for automation, but setting PreloadSWF with the debug flash player should be doing this. As I have not changed anything on the host and I am able to switch to 5.5 fine.

Any suggestions or help would be appreciated

0 Kudos
laurentsd
VMware Employee
VMware Employee

The login process changed between 5.5 and 6.0.  In 6.0 the user first goes to a web page hosted by the SSO server and Flex modules are loaded in the back-ground, that may explain why your technique may not be working.

0 Kudos
tfaron
Contributor
Contributor

Thanks for replying ..

Is there a workaround or settings in this area? As it's current not suitable for use to do any GUI automation ....

The tool provides a few options:

Use the debug flash player and set PreloadSWF=C:\Program Files (x86)\SmartBear\TestComplete 10\Open Apps\Flex\FlashInjector.swf in 'mm.cfg' which is what I do now, but my guess it's after the Login page and the flex application starting it's not picking this up.

The other option is a custom html file to load the UI.swf but doubt this will work

Finally the say i can build the application with a TestComplete .swf file but being our application is an extension to web client we don't own web client and can't build with it

0 Kudos
Peter_Ivanov
VMware Employee
VMware Employee

I am not familiar with this tool and how it works. If you give more details, we might give some ideas Smiley Happy

One thing that you can try is to open the following URL:

   https://localhost:9443/vsphere-client/home

if you are running it locally, or

   https://<your_vc_fqdn>/vsphere-client/home

This will change the login process. You might need to login once and then close the tab (without closing the browser) and then open the URL again.

0 Kudos
tfaron
Contributor
Contributor

Thanks Peter, I'll give it a shot, as I am trying to run remotely so I will try using the FQDN.

TestComplete, the GUI Automation tool, is a commercial GUI Automation Tool, similar to SilkTest,QTP,WinRunner....

TestComplete allows you to look at flex application using 'PreloadSWF' set in the mm.cfg file for a debug flash player.

One thing I am trying to determine, and my develops can look into more is with 6.0 is the PreloadSWF being loaded..

I also have a ticket out with TestComplete to investigate ...

Judging by previous comments it seems the difference is the html page and how Flash is being loaded after in 6.0 ...

I'll keep trying things ...

Thanks

Tim

0 Kudos
tfaron
Contributor
Contributor

Hi Laurent,

For 5.5 you provided a build to support automation, in 6.0 you mentioned this would be included in the release build.

Is this the case or do i still need special builds

Thanks,

Tim

0 Kudos
tfaron
Contributor
Contributor

It looks like the Web Client 6.0 release is not build with the Automation APIs allowing us to be able to test our extension.

This was the case for 5.5 and we were able to get a build containing these API.

Anyone know how I can obtain an 6.0 build containing the Automation API.

Thanks in advance

0 Kudos
Peter_Ivanov
VMware Employee
VMware Employee

We are working on legally approved solution for providing you a way to automate your testing. It should be ready next week.

As a summary: we cannot give you such build, BUT we can give you a way to build it yourselves and include whatever libraries you need.

Stay tuned!

0 Kudos
Peter_Ivanov
VMware Employee
VMware Employee

Finally it is alive! Instructions and scripts that will enable you to automate your Flex plugin testing!

Check this post out: Enable vSphere Web Client Automation

0 Kudos
tfaron
Contributor
Contributor

Hi Peter,

We currently use the provided solution for vCenter 6 to do automation.

which we got from here a while ago

I have uploaded temporary the scripts and instructions how to patch your web client here:
https://drive.google.com/file/d/0B8gmEmOOqFdaNm16dE1WTVFmZGM/view?usp=sharing

We started to look into vCenter 6.5 and noticed the file structure is different (possible no container-app-war file or it's somewhere else)?

Are you aware of a solution available to instrument this build with the flex automation API's

Thanks

Tim