
May 29th, 2010 by

Yaron Assa

Loading ...
Steve Windom has graciously shared the following article on Class Delegation.
We’ve previously touched upon this subject under Class Composition and Function Pointers articles, but Steve’s article provides a coherent and clear view.

March 12th, 2010 by

Yaron Assa

Loading ...
Senior Automation Engineer Akien MacIain has done it once again. Much like his breakthough VBScript++ article, this detailed and high-quality article give a great insight into complex code structures in VBScript and QTP, while keeping things as simple and as approachable as possible.This time, Akien focuses on simulating event driven code in VBScript - and important and interesting concept.
Thanks again, Akien, for putting so much effort into helping the QTP and VBScript community!

January 11th, 2010 by

Yaron Assa

Loading ...
Akien MacIain, Senior Automation Engineer, has invested a great deal of his time in preparing a wonderful tutorial to his advanced Object-Oriented implementation in VBScript: VBScript++
While VBScript++ interfaces are quite understandable and intuative (as these things go, at least), it’s meant to the more savy programmers than the run-of-the-mill automation engineer.
Akien’s tutorial is an excellent doorway to a more complex world, and is a very recommended read to anyone who wish to broaden his horizens, or anyone interested in a very well thought of framework.
Thanks, Akien, for putting so much effort into helping the QTP and VBScript community!

May 11th, 2009 by

Yaron Assa

Loading ...
Sergey Talalaev has put his time and effort into translating Meir Bar-Tal’s article on Implementing a GUI layer with classes into Russian. We full-heartily thank Sergey on his continued help and support to the QTP community!

January 19th, 2009 by

Meir Bar-Tal

Loading ...
This article describes a powerful technique that exploits my previously outlined innovation - Function Pointers in VB Script - to build a generic mechanism having the capacity of executing components repeatedly: the generic iterator.

December 20th, 2008 by

Meir Bar-Tal

Loading ...
This article describes a powerful technique that exploits Object Oriented Design Patterns, QTP descriptive programming (DP) and the Dictionary object to pack together GUI objects with their corresponding business oriented functions. The article includes a valuable bonus: a highly effective tip that enables to exit a test smoothly, preventing QTP from getting stuck when it fails to identify GUI objects during runtime.

December 9th, 2008 by

Meir Bar-Tal

Loading ...
Function pointers are used in C and C++ to enable callbacks and as a result, more generic and parsimonious coding. This article shows how to implement function pointers in VB Script using the Scripting.Dictionary object and the Command Wrapper design pattern. It is also shown how to implement “constructor” functions, callbacks and event handlers.

October 4th, 2008 by

Yaron Assa

Loading ...
VBScript’s lack of class inheritance can be quite problematic for those of us who are using Classes regularly throughout our scripts. The attached file provides a parser which enables you to effectively use class inheritance in VBScript by placeing ‘ ParentClassName comments within your classes. The mechanism will:
1. Enable inheritance from multiple parents (just use multiple lines with Inherit comments)
2. Copies Properties, Variables, Functions and methods from the parent class to the derived class.
3. In case the derived class already has a code segment with the same name, the copied code-segment is changed to MyBase_. Inner segment placements are updated accordingly.
4. Enables inheritance through multiple hierarchies (e.g. GrandParent->Parent->Child inheritance). Circular inheritance protection. The order of appearance in the files is irrelevant, the parser will make sure the parent classes are parsed before their derived classes.
5. The parser has a major downside – as the technique uses ExecuteGlobal to load the processed classes into QTP, you cannot debug the code in mid-run.

June 19th, 2008 by

Yaron Assa

Loading ...
This article will offer an improved version of the native Scripting.Dictionary object, and provide a step-by-step guid for building it.

March 29th, 2008 by

Yaron Assa

Loading ...
This article deals with classes and their instances in VBScript. Make sure you’re familiar with the subject by reading the introduction article to classes.
In this article we’ll cover the basics for composing classes (i.e. using one class from within another), and some common and less common uses for this technique. I’m sure that once you’ll see the huge benefits we can gain by selectively using this technique, you’ll at least try it.

March 29th, 2008 by

Yaron Assa

Loading ...
This article will very briefly cover the subject of VBScript classes. My purpose is not to do a detailed sweep, but only a quick reminder in order to move forward to more advanced topics and techniques in articles to come. You can find detailed information and demos on this subject in the book Scripting Quicktest […]

March 29th, 2008 by

Yaron Assa

Loading ...
This article refers to design patterns, pointers and objects (discussed in the background section of this article), and classes. Make sure you’re familiar with these issues before reading on. It would also be prudent to brush up on the Singleton Pattern.
We continue our tour of Design Patterns with another basic pattern – the Factory (or […]

March 29th, 2008 by

Yaron Assa

Loading ...
This article refers to design patterns, pointers and objects (discussed in the background section of this article), and classes. Make sure you’re familiar with these issues before reading on.
We begin our exploration of the word of Design Patterns with one of the simplest patterns – the Singleton. The Gang of Four eloquently summarize the intent […]

March 29th, 2008 by

Yaron Assa

Loading ...
This section relays heavily on your familiarity with basic code design concepts and approach. Make sure you read the introduction to code design before proceeding.
Parts of the following introduction are rewrites (more accurately downgrades) of the preface to the groundbreaking book Design Patterns: Elements of Reusable Object-Oriented Software, written by the “Gang of four”. If […]

March 29th, 2008 by

Yaron Assa

Loading ...
Many of QTP’s downsides are due to the inherent tension between trying to be beginner-friendly, to having enough depth and complexity for writing real automation scripts. It’s more than just having too many menus and options – in some cases; QTP induces shallow thinking and bad habits. I apologize for being dramatic, but in my […]

March 29th, 2008 by

Yaron Assa

Loading ...
Abstractions
Abstractions are the cornerstone of any successful program. An abstraction is a blackbox, wrapped around some very complex real-world mechanism. This magical blackbox allows us to use it, without dealing with the actual complexity that goes on inside.
For example, characters are abstractions: There is no character data type in the real world, since characters are […]

March 29th, 2008 by

Yaron Assa

Loading ...
Background & Motivation
Negative tests are a crucial part of application testing – they ensure us the application contains “bad” user behavior and illegal inputs in a controlled fashion. Having said that, usually there’s never enough time, resources and personal to automate the “positive” tests; let alone the negative ones. This is not an inevitable situation […]

March 29th, 2008 by

Yaron Assa

Loading ...
Today we’ll cover a valuable technique that will enable us to greatly simplify and organize our code, by adding meta-data to our QTP objects. The technique is best used when coupled with DP, though with certain adjustments, it works fine with OR based scripts as well.
The content you are accessing is for registered users onlyRegisteration […]

March 29th, 2008 by

Yaron Assa

Loading ...
This will be the first of many articles dealing with code design. What is code design? In object oriented languages it sometimes stands for deciding on the object class and structures needed to elegantly complete a task. For us it will just be a set of abstract principles that will allow us to write readable, […]

October 22nd, 2007 by

Meir Bar-Tal

Loading ...
This 14-page article by Meir Bar-Tal explains in details the benefits and inherent possibilities in wrapping our functions with classes. It further explores the meaning and logical structure of classes, and shows how we can easily implement constructors, event handlers and callback by using class composition and function wrapping.
The different techniques are well illustrated […]