Posted by Albert Gareev on Apr 17, 2012
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). [...] ...
Posted by Albert Gareev on Apr 16, 2012
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). [...] ...
Posted by Albert Gareev on Apr 10, 2012
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). [...] ...
Posted by Albert Gareev on Apr 09, 2012
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). [...] ...
Posted by Albert Gareev on Mar 06, 2012
Parent page: Service Functions – String (QTP, VBScript) Description Get token string from the source string. Position is relative, defined by another token-keyword and a number. Implementation Public Function GetTokenByKeyword(ByVal strSource, ByVal chrDelimiter, ByVal strKeyword, ByVal intNumber, ByRef strToken) Dim Tokens, intCount, intIndex Dim i, boolRC Tokens = Split(strSource, chrDelimiter) intCount = UBound(Tokens)+1 intIndex = [...] ...
Posted by Albert Gareev on Mar 05, 2012
Parent page: Service Functions – String (QTP, VBScript) Description Get token string from the source string. Position is absolute, defined by number. Implementation Public Function GetTokenByNumber(ByVal strSource, ByVal chrDelimiter, ByVal intNumber, ByRef strToken) Dim Tokens, intCount strSource = ReplaceEx(strSource, " *", " ", False) Tokens = Split(strSource, chrDelimiter) intCount = UBound(Tokens) If intNumber > ...
Posted by Albert Gareev on Feb 15, 2012
(Click on the picture to view it full-size in a separate browser window) ...
Posted by Albert Gareev on Jan 08, 2012
A few simple Excel macros I use for automatic data maintenance. Date Macro Current date/time =NOW() 9/7/2011 17:57 Date formatted as text =TEXT(NOW(),”mm/dd/yyyy”) 09/07/2011 Future date (5 days from today) =TEXT(NOW()+5,”mm/dd/yyyy”) 09/12/2011 A year 180 days before today =TEXT(YEAR(NOW()-180), “00″) 2011 A month 58 days from today =TEXT(MONTH(NOW()+58), “00″) 11 Year, formatted ...
Posted by Albert Gareev on Dec 08, 2011
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Description Copy all child elements (and attributes, comments, text nodes) from one XML node to another. Implementation Public Function CopyChildElements(ByRef objXMLSrc, ByRef objXMLDest) Dim objCloneNode If objXMLSrc is Nothing Then Set MoveChildElements = objXMLDest Exit Function End If If [...] ...
Posted by Albert Gareev on Dec 06, 2011
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Description Move all child elements (and attributes, comments, text nodes) from one XML node to another. Implementation Public Function MoveChildElements(ByRef objXMLSrc, ByRef objXMLDest) If objXMLSrc is Nothing Then Set MoveChildElements = objXMLDest Exit Function End If If objXMLDest is Nothing Then [...] ...
Posted by Albert Gareev on Nov 24, 2011
Description Get object reference. Get total number of items in the list. Generate an index within the given range. Select item by index. Implementation Dim objPage, objList Dim boolRC Dim intItemsCount, intRndItem 'Assumptions: ' "Google Advanced Search" page is up ' "Results per page" WebList exists and enabled 'Get page object Set objPage = Browser("CreationTime:=0").Page("title:=Google Advanced ...
Posted by Albert Gareev on Nov 07, 2011
Modern applications have a few layers of ‘defense’ that are supposed to protect against unauthorized access. The very first layer is at the front-end, merged with the UI. The UI part, client-side part, is at user’s computer and therefore users have the most capacities to manipulate it. Penetration testing is a purely exploratory testing activity. [...] ...
Posted by Albert Gareev on Oct 20, 2011
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Description Locate XML node depth within the hierarchy. Valid argument: an XML element node (NODE_ELEMENT type). Implementation Public Function XMLElementDepth(ByRef objXMLElement) Dim intDepth Dim objXMLNode If objXMLElement is Nothing Then XMLElementDepth = -1 Exit Function End If 'NODE_DOCUMENT(9) If objXMLElement.NodeType = 9 Then ...
Posted by Albert Gareev on Oct 08, 2011
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Description Create XML DOM object by loading source XML from string. If the string is empty or source XML is invalid returns Nothing. Implementation Public Function CreateXMLDOMFromString(ByVal sXMLSource) Dim boolRC, intRC Dim objXMLDoc, objXMLRoot If Trim(sXMLSource) = "" Then Set CreateXMLDOMFromString = Nothing Exit [...] ...
Posted by Albert Gareev on Sep 26, 2011
Remote exploration of functionalities is one of the things I enjoy in load testing. I don’t like the definition as “non-functional” though. “Para-functional” sounds better, but (at least for me) thinking of those functionalities as system or service functionalities helps to assess them from purpose/value/risks perspectives. You can’t reach them manually, you can’t even see them, [...] ...
Posted by Albert Gareev on Aug 02, 2011
Although it seems like just happened yesterday, it’s been well over a quarter since I took the course of Rapid Software Testing by Michael Bolton (the course is authored by James Bach and Michael Bolton). This is a major milestone in my learning of exploratory, heuristic-based testing approach. To be fair, I was somewhat skeptical [...] ...
Posted by Albert Gareev on Jul 26, 2011
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 [...] ...
Posted by Albert Gareev on Jul 20, 2011
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Service Functions – Dictionary (QTP, TestComplete, VBScript) Description For each occurrence of XML node perform conversion to Dictionary, and store all records in indexed Dictionary object. Implementation Public Function XMLNodeSet2Dictionary(ByRef objXMLNodeSet) Dim objDictionary Dim Iter Set objDictionary = CreateObject("Scripting.Dictionary") If ...
Posted by Albert Gareev on Jul 19, 2011
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Service Functions – Dictionary (QTP, TestComplete, VBScript) Description Create Dictionary object and populate with data (only direct content – text, comments, CData, and attributes) taken from XML node. Naming convention: @attr_name for attributes; #text_index for text nodes; #comment_index for comment nodes; #cdata_index for CData Section nodes. [...] ...
Posted by Albert Gareev on Jun 23, 2011
Parent page: Generating Test Reports Today I put all examples together. Here’s our XML record simulating log data of a test session. XML Source <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href=".\LogView4.xsl"?> <log> <area id="A001"> <description>Testing login page, invalid password</description> <step type="#note" ...