preload

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

Test Automation Problems – Page Update

Posted by Albert Gareev on May 24, 2010
0
Test Automation Problems series in my blog has received its own page. I also added Recommended Reading section to provide a few links to external resources. Don’t miss the latest article by Linda Wilkinson. ...

Google Code Search

Posted by Albert Gareev on May 18, 2010
0
Some time ago I blogged about non-GUI testing approach in automation. I also provided examples of how COM/OLE Viewer may help in exploring methods and properties of undocumented objects. But there are other cases when an application is poorly documented, and you know little about its internal methods and objects. Google Code Search may help you […] ...

Crowd sketching tool

Posted by Albert Gareev on May 10, 2010
0
e-Pen and e-Paper – that’s what you need for e-Collaboration. And here’s the tool.     (It took just a couple of minutes for me to create a sample picture above) Don’t forget to try Replay button! ...

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

Security Administration Tool – (Open Source) ...

Posted by Albert Gareev on Apr 20, 2010
1
If on your project you are not restricted to using Microsoft only toolkit in your system administration, testing, or automation work, you may want to try SetACL as an alternative to CACLS. It has some more advanced features, especially when it comes to setting allowance of inheritable permissions. Area of use Security Configuration Assessment and Management, […] ...

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

Security Administration Tool – Microsoft CACLS

Posted by Albert Gareev on Mar 25, 2010
0
Sure, computer programs are now very complex systems – but they are always a part of even more complex system – Infrastructure. Therefore, testing is not limited to a program testing. Microsoft *ACLS.EXE family of tools is a handy set for investigation and testing of implemented security permissions. Don’t be afraid of command line! CACLS.EXE […] ...

Not a Load Test Plan template

Posted by Albert Gareev on Mar 23, 2010
1
Do you know enough about your test environment when designing a Load Test plan? What can you do and what would you do to provide stakeholders with the most valuable information in the context and at the moment? How do you use their feedback in your testing work? ...

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

Active Directory Scripting – find User Account

Posted by Albert Gareev on Mar 09, 2010
0
  Reference page: Active Directory – Sample Scripts (Excel/VBA)  Description  The function below performs 1-layer deep search of User Account object in all Organizational Units contained under parent Organizational Unit. The function can be easily modified for a recursive search if children OU hierarchy is unknown. Use objUser.Get(“distinguishedName”) to retrieve full LDAP path of found […] ...

How to manually get Dexterity GUI field names

Posted by Albert Gareev on Mar 04, 2010
2
All related posts: Reference Page – GP/QTP Automation Question The question was asked here. I need to make a small change in xml file created without re-mapping a window. How can I manually get Dexterity GUI field names from GP? Answer You can do that by accessing “Tools\Resource Descriptions\Windows” item of main menu of any Dexterity Window. […] ...

Active Directory Scripting – modify Attributes

Posted by Albert Gareev on Mar 01, 2010
0
Reference page: Active Directory – Sample Scripts (Excel/VBA) How to modify Attributes of an Object Introduction In Microsoft Active Directory Object Classes have Attributes representing additional information about an object. It could be Firstname, Lastname – for a person, Address and Phone number both for a person and organization. Access to Attributes is performed through LDAP calls, […] ...

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

Active Directory Scripting – create Security Group

Posted by Albert Gareev on Feb 18, 2010
1
Reference page: Active Directory – Sample Scripts (Excel/VBA) How to create Security Group Description Security Group object could be created within its container object – Organizational Unit. The example below is based on the assumption that we successfully retrieved an instance of Organizational Unit. An existing User Account will also be added to the newly […] ...

Active Directory Scripting – create User Account

Posted by Albert Gareev on Feb 16, 2010
0
Reference page: Active Directory – Sample Scripts (Excel/VBA) How to create User Account Description User Account object could be created within its container object – Organizational Unit. The example below is based on the assumption that we successfully retrieved an instance of Organizational Unit. Note. You need to login as an authorized person to successfully execute […] ...
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.