preload

N-N Comparison: isRecordEqual

Posted by Albert Gareev on Aug 09, 2010
0
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: Many-to-Many / Rule: Is Data Record [in Dictionary] Equal To Another One Definitions Supported data types: String, Number, Date Supported data structures: Dictionary (Associative Array) Comparison of values of different data types always returns False. Comparison of values of unsupported data types always returns False. A record is […] ...

N-N Comparison: isSetEqual

Posted by Albert Gareev on Aug 05, 2010
0
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: Many-to-Many / Rule: Is Set Equal Definitions Supported data types: String, Number, Date Supported data structures: Vector Comparison of values of different data types always returns False. Comparison of values of unsupported data types always returns False. Vector data structure is presented by a set (un-ordered array) of […] ...

1-N Comparison: isValueInSet

Posted by Albert Gareev on Jul 29, 2010
0
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: One-to-Many / Rule: Is Value In Set Definitions Supported data types: String, Number, Date Supported data structures: Scalar, Vector Comparison of values of different data types always returns False. Comparison of values of unsupported data types always returns False. Scalar data structure is presented by any single […] ...

1-N Comparison: isValueInRange

Posted by Albert Gareev on Jul 27, 2010
1
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: One-to-Many / Rule: Is Value In Range Definitions Supported data types: String, Number, Date Supported data structures: Scalar, Vector Comparison of values of different data types always returns False. Comparison of values of unsupported data types always returns False. Scalar data structure is presented by any single value.  […] ...

1-1 Comparison: MatchIn / MatchFor

Posted by Albert Gareev on Jul 23, 2010
0
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: One-to-One / Match In String / Match For String Definitions Supported data types: String, Regular Expression  1. Match in String First argument – base string; second argument – substring / regular expression. 2. Match for String First argument – substring / regular expression; second argument – base […] ...

1-1 Comparison: isValueEqualOrGreater

Posted by Albert Gareev on Jul 21, 2010
0
 Reference Page: Comparison Rules Automatic Comparison Rules Relationship: One-to-One / Rule: Is Value Equal Or Greater Definitions Supported data types: String, Number, Date Comparison of values of different data types always returns False. Comparison of values of unsupported data types always returns False. Data type: String Strings are compared based on total length and encoding […] ...

1-1 Comparison: isValueGreater

Posted by Albert Gareev on Jul 19, 2010
2
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: One-to-One / Rule: Is Value Greater Definitions Supported data types: String, Number, Date Comparison of values of different data types always returns False. Comparison of values of unsupported data types always returns False. Data type: String Strings are compared based on total length and encoding of each […] ...

1-1 Comparison: isValueEqualOrLess

Posted by Albert Gareev on Jul 16, 2010
0
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: One-to-One / Rule: Is Value Equal Or Less Definitions Supported data types: String, Number, Date Comparison of values of different data types always returns False. Comparison of values of unsupported data types always returns False. Data type: String Strings are compared based on total length and encoding […] ...

1-1 Comparison: isValueLess

Posted by Albert Gareev on Jul 14, 2010
0
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: One-to-One / Rule: Is Value Less Definitions Supported data types: String, Number, Date Comparison of values of different data types always returns False. Comparison of values of unsupported data types always returns False. Data type: String Strings are compared based on total length and encoding of each […] ...

1-1 Comparison: isValueEqual

Posted by Albert Gareev on Jul 12, 2010
0
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: One-to-One / Rule: Is Value Equal Definitions Supported data types: String, Number, Date Values of different data types are considered unequal. Values of unsupported data types are considered unequal. Data type: String Strings are compared based on total length and encoding of each character. Two strings are […] ...

Taking snapshot of a folder structure

Posted by Albert Gareev on Jul 08, 2010
0
In the Checking structure of created folders example I used a text file as a source, containing manually prepared folder names to check for. Today I want to show how file/folder structure could be captured automatically. Data Record Declaration For this example, data will be stored in Dictionary object serving as a dynamic array of records. Sample file […] ...

My refactoring heuristics (4)

Posted by Albert Gareev on Jul 05, 2010
0
“Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a ‘refactoring’) does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it’s less […] ...

My refactoring heuristics (3)

Posted by Albert Gareev on Jun 24, 2010
0
“Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a ‘refactoring’) does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it’s less […] ...

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 […] ...

My refactoring heuristics (2)

Posted by Albert Gareev on Jun 15, 2010
0
“Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a ‘refactoring’) does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it’s less […] ...

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 […] ...

My refactoring heuristics (1)

Posted by Albert Gareev on Jun 08, 2010
0
“Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a ‘refactoring’) does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it’s less likely […] ...

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 […] ...

Checking structure of created folders (Excel/VBA)

Posted by Albert Gareev on May 05, 2010
1
In the previous post I warned about possible synchronization issues while copying a complex and/or large file-folder structure. To ensure reliability of the operation performed we may verify the structure that was created. We need to answer the following questions before designing the script. Which folders and files should it verify? Which way should it […] ...

Creating folder structure from a template (Excel/VBA)

Posted by Albert Gareev on May 03, 2010
0
How to create a complex folder structure by using a template In the previous post I provided code example that creates a folder and then applies security permissions on it. However, as per requirements, user folders often come with a predefined structure of folders and some files created by default. Sure, we can write script […] ...

SetACL command line automation examples

Posted by Albert Gareev on Apr 29, 2010
0
In this post  I provide code snippets for SetACL tool command line automation.  Examples of command line instructions were taken from here. The code presented below is written in VBA for MS Excel. CreateUserFolder function can create folders on a local or network drive. After user folder is created, the function sets typical access permissions by […] ...

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 […] ...

Active Directory Scripting – a little trick for ...

Posted by Albert Gareev on Apr 13, 2010
2
Reference page: Active Directory – Sample Scripts (Excel/VBA)  While processing User Account put the following code in the beginning of operations to disable it. And enable it back once you’re successfully done. This way,  in case of an unhandled exception that breaks execution of a script, any User Account that wasn’t properly processed will remain […] ...

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. ...

Peeling an Onion Code

Posted by Albert Gareev on Apr 06, 2010
1
Peeling an Onion Code In my previous post I presented code structure looking like layers of an onion. In this post I’m exploring ways to transform it to structures that have much less drawback while performing same (or richer) functionalities. Let’s begin from the very first issue: readability of an Onion Code. Generally speaking, test steps are […] ...

Should we call it Matryoshka Programming or Onion Code?

Posted by Albert Gareev on Mar 30, 2010
1
Studying programming through record/playback sometimes results in a really weird code. What is wrong with Matryoshka Programming? ...

A little QTP performance test: Object Repository vs. ...

Posted by Albert Gareev on Mar 18, 2010
3
Quick Test Professional provides 2 ways of referring to GUI objects while creating testing scripts. Have you ever tested performance of either one? ...

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 […] ...

Active Directory Scripting – Security Group ...

Posted by Albert Gareev on Mar 11, 2010
0
Reference page: Active Directory – Sample Scripts (Excel/VBA)  Description  The function below is used to clear group membership for a user account. The account is removed from all groups except recognized ones . By default, “Users” and “Domain Users” are in the list. The function can be easily modifed to recognize and process membership based on […] ...
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.