Showing posts with label TestComplete. Show all posts
Showing posts with label TestComplete. Show all posts

2010-11-24

How to load mht-files faster

Big mht-files are loaded slowly and IE could ask couple of times, should it continue to load or not. In order to load faster without asking, there is a key in windows registry:

Key: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles

Create a new DWORD value called "MaxScriptStatements" under this key and set the value to the desired number of script statements. If you are unsure of what value you need to set this to, you can set it to a DWORD value of 0xFFFFFFFF to completely avoid the dialog.

For your convenience, here is the content of reg-file to add value to registry automatically:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles]
"MaxScriptStatements"=dword:ffffffff

This fix is especially useful if you use TestComplete, export logs to mht files and use them for test results analyzing.

Details description about this issue could be found at http://support.microsoft.com/kb/175500.

2010-11-09

What to do if TestComplete 7.52 does not recognize .NET objects

If you are using TestComplete 7.52 and it could not recognize .NET applications, it is due to Microsoft has released some .NET Framework updates that were installed automatically on many computers by the Windows Update service. The changes are related to the core .NET Framework functionality used by TestComplete.

After the updates are installed, tests created for .NET 1-3.5 applications may stop working correctly - you may see the "Object Not Found" and related errors in test results.

To resolve the problems, please apply the relevant hot fix:
TestComplete Ent: http://downloads.automatedqa.com/net_patch/NET_TestComplete_Enterprise.zip
TestComplete Std: http://downloads.automatedqa.com/net_patch/NET_TestComplete_Standard.zip
TestExecute: http://downloads.automatedqa.com/net_patch/NET_TestExecute.zip
TestRecorder: http://downloads.automatedqa.com/net_patch/NET_TestRecorder.zip

Here are the hot fix installation steps:
1. Unpack the downloaded archive to your hard disk drive.
The archive contains two folders: 'x86' and 'x64'.

2. Close the product you are applying the fix to.

3. Copy the 'x86\tcClrHook.dll" file to the Extensions folder of the product.
For TestComplete and TestExecute, the folder path looks like this:
\Bin\Extensions\
For TestRecorder, the path is as follows:
\Bin\

4. If you are running an x64 operating system, you will also need to copy the 'x64\tcClrHook.dll' file to the following folder:
TestComplete, TestExecute:
\x64\Bin\Extensions\
TestRecorder:
\x64\Bin\

The fix can be applied only to version 7.52 of TestComplete, TestExecute or TestRecorder.

2010-07-21

What is the best tree model for web in TestComplete

This question is often ask, when people start to automate web applications.You know, TestComplete offers 4 models in 7.x version:
  • DOM
  • Tag
  • Hybrid
  • Tree
But what is the best?

And here is my observations:

The DOM and Hybrid are not useful at all - I did see any applications (saw at more that 10 of web applications) in which it could be useful. The selection is between Tag and Tree.

Tag is good when there are a lot of intermediate DIV's in application, e.g. as it is for applications build on GWT (Google Web Toolkit). In such case it allows to simplify path to the elements.
Tree is good when there is a tree :). Seriously! E.g. if there are a lot of places where you want to know the children of the parent node.

According to performance, I know the cases when the Tag is faster and the cases when the Tree is faster. Do not believe to anyone, just test.

BTW, there is a verbose description in TestComplete help regarding tree models. You can read it in TestComplete help (Menu "Help"->"Index", type "Tree model (Web testing), About", press ). I will not display it here, because it a lot of text and I believe that you have already read about this :). I show you something more interesting - the personal view about what the fastest tree model from AutomatedQA support team:

The fastest web tree model is the Tree model as stated in the "Web Tree Models" ( http://www.automatedqa.com/support/viewarticle.aspx?aid=5541 ) help topic, so I recommend that you use it. Also, I recommend that you only call the Refresh or RefreshMappingInfo method (the method you use depends on whether you use name mapping in your tests) only for the object whose child objects should be refreshed. So, if only a panel is supposed to be refreshed, you should call the method for this panel or the panel's parent, not for the entire Page object and not for the Sys object (calling the method for the Sys object makes TestComplete refresh the entire object tree).

Also, I recommend that you see the following article:

http://www.automatedqa.com/techpapers/testcomplete/test-playback-performance-tips/
I will not judge you if you read this advices with a little of skepticism, but I agree that calling Sys.Refresh or SomePage.Refresh is not sexy.

Actually we come the following solution - use Tag model by default and switch at runtime to Tree model, where in makes sense. Yes, you can switch at runtime by writing:
Options.Web.TreeModel = "Tag";

It will be interesting for me to try mirror case: use Tree by default and switch to Tag in some cases.

What is your experience with usage of web tree models in TestComplete or in other test automation tools?