This is a migrated thread and some comments may be shown as answers.

Does size matter?

17 Answers 216 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 18 May 2011, 03:41 PM
We've debated THAT question for awhile! 

WAIT!  I'm asking about SCREEN size, etc between the time of script recording and playback.

We have deployed WebUI in our shop with multiple QA analysts recording scripting on separate machines and then once they are satisfied with the results the sctripts are delivered to the central instance and run daily there.  We have seen inconsistencies in test results (PASS/FAIL) in 2 categories:  performance and image size.

The machines need to be as close as possible in these areas.   Performance needs to be matched using RAM, number of competing applications/resources, virtual environment configurations, etc..... this is required for steps to execute that are dependent on a pop-up or something else that may be delayed.

We are finding that the factors neded to match SIZE also have an effect.  (Especially if you rely on IMAGE VERIFICATION).   I recently proved to myself that if I have changed the size of the browser window (IE) significantly from what the script was recorded against that the image verification fails.

So I am asking, if you intend to record a script on one machine and execute it on another and that script uses image verification (or similar), which of the following 3 MUST match in order to assure valid testing?
            Screen resolution settings
            Browser window size
            Montior size

Are there any commands to implement that can adjust these settings to standard values before a script perpares to execute?

17 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 18 May 2011, 06:11 PM
Hello Mark,

Actually, Test Studio should be immune to those three settings: screen resolution, browser window size, and monitor size.

The essential settings that should match on all machines running Test Studio are browser zoom level and screen DPI. You should set IE browser zoom to 100% and DPI to 96. Here is a KB article detailing this procedure.

Another setting which could potentially fail an image verification is Color Depth (256, 16-bit, 32-bit), especially if the tolerance setting is low. So please ensure that setting matches as well.

Regards,
Anthony
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Mark
Top achievements
Rank 1
answered on 18 May 2011, 08:05 PM
Anthony;
    Thank you very much for the informative reply.  I/we will take the necessary steps to ensure that these settings are in-synch across machines when porting scripts form mone to another.

    However, I still have one question/issue about your statement saying "...Test Studio should be immune to .......: browser window size...".   

I am finding that browser window size DOES seem to affect Test Studio. 
Using a single machine only:  
        -    If I record a script which contains an image verification clause (using an IE browser window about 1/4 size of the monitor)
        -    Save the script 
        -    BEFORE running the script I open the browser and drag the window to nearly full-monitor size then close the browser.
        -    Launch the script...it will fail on the image verification.

If this IS NOT intended funcitonality of Test Studio - then I think we have a bug.   
If this IS intended functionality of Test Studio - then how do I set my script to size the window to it's recorded size?
Mark
    
0
Anthony
Telerik team
answered on 19 May 2011, 03:25 PM
Hello Mark,

Your scenario may be expected behavior depending on the exact circumstances of the image you're trying to verify. If you record an image verification when part of the image is cut off/truncated due to a small-sized browser window, it will not match the image that is displayed on execution that is not cut off (due to maximized browser window). Best practice is to record and execute with the image fully visible. A few manual steps may be necessary to accomplish this.

Maximize the browser at the beginning of the test:

This can be done by adding a coded step (that process is described here). Add the following line of code to that step:

ActiveBrowser.Window.Maximize();

Then simply drag that step to the top of the test. I also recommend adding a short Execution Delay (described here) before the coded step so it does not attempt to maximize the browser before it actually loads.

If that step does not compile at first, you will need to add the System.Windows.Forms reference to the Project:

1. Click the Project tab.
2. Click the Show button in the Setting ribbon.
3. Click Script Options in the left column of User Settings.
4. Click "Add Reference."
5. Browse to the following folder:

32-bit machine: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client

64-bit machine: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client

6. Choose System.Windows.Forms.dll and click Open.
7. Click OK.
8. Execute your test.


Another step is to add a Scroll Element from the Quick Task menu. Enable hover over highlighting, hover over the element, click the blue nub, choose Scroll Element, and pick the appropriate option.

Regards,
Anthony
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Tom
Top achievements
Rank 1
answered on 15 Jun 2011, 03:10 PM
Hi Anthony,

I'm working with Mark on this same project. The code step you pointed us to isn't maximizing the browser, and sometimes (not every time) I'm receiving an error that a recorder has to be attached for Silverlight applications. What does that error mean?

I have delays inserted for 1000 msec. as well both before and after the coded step to maximize the browser.

Thanks,
TomB
0
Anthony
Telerik team
answered on 15 Jun 2011, 05:26 PM
Hello Tom,

Please watch this Jing video of that coded step working in my test. The browser window starts half-sized and is maximized by step 1. Does your coded step pass without maximizing the browser? If it fails, please provide me the step failure details.

That message is simply a notification and not an error. I see it when right clicking a step in a Silverlight test and choosing "Run > To Here". This is Test Studio alerting you it may be necessary to reload the page for recording to be enabled. Typically you can press OK and proceed as normal without reloading.

Kind regards,
Anthony
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Tom
Top achievements
Rank 1
answered on 15 Jun 2011, 06:52 PM
No, the step passes. The browser simply never maximizes.
0
Anthony
Telerik team
answered on 16 Jun 2011, 05:23 PM
Hello Tom,

That is strange. What version of IE do you have?

Does the browser maximize when you execute the test in Firefox, Safari, or Chrome? If not, what versions of those browsers do you have?

All the best,
Anthony
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Tom
Top achievements
Rank 1
answered on 16 Jun 2011, 05:32 PM
I'm using IE 8.

I have FireFox installed on a separate test machine which doesn't have WebUI installed on it.

-Tom
0
Anthony
Telerik team
answered on 20 Jun 2011, 05:30 PM
Hello Tom,

I can assure you that the correct is code so I am still puzzled as to why it is not working for you. I hope you're able to install an alternative browser on the machine with Test Studio. That will tell us whether this issue is browser-specific.

Additionally you could install Test Studio on the separate test machine you mentioned that currently has Firefox. This will tell us whether this issue is machine-specific. Simply deactivate Test Studio on machine 1 and activate in on machine 2. You can do this from the Help tab by clicking the Manage button in the Licensing ribbon.

Regards,
Anthony
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Tom
Top achievements
Rank 1
answered on 21 Jun 2011, 07:40 PM
I installed Firefox 4 on my HyperV image. The "maximize" step is still not maximizing the browser.
0
Anthony
Telerik team
answered on 22 Jun 2011, 06:18 PM
Hello Tom,

What version of Windows are you using? What version of Test Studio?

I have tried this with Windows XP and 7, and with multiple versions of the 2011 release of Test Studio. It works for me every time.

Can you send me a copy of your test and/or a Jing video so I can see first-hand what is happening? That will be the only way I can continue to troubleshoot this.

Kind regards,
Anthony
the Telerik team
Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

Have you looked at the new Online User Guide for Telerik Test Studio?
0
Tom
Top achievements
Rank 1
answered on 22 Jun 2011, 06:22 PM
I'm using Windows 7 with WebUI version 2011_1_502.

Sure. How do you want me to send it to you?
0
Anthony
Telerik team
answered on 23 Jun 2011, 05:56 PM
Hello Tom,

I just emailed you a Dropbox link. Please provide a copy of your test (.tstest, .resx, and .cs files) and a Jing video demonstrating the behavior.

Best wishes,
Anthony
the Telerik team
Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

Have you looked at the new Online User Guide for Telerik Test Studio?
0
Tom
Top achievements
Rank 1
answered on 23 Jun 2011, 06:11 PM
Is there another option to Dropbox? That isn't the most secure solution I've ever heard of. I really, really am uncomfortable installing a piece of software that gives an outside server the capability of redistributing my files.
0
Tom
Top achievements
Rank 1
answered on 23 Jun 2011, 07:04 PM
I played around with the DropBox web site and found that I don't have to install anything, so I've uploaded the files except for the tstest file. There was no tstest file associated with the test in question, discovered both by visual search and performing a directory search within the WebUI Test Studio Projects folder.
0
Anthony
Telerik team
answered on 23 Jun 2011, 07:56 PM
Hello Tom,

Tstest is the new file extension for our 2011 version. Since your test was originally created on the 2010 version, it is an .aii file type. You included the correct files. Unfortunately I was not able to open the .aii file.

I was able to open the .cs file in Visual Studio, however. It contains the code behind for the script steps in your test. Your coded step contains no code. See the attached screen shot. A .cs file from my test is on the left and it contains the line to maximize the browser window. Your .cs file is on the right and is empty between the brackets.

Please double click the coded step and an area will appear on the bottom half of the Steps pane to enter the code:

ActiveBrowser.Window.Maximize();


Best wishes,
Anthony
the Telerik team
Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

Have you looked at the new Online User Guide for Telerik Test Studio?
0
Tom
Top achievements
Rank 1
answered on 23 Jun 2011, 08:16 PM
The maximize step now works.

Thanks, Anthony.
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Mark
Top achievements
Rank 1
Tom
Top achievements
Rank 1
Share this question
or