preload

How to find all links on a web page (TestComplete)

Posted by Albert Gareev on Dec 15, 2012
0
Description Get parent object reference. In the example given, it’s a browser process, but you can narrow it down to a page or a web container object (table,  div, etc.). Use FindAllChildren to retrieve array of links. – You can limit search depth according to your context. – You may want to do filtered search using […] ...

TestComplete 9 – Performance Tuning

Posted by Albert Gareev on Dec 12, 2012
0
This post is not about performance testing with TestComplete. This post is about tweaking TestComplete configuration parameters to make it less “greedy” on resources, especially CPU, while performing run-time recognition of a complex GUI. This will mostly be useful to experienced test automation engineers who create their own scripts without record/playback and hard-coded GUI name […] ...

How to retrieve value from text node div/span/p ...

Posted by Albert Gareev on Nov 24, 2012
0
Description Let’s say we need to retrieve a number of megabytes from under “Lots of space” category. First, we need to explore the GUI implementation. If we’re lucky, this text node may have a unique class or ID value. Then it becomes a one-step search as in the code example below. However, if the text node doesn’t have […] ...

How to simulate “mouse over” (TestComplete)

Posted by Albert Gareev on Nov 17, 2012
0
Description “Mouse Over” event triggers responses like highlighting, pop-up hints, etc. With TestComplete we can use one of GUI object’s methods – HoverMouse – to simulate mouse over by placing mouse cursor over object. Alternatively, we can use LLPlayer object to simulate mouse moves. In the example provided both methods are simulating mouse overs on […] ...

Let’s Hammer It Right (Performance Testing, ...

Posted by Albert Gareev on Sep 05, 2012
0
Parent page: Load/Performance Testing with NeoLoad In a few of my recent posts I mentioned importance of avoiding unrealistic stress in test sessions. – And I also mentioned that there are situations when we indeed want to explore behavior of the application being under stressing load. But first of all, let’s agree on some definitions. […] ...

Stress Is Not A Good Way To Start (Performance ...

Posted by Albert Gareev on Aug 22, 2012
0
Parent page: Load/Performance Testing with NeoLoad Providing irrelevant or misleading test results is worse than not providing test results at all. When using automation, testers must be twice as careful about relevance of tests – or maybe ten more times, hundred times – depending on how much judgment is passed on to mindless side. Load […] ...

Using dynamic array structures (Performance Testing, ...

Posted by Albert Gareev on Aug 15, 2012
0
Parent page: Load/Performance Testing with NeoLoad Load scripts are typically linear: they’re intended to generate a load, not to cover sophisticated logical scenarios checked by functional automation and explored by skilled testers. For this reason, load scripts rarely contain complex code branches and loops. Yet there are functional scenarios that are part of the load, […] ...

Catching Failures (Performance Testing, NeoLoad)

Posted by Albert Gareev on Aug 08, 2012
0
Parent page: Load/Performance Testing with NeoLoad Although recording is necessary phase in creation of load scripts, I prefer constructing my own modules based on results of reverse engineering analysis of captured client/server communication. Partially because this way I create reusable structures with containers, partially because I want to control setting of think time and pacing, […] ...

“Think Time” matters. A lot more than it ...

Posted by Albert Gareev on May 23, 2012
0
Parent page: Load/Performance Testing with NeoLoad The way you execute requests to the server will have a dramatic effect on results! Why dramatic? – Because numbers might be telling opposite stories, either giving you a true picture or misleading you about what’s happening. But let’s get to a concrete example! We start with the same […] ...

NeoLoad Containers: Taking Group Measurements

Posted by Albert Gareev on May 22, 2012
0
Parent page: Load/Performance Testing with NeoLoad I keep reviewing NeoLoad Containers, this reusable units, serving the same way as functions in a function library. The main outcome we want to get from load session is measurements – response time, errors, throughput, etc. All tools allow obtaining measurements from individual requests posted and some tools allow obtaining aggregate […] ...

NeoLoad Containers: Managing Pacing and Think Time

Posted by Albert Gareev on May 16, 2012
0
Parent page: Load/Performance Testing with NeoLoad I’ve quickly mentioned containers here. Now I want to get back to this concept with regards to load execution delays, commonly referred as “Think Time” and “Pace Time”. Same as typical user makes pauses while working with an application, the load script needs to delay execution for periods of time in […] ...

How to re-point load script (NeoLoad)

Posted by Albert Gareev on May 15, 2012
0
Parent page: Load/Performance Testing with NeoLoad You probably don’t want to rewrite your load testing scripts just because you need to run them against another server. With NeoLoad you can re-point them with one of the following. Change ‘server’ parameter in call of GET/POST methods Go to Design tab Select Virtual User – your script […] ...

TestComplete Forms – Using Custom Events

Posted by Albert Gareev on Apr 17, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). […] ...

TestComplete – “UserName/Password” Form

Posted by Albert Gareev on Apr 16, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). […] ...

TestComplete – Using ‘File Open’ ...

Posted by Albert Gareev on Apr 10, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). […] ...

Adding GUI forms in TestComplete project

Posted by Albert Gareev on Apr 09, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). […] ...

How to select random list item (QTP, VBScript)

Posted by Albert Gareev on Nov 24, 2011
0
Description  Get object reference. Get total number of items in the list. Generate an index within the given range. Select item by index. Implementation ...

How to find last modified file (TestComplete, QTP, ...

Posted by Albert Gareev on Jul 26, 2011
3
Reference page: Service Functions – System (QTP, VBScript) Description  Check folder exists – check folder has files. Iterate through collection of files and keep reference of the most recently modified file (its DateLastModified property is always the highest number). The remaining reference is the one that you need. In case of errors the function returns […] ...

How to “Save As” text template

Posted by Albert Gareev on Oct 26, 2010
0
Parent page: Service Functions – System (QTP, VBScript) Question I need to modify text file template (add a few lines) and “Save as”. Answer One of the typical challenges that people face while trying to automate work tasks, is “procedure – result” confusion. Here, the end result* is confused with a way** to do the […] ...

Quick questions – quick answers

Posted by Albert Gareev on Jun 22, 2010
0
Quick Answers Quick answers to questions arrived into my blog recently. How to load GUI map in QTP during run-time? Use methods of RepositoriesCollection object: Find / Add / Remove. See sample code, read investigation results. What’s the name of add-in for MS Dynamics Great Plains automation? There is no specific add-in. You would need Dot […] ...

How to use Dictionary object for storing Excel data ...

Posted by Albert Gareev on Jun 10, 2010
1
Parent page: Service Functions – Excel (QTP, VBScript) Answers Description Connect to Excel through COM – Open workbook – Open worksheet – map cell values to column names. Notes. Heading and trailing space characters are removed To make mapping not case sensitive index is brought to lower case If your spreadsheet allows column name duplication you need to enhance […] ...

What’s the deal about QTP Actions?

Posted by Albert Gareev on May 27, 2010
1
QTP Action at a glance      “Happy Path” Test Flow    The screenprint above demonstrates sample “Test” Flow designed using QTP Actions. “Happy Path” testing, or conformance testing, or checking can be characterized by 2 attributes: it is scripted, and it ignores everything that is out of scope. Scripted here does not mean a program […] ...

SetACL command line examples

Posted by Albert Gareev on Apr 27, 2010
0
I found SetACL tool very handy. In addition to implementation of security settings in batch files (that’s what it was created for), I quite successfully used it in automation of infrastructure maintenance and testing jobs that occure daily and even hourly. As any command line tool, powerful but simple, it requires instructions written in its […] ...

How to use test data from a locked Excel Workbook ...

Posted by Albert Gareev on Apr 08, 2010
1
Parent page: Service Functions – Excel (QTP, VBScript) Question The question was asked here. How can I get data from Excel spreadsheet if it is accidentally open? It ruins whole batch execution. While opening manually I can go “read-only” and still access it. Is there any way to read data from an open and locked […] ...

How to check if Excel Workbook is locked

Posted by Albert Gareev on Apr 07, 2010
0
Parent page: Service Functions – Excel (QTP, VBScript) Answers Description Connect to Excel through COM – Open workbook – Check property. ...

Processing files contained in a folder

Posted by Albert Gareev on Mar 15, 2010
1
Reference page: Service Functions – System (QTP, VBScript) Question The question was asked here. I need to check number of text files in the folder but i dont know names Answer Checking what number of files is contained in a folder is simple. More challenging tasks would be processing files based on type or name […] ...

How to wrap text line (QTP, VBScript)

Posted by Albert Gareev on Feb 25, 2010
0
Parent page: Service Functions – String (QTP, VBScript) Question The question was asked here. Hi Albert! Can you email me a QTP function that wraps line of text without breaking words? Thank you!  Answer Proper text alignment is important. The whole layout of CSS block or HTML table could be broken if a text line […] ...

How to trim words inside a text line (QTP, VBScript)

Posted by Albert Gareev on Feb 22, 2010
0
Parent page: Service Functions – String (QTP, VBScript) Question The question was asked here. What QTP function i can use to trim inside string? For e.g. “text text text text” – i want only 1 space between. Answer I believe the sample string provided in the question originally contained multiple space characters inside but was […] ...

How to find-replace empty cells (Excel, QTP, VBScript)

Posted by Albert Gareev on Jan 29, 2010
0
Parent page: Service Functions – Excel (QTP, VBScript) Answers Description Connect to Excel through COM – Open workbook – Open worksheet – Loop through data range – close and save the workbook. Note.  In the example below script finds empty cells and assigns zero  to them. Make sure you targeted the worksheet that you need. You can find it […] ...

How to find Excel worksheet by name (QTP, VBScript)

Posted by Albert Gareev on Jan 27, 2010
1
Parent page: Service Functions – Excel (QTP, VBScript) Answers Description Connect to Excel through COM – Open workbook – Loop through worksheets – close and save the workbook. 1. If you know Excel Worksheet name and pretty sure it exists 2. If you don’t know Excel Worksheet name exactly or not sure if it exists ...
Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
This work by Albert Gareev is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported.